From 189c0c07cacffee65dd39eeffb480e8458a0c72a Mon Sep 17 00:00:00 2001 From: Jing-song <37168047+Jing-song@users.noreply.github.com> Date: Thu, 29 Jun 2023 09:53:16 +0800 Subject: [PATCH] [Logic] `az logic integration-account`: Add new command group `map` to support manage integration account map (#6441) * sdk * test * update * Update commands.py * Update HISTORY.rst * Update test_logic.yaml * Update commands.py --- src/logic/HISTORY.rst | 5 + src/logic/azext_logic/__init__.py | 14 +- src/logic/azext_logic/aaz/__init__.py | 6 + src/logic/azext_logic/aaz/latest/__init__.py | 6 + .../aaz/latest/logic/__cmd_group.py | 23 + .../azext_logic/aaz/latest/logic/__init__.py | 11 + .../logic/integration_account/__cmd_group.py | 23 + .../logic/integration_account/__init__.py | 11 + .../integration_account/map/__cmd_group.py | 23 + .../logic/integration_account/map/__init__.py | 16 + .../logic/integration_account/map/_create.py | 300 + .../logic/integration_account/map/_delete.py | 149 + .../logic/integration_account/map/_list.py | 248 + .../logic/integration_account/map/_show.py | 236 + .../logic/integration_account/map/_update.py | 453 + src/logic/azext_logic/azext_metadata.json | 4 +- .../azext_logic/generated/_client_factory.py | 4 +- src/logic/azext_logic/manual/commands.py | 11 + src/logic/azext_logic/manual/custom.py | 149 +- .../azext_logic/tests/latest/map_content.txt | 1 + .../test_integration_account_map.yaml | 475 + .../tests/latest/recordings/test_logic.yaml | 165 +- .../tests/latest/test_logic_scenario.py | 49 +- .../vendored_sdks/logic/__init__.py | 8 + .../vendored_sdks/logic/_configuration.py | 38 +- .../logic/_logic_management_client.py | 311 +- .../azext_logic/vendored_sdks/logic/_patch.py | 31 + .../vendored_sdks/logic/_vendor.py | 27 + .../vendored_sdks/logic/_version.py | 9 + .../vendored_sdks/logic/aio/__init__.py | 7 +- ...nfiguration_async.py => _configuration.py} | 31 +- .../logic/aio/_logic_management_client.py | 200 + .../aio/_logic_management_client_async.py | 188 - .../vendored_sdks/logic/aio/_patch.py | 31 + .../logic/aio/operations/__init__.py | 65 + ...tegration_account_agreements_operations.py | 407 + ...tegration_account_assemblies_operations.py | 387 + ...account_batch_configurations_operations.py | 326 + ...gration_account_certificates_operations.py | 331 + .../_integration_account_maps_operations.py | 409 + ...integration_account_partners_operations.py | 407 + ..._integration_account_schemas_operations.py | 407 + ...integration_account_sessions_operations.py | 337 + .../_integration_accounts_operations.py | 746 ++ ...nment_managed_api_operations_operations.py | 134 + ...ice_environment_managed_apis_operations.py | 441 + ..._environment_network_health_operations.py} | 88 +- ...ion_service_environment_skus_operations.py | 129 + ...gration_service_environments_operations.py | 632 ++ .../_operations.py} | 89 +- ...kflow_run_action_repetitions_operations.py | 308 + ...epetitions_request_histories_operations.py | 220 + ...run_action_request_histories_operations.py | 211 + ...run_action_scope_repetitions_operations.py | 211 + .../_workflow_run_actions_operations.py | 305 + .../_workflow_run_operations_operations.py} | 95 +- .../operations/_workflow_runs_operations.py | 262 + .../_workflow_trigger_histories_operations.py | 278 + .../_workflow_triggers_operations.py | 513 ++ .../_workflow_version_triggers_operations.py | 121 + .../_workflow_versions_operations.py | 198 + .../aio/operations/_workflows_operations.py | 1068 +++ .../logic/aio/operations_async/__init__.py | 65 - ...tion_account_agreement_operations_async.py | 416 - ...ation_account_assembly_operations_async.py | 370 - ...nt_batch_configuration_operations_async.py | 310 - ...on_account_certificate_operations_async.py | 321 - ...ntegration_account_map_operations_async.py | 407 - .../_integration_account_operations_async.py | 743 -- ...ration_account_partner_operations_async.py | 401 - ...gration_account_schema_operations_async.py | 413 - ...ration_account_session_operations_async.py | 320 - ..._managed_api_operation_operations_async.py | 116 - ...nvironment_managed_api_operations_async.py | 367 - ...on_service_environment_operations_async.py | 587 -- ...ervice_environment_sku_operations_async.py | 112 - .../_workflow_operations_async.py | 1117 --- .../_workflow_run_action_operations_async.py | 269 - ..._run_action_repetition_operations_async.py | 271 - ...tition_request_history_operations_async.py | 196 - ...action_request_history_operations_async.py | 188 - ...ction_scope_repetition_operations_async.py | 188 - .../_workflow_run_operations_async.py | 239 - ...rkflow_trigger_history_operations_async.py | 253 - .../_workflow_trigger_operations_async.py | 481 - .../_workflow_version_operations_async.py | 177 - ...rkflow_version_trigger_operations_async.py | 122 - .../vendored_sdks/logic/models/__init__.py | 629 +- .../models/_logic_management_client_enums.py | 738 +- .../vendored_sdks/logic/models/_models.py | 7951 ----------------- .../vendored_sdks/logic/models/_models_py3.py | 6360 +++++++++---- .../logic/operations/__init__.py | 104 +- ...ntegration_account_agreement_operations.py | 421 - ...tegration_account_agreements_operations.py | 621 ++ ...tegration_account_assemblies_operations.py | 586 ++ ...integration_account_assembly_operations.py | 375 - ..._account_batch_configuration_operations.py | 314 - ...account_batch_configurations_operations.py | 486 + ...egration_account_certificate_operations.py | 325 - ...gration_account_certificates_operations.py | 496 + .../_integration_account_map_operations.py | 412 - .../_integration_account_maps_operations.py | 622 ++ .../_integration_account_operations.py | 753 -- ..._integration_account_partner_operations.py | 406 - ...integration_account_partners_operations.py | 621 ++ .../_integration_account_schema_operations.py | 418 - ..._integration_account_schemas_operations.py | 621 ++ ..._integration_account_session_operations.py | 324 - ...integration_account_sessions_operations.py | 505 ++ .../_integration_accounts_operations.py | 1157 +++ ...onment_managed_api_operation_operations.py | 117 - ...vice_environment_managed_api_operations.py | 373 - ...nment_managed_api_operations_operations.py | 174 + ...ice_environment_managed_apis_operations.py | 602 ++ ...e_environment_network_health_operations.py | 130 +- ...egration_service_environment_operations.py | 596 -- ...tion_service_environment_sku_operations.py | 113 - ...ion_service_environment_skus_operations.py | 168 + ...gration_service_environments_operations.py | 903 ++ .../logic/operations/_operation_operations.py | 101 - .../logic/operations/_operations.py | 144 + .../logic/operations/_workflow_operations.py | 1135 --- .../_workflow_run_action_operations.py | 272 - ...rkflow_run_action_repetition_operations.py | 274 - ...n_repetition_request_history_operations.py | 198 - ...kflow_run_action_repetitions_operations.py | 434 + ...epetitions_request_histories_operations.py | 307 + ...run_action_request_histories_operations.py | 294 + ...w_run_action_request_history_operations.py | 190 - ..._run_action_scope_repetition_operations.py | 190 - ...run_action_scope_repetitions_operations.py | 295 + .../_workflow_run_actions_operations.py | 431 + .../_workflow_run_operation_operations.py | 105 - .../operations/_workflow_run_operations.py | 242 - .../_workflow_run_operations_operations.py | 154 + .../operations/_workflow_runs_operations.py | 383 + .../_workflow_trigger_histories_operations.py | 404 + .../_workflow_trigger_history_operations.py | 256 - .../_workflow_trigger_operations.py | 488 - .../_workflow_triggers_operations.py | 794 ++ .../_workflow_version_operations.py | 179 - .../_workflow_version_trigger_operations.py | 123 - .../_workflow_version_triggers_operations.py | 173 + .../_workflow_versions_operations.py | 277 + .../logic/operations/_workflows_operations.py | 1677 ++++ src/logic/setup.py | 2 +- 146 files changed, 30418 insertions(+), 28362 deletions(-) create mode 100644 src/logic/azext_logic/aaz/__init__.py create mode 100644 src/logic/azext_logic/aaz/latest/__init__.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/__cmd_group.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/__init__.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/__cmd_group.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/map/__cmd_group.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/map/__init__.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/map/_create.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/map/_delete.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/map/_list.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/map/_show.py create mode 100644 src/logic/azext_logic/aaz/latest/logic/integration_account/map/_update.py create mode 100644 src/logic/azext_logic/manual/commands.py create mode 100644 src/logic/azext_logic/tests/latest/map_content.txt create mode 100644 src/logic/azext_logic/tests/latest/recordings/test_integration_account_map.yaml create mode 100644 src/logic/azext_logic/vendored_sdks/logic/_patch.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/_vendor.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/_version.py rename src/logic/azext_logic/vendored_sdks/logic/aio/{_configuration_async.py => _configuration.py} (64%) create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/_patch.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_integration_service_environment_network_health_operations_async.py => operations/_integration_service_environment_network_health_operations.py} (54%) create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_operation_operations_async.py => operations/_operations.py} (51%) create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py rename src/logic/azext_logic/vendored_sdks/logic/aio/{operations_async/_workflow_run_operation_operations_async.py => operations/_workflow_run_operations_operations.py} (52%) create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_agreement_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_assembly_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_batch_configuration_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_certificate_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_map_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_partner_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_schema_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_session_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operation_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_sku_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_request_history_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_request_history_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_scope_repetition_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_history_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_trigger_operations_async.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/models/_models.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assembly_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configuration_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificate_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_map_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schema_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_session_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_request_history_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_history_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetition_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_history_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py delete mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py create mode 100644 src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py diff --git a/src/logic/HISTORY.rst b/src/logic/HISTORY.rst index b59ecb7fdc6..773a03a8ab9 100644 --- a/src/logic/HISTORY.rst +++ b/src/logic/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.1.7 +++++++ +* Add new command group `az logic integration-account map` to support manage integration account map +* Upgrade SDK to fix deserialization errors + 0.1.6 ++++++ * Add README.md link in help diff --git a/src/logic/azext_logic/__init__.py b/src/logic/azext_logic/__init__.py index 8796c8add9b..52ec01e20b3 100644 --- a/src/logic/azext_logic/__init__.py +++ b/src/logic/azext_logic/__init__.py @@ -19,11 +19,21 @@ def __init__(self, cli_ctx=None): logic_custom = CliCommandType( operations_tmpl='azext_logic.custom#{}', client_factory=cf_logic) - super(LogicManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx, - custom_command_type=logic_custom) + super().__init__(cli_ctx=cli_ctx, custom_command_type=logic_custom) def load_command_table(self, args): from azext_logic.generated.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) load_command_table(self, args) try: from azext_logic.manual.commands import load_command_table as load_command_table_manual diff --git a/src/logic/azext_logic/aaz/__init__.py b/src/logic/azext_logic/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/logic/azext_logic/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/logic/azext_logic/aaz/latest/__init__.py b/src/logic/azext_logic/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/logic/azext_logic/aaz/latest/logic/__cmd_group.py b/src/logic/azext_logic/aaz/latest/logic/__cmd_group.py new file mode 100644 index 00000000000..186331ee892 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "logic", +) +class __CMDGroup(AAZCommandGroup): + """Manage logic + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/logic/azext_logic/aaz/latest/logic/__init__.py b/src/logic/azext_logic/aaz/latest/logic/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/__cmd_group.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/__cmd_group.py new file mode 100644 index 00000000000..e65c118682c --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "logic integration-account", +) +class __CMDGroup(AAZCommandGroup): + """Manage logic integration account + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/map/__cmd_group.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/__cmd_group.py new file mode 100644 index 00000000000..d106ec636f4 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "logic integration-account map", +) +class __CMDGroup(AAZCommandGroup): + """Manage logic integration account map + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/map/__init__.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/__init__.py new file mode 100644 index 00000000000..c401f439385 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_create.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_create.py new file mode 100644 index 00000000000..4331b8453ad --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_create.py @@ -0,0 +1,300 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account map create", +) +class Create(AAZCommand): + """Create an integration account map. If the map is larger than 4 MB, you need to store the map in an Azure blob and use the blob's Shared Access Signature (SAS) URL as the 'contentLink' property value. + + :example: Create map + az logic integration-account map create -g rg -n map-name --integration-account account-name --map-type Xslt --content-type application/xml --map-content map_content.txt + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}/maps/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_account = AAZStrArg( + options=["--integration-account"], + help="The integration account name.", + required=True, + ) + _args_schema.map_name = AAZStrArg( + options=["-n", "--name", "--map-name"], + help="The integration account map name.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Map" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Map", + help="The resource location.", + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Map", + help="The resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.content = AAZStrArg( + options=["--content"], + arg_group="Properties", + help="The content.", + ) + _args_schema.content_type = AAZStrArg( + options=["--content-type"], + arg_group="Properties", + help="The content type.", + ) + _args_schema.map_type = AAZStrArg( + options=["--map-type"], + arg_group="Properties", + help="The map type.", + required=True, + enum={"Liquid": "Liquid", "NotSpecified": "NotSpecified", "Xslt": "Xslt", "Xslt20": "Xslt20", "Xslt30": "Xslt30"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountMapsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class IntegrationAccountMapsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.integration_account, + required=True, + ), + **self.serialize_url_param( + "mapName", self.ctx.args.map_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("content", AAZStrType, ".content") + properties.set_prop("contentType", AAZStrType, ".content_type") + properties.set_prop("mapType", AAZStrType, ".map_type", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType() + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.content = AAZStrType() + properties.content_link = AAZObjectType( + serialized_name="contentLink", + ) + properties.content_type = AAZStrType( + serialized_name="contentType", + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.map_type = AAZStrType( + serialized_name="mapType", + flags={"required": True}, + ) + properties.parameters_schema = AAZObjectType( + serialized_name="parametersSchema", + ) + + content_link = cls._schema_on_200_201.properties.content_link + content_link.content_hash = AAZObjectType( + serialized_name="contentHash", + ) + content_link.content_size = AAZIntType( + serialized_name="contentSize", + flags={"read_only": True}, + ) + content_link.content_version = AAZStrType( + serialized_name="contentVersion", + flags={"read_only": True}, + ) + content_link.uri = AAZStrType() + + content_hash = cls._schema_on_200_201.properties.content_link.content_hash + content_hash.algorithm = AAZStrType() + content_hash.value = AAZStrType() + + parameters_schema = cls._schema_on_200_201.properties.parameters_schema + parameters_schema.ref = AAZStrType() + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_delete.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_delete.py new file mode 100644 index 00000000000..3c53876dbd7 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_delete.py @@ -0,0 +1,149 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account map delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete an integration account map. + + :example: Delete map + az logic integration-account map delete -g rg -n map-name --integration-account account-name + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}/maps/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_account = AAZStrArg( + options=["--integration-account"], + help="The integration account name.", + required=True, + id_part="name", + ) + _args_schema.map_name = AAZStrArg( + options=["-n", "--name", "--map-name"], + help="The integration account map name.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountMapsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class IntegrationAccountMapsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.integration_account, + required=True, + ), + **self.serialize_url_param( + "mapName", self.ctx.args.map_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_list.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_list.py new file mode 100644 index 00000000000..a230f6c535e --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_list.py @@ -0,0 +1,248 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account map list", +) +class List(AAZCommand): + """List a list of integration account maps. + + :example: List map + az logic integration-account map list -g rg --integration-account account-name + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}/maps", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_account = AAZStrArg( + options=["--integration-account"], + help="The integration account name.", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.filter = AAZStrArg( + options=["--filter"], + help="The filter to apply on the operation. Options for filters include: MapType.", + ) + _args_schema.top = AAZIntArg( + options=["--top"], + help="The number of items to be included in the result.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountMapsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class IntegrationAccountMapsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.integration_account, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "$top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType() + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.location = AAZStrType() + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.content = AAZStrType() + properties.content_link = AAZObjectType( + serialized_name="contentLink", + ) + properties.content_type = AAZStrType( + serialized_name="contentType", + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.map_type = AAZStrType( + serialized_name="mapType", + flags={"required": True}, + ) + properties.parameters_schema = AAZObjectType( + serialized_name="parametersSchema", + ) + + content_link = cls._schema_on_200.value.Element.properties.content_link + content_link.content_hash = AAZObjectType( + serialized_name="contentHash", + ) + content_link.content_size = AAZIntType( + serialized_name="contentSize", + flags={"read_only": True}, + ) + content_link.content_version = AAZStrType( + serialized_name="contentVersion", + flags={"read_only": True}, + ) + content_link.uri = AAZStrType() + + content_hash = cls._schema_on_200.value.Element.properties.content_link.content_hash + content_hash.algorithm = AAZStrType() + content_hash.value = AAZStrType() + + parameters_schema = cls._schema_on_200.value.Element.properties.parameters_schema + parameters_schema.ref = AAZStrType() + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_show.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_show.py new file mode 100644 index 00000000000..65d2337eb95 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_show.py @@ -0,0 +1,236 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account map show", +) +class Show(AAZCommand): + """Get an integration account map. + + :example: Show map + az logic integration-account map show -g rg -n map-name --integration-account account-name + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}/maps/{}", "2019-05-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_account = AAZStrArg( + options=["--integration-account"], + help="The integration account name.", + required=True, + id_part="name", + ) + _args_schema.map_name = AAZStrArg( + options=["-n", "--name", "--map-name"], + help="The integration account map name.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountMapsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class IntegrationAccountMapsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.integration_account, + required=True, + ), + **self.serialize_url_param( + "mapName", self.ctx.args.map_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType() + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.content = AAZStrType() + properties.content_link = AAZObjectType( + serialized_name="contentLink", + ) + properties.content_type = AAZStrType( + serialized_name="contentType", + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.map_type = AAZStrType( + serialized_name="mapType", + flags={"required": True}, + ) + properties.parameters_schema = AAZObjectType( + serialized_name="parametersSchema", + ) + + content_link = cls._schema_on_200.properties.content_link + content_link.content_hash = AAZObjectType( + serialized_name="contentHash", + ) + content_link.content_size = AAZIntType( + serialized_name="contentSize", + flags={"read_only": True}, + ) + content_link.content_version = AAZStrType( + serialized_name="contentVersion", + flags={"read_only": True}, + ) + content_link.uri = AAZStrType() + + content_hash = cls._schema_on_200.properties.content_link.content_hash + content_hash.algorithm = AAZStrType() + content_hash.value = AAZStrType() + + parameters_schema = cls._schema_on_200.properties.parameters_schema + parameters_schema.ref = AAZStrType() + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_update.py b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_update.py new file mode 100644 index 00000000000..fcd812967f5 --- /dev/null +++ b/src/logic/azext_logic/aaz/latest/logic/integration_account/map/_update.py @@ -0,0 +1,453 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "logic integration-account map update", +) +class Update(AAZCommand): + """Update an integration account map. If the map is larger than 4 MB, you need to store the map in an Azure blob and use the blob's Shared Access Signature (SAS) URL as the 'contentLink' property value. + + :example: Update map + az logic integration-account map update -g rg -n map-name --integration-account account-name + """ + + _aaz_info = { + "version": "2019-05-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.logic/integrationaccounts/{}/maps/{}", "2019-05-01"], + ] + } + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.integration_account = AAZStrArg( + options=["--integration-account"], + help="The integration account name.", + required=True, + id_part="name", + ) + _args_schema.map_name = AAZStrArg( + options=["-n", "--name", "--map-name"], + help="The integration account map name.", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Map" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Map", + help="The resource location.", + nullable=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Map", + help="The resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.content = AAZStrArg( + options=["--content"], + arg_group="Properties", + help="The content.", + nullable=True, + ) + _args_schema.content_type = AAZStrArg( + options=["--content-type"], + arg_group="Properties", + help="The content type.", + nullable=True, + ) + _args_schema.map_type = AAZStrArg( + options=["--map-type"], + arg_group="Properties", + help="The map type.", + enum={"Liquid": "Liquid", "NotSpecified": "NotSpecified", "Xslt": "Xslt", "Xslt20": "Xslt20", "Xslt30": "Xslt30"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.IntegrationAccountMapsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + self.IntegrationAccountMapsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class IntegrationAccountMapsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.integration_account, + required=True, + ), + **self.serialize_url_param( + "mapName", self.ctx.args.map_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_integration_account_map_read(cls._schema_on_200) + + return cls._schema_on_200 + + class IntegrationAccountMapsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200, 201]: + return self.on_200_201(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "integrationAccountName", self.ctx.args.integration_account, + required=True, + ), + **self.serialize_url_param( + "mapName", self.ctx.args.map_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2019-05-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_integration_account_map_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("location", AAZStrType, ".location") + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("content", AAZStrType, ".content") + properties.set_prop("contentType", AAZStrType, ".content_type") + properties.set_prop("mapType", AAZStrType, ".map_type", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_integration_account_map_read = None + + @classmethod + def _build_schema_integration_account_map_read(cls, _schema): + if cls._schema_integration_account_map_read is not None: + _schema.id = cls._schema_integration_account_map_read.id + _schema.location = cls._schema_integration_account_map_read.location + _schema.name = cls._schema_integration_account_map_read.name + _schema.properties = cls._schema_integration_account_map_read.properties + _schema.tags = cls._schema_integration_account_map_read.tags + _schema.type = cls._schema_integration_account_map_read.type + return + + cls._schema_integration_account_map_read = _schema_integration_account_map_read = AAZObjectType() + + integration_account_map_read = _schema_integration_account_map_read + integration_account_map_read.id = AAZStrType( + flags={"read_only": True}, + ) + integration_account_map_read.location = AAZStrType() + integration_account_map_read.name = AAZStrType( + flags={"read_only": True}, + ) + integration_account_map_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + integration_account_map_read.tags = AAZDictType() + integration_account_map_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_integration_account_map_read.properties + properties.changed_time = AAZStrType( + serialized_name="changedTime", + flags={"read_only": True}, + ) + properties.content = AAZStrType() + properties.content_link = AAZObjectType( + serialized_name="contentLink", + ) + properties.content_type = AAZStrType( + serialized_name="contentType", + ) + properties.created_time = AAZStrType( + serialized_name="createdTime", + flags={"read_only": True}, + ) + properties.map_type = AAZStrType( + serialized_name="mapType", + flags={"required": True}, + ) + properties.parameters_schema = AAZObjectType( + serialized_name="parametersSchema", + ) + + content_link = _schema_integration_account_map_read.properties.content_link + content_link.content_hash = AAZObjectType( + serialized_name="contentHash", + ) + content_link.content_size = AAZIntType( + serialized_name="contentSize", + flags={"read_only": True}, + ) + content_link.content_version = AAZStrType( + serialized_name="contentVersion", + flags={"read_only": True}, + ) + content_link.uri = AAZStrType() + + content_hash = _schema_integration_account_map_read.properties.content_link.content_hash + content_hash.algorithm = AAZStrType() + content_hash.value = AAZStrType() + + parameters_schema = _schema_integration_account_map_read.properties.parameters_schema + parameters_schema.ref = AAZStrType() + + tags = _schema_integration_account_map_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_integration_account_map_read.id + _schema.location = cls._schema_integration_account_map_read.location + _schema.name = cls._schema_integration_account_map_read.name + _schema.properties = cls._schema_integration_account_map_read.properties + _schema.tags = cls._schema_integration_account_map_read.tags + _schema.type = cls._schema_integration_account_map_read.type + + +__all__ = ["Update"] diff --git a/src/logic/azext_logic/azext_metadata.json b/src/logic/azext_logic/azext_metadata.json index cf7b8927a07..9491320bc7d 100644 --- a/src/logic/azext_logic/azext_metadata.json +++ b/src/logic/azext_logic/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.15.0" -} + "azext.minCliCoreVersion": "2.48.0" +} \ No newline at end of file diff --git a/src/logic/azext_logic/generated/_client_factory.py b/src/logic/azext_logic/generated/_client_factory.py index a8df4e1760d..76213b3a962 100644 --- a/src/logic/azext_logic/generated/_client_factory.py +++ b/src/logic/azext_logic/generated/_client_factory.py @@ -11,8 +11,8 @@ def cf_logic(cli_ctx, *_): def cf_workflow(cli_ctx, *_): - return cf_logic(cli_ctx).workflow + return cf_logic(cli_ctx).workflows def cf_integration_account(cli_ctx, *_): - return cf_logic(cli_ctx).integration_account + return cf_logic(cli_ctx).integration_accounts diff --git a/src/logic/azext_logic/manual/commands.py b/src/logic/azext_logic/manual/commands.py new file mode 100644 index 00000000000..d8f74c3d247 --- /dev/null +++ b/src/logic/azext_logic/manual/commands.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def load_command_table(self, _): # pylint: disable=unused-argument + with self.command_group('logic integration-account map'): + from azext_logic.manual.custom import MapCreate, MapUpdate + self.command_table['logic integration-account map create'] = MapCreate(loader=self) + self.command_table['logic integration-account map update'] = MapUpdate(loader=self) diff --git a/src/logic/azext_logic/manual/custom.py b/src/logic/azext_logic/manual/custom.py index 2f894f87a50..13defa45b80 100644 --- a/src/logic/azext_logic/manual/custom.py +++ b/src/logic/azext_logic/manual/custom.py @@ -3,7 +3,43 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +# pylint: disable=too-many-lines, unused-argument, protected-access + from knack.util import CLIError +from azure.cli.core.aaz import has_value +from azext_logic.aaz.latest.logic.integration_account.map import Create as _MapCreate +from azext_logic.aaz.latest.logic.integration_account.map import Update as _MapUpdate + + +def logic_workflow_create(cmd, client, + resource_group_name, + name, + definition, + location, + tags=None, + state=None, + endpoints_configuration=None, + access_control=None, + integration_account=None, + integration_service_environment=None): + if 'definition' not in definition: + raise CLIError(str(definition) + + " does not contain a 'definition' key") + workflow = { + 'location': location, + 'tags': tags, + 'state': state, + 'endpoints_configuration': endpoints_configuration, + 'access_control': definition.get( + 'accessControl', access_control), + 'integration_account': integration_account, + 'integration_service_environment': integration_service_environment, + 'definition': definition['definition'], + 'parameters': definition.get('parameters', None) + } + return client.create_or_update(resource_group_name=resource_group_name, + workflow_name=name, + workflow=workflow) def logic_workflow_update(cmd, @@ -13,7 +49,6 @@ def logic_workflow_update(cmd, definition=None, tags=None, state=None): - from azure.cli.core.azclierror import ValidationError if definition is not None and "definition" not in definition: @@ -21,7 +56,6 @@ def logic_workflow_update(cmd, workflow = client.get(resource_group_name=resource_group_name, workflow_name=name) - from ..generated.custom import logic_workflow_create return logic_workflow_create( cmd, client, @@ -35,3 +69,114 @@ def logic_workflow_update(cmd, integration_account=workflow.integration_account, integration_service_environment=workflow.integration_service_environment, ) + + +def logic_integration_account_create(cmd, client, + resource_group_name, + name, + location=None, + tags=None, + sku=None, + integration_service_environment=None, + state=None): + import json + if isinstance(integration_service_environment, str): + integration_service_environment = json.loads( + integration_service_environment) + integration_account = { + 'location': location, + 'tags': tags, + 'sku': {'name': sku}, + 'integration_service_environment': integration_service_environment, + 'state': state if state else 'Enabled', + } + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=name, + integration_account=integration_account) + + +def logic_integration_account_import(cmd, client, + resource_group_name, + name, + input_path, + location=None, + tags=None, + sku=None, ): + if 'properties' not in input_path: + raise CLIError(str(input_path) + + " does not contain a 'properties' key") + + integration_service_environment = input_path['properties'].get( + 'integrationServiceEnvironment', None) + integration_account = { + 'location': input_path.get('location', location), + 'tags': input_path.get('tags', tags), + 'sku': input_path.get('sku', {'name': sku}), + 'integration_service_environment': integration_service_environment, + 'state': input_path['properties'].get('state', 'Enabled'), + } + return client.create_or_update(resource_group_name=resource_group_name, + integration_account_name=name, + integration_account=integration_account) + + +def logic_integration_account_update(cmd, client, + name, + resource_group_name, + tags=None, + sku=None, + integration_service_environment=None, + state=None): + import json + if isinstance(integration_service_environment, str): + integration_service_environment = json.loads( + integration_service_environment) + integration_account = { + 'location': None, + 'tags': tags, + 'sku': {'name': sku}, + 'integration_service_environment': integration_service_environment, + 'state': state, + } + return client.update(resource_group_name=resource_group_name, + integration_account_name=name, + integration_account=integration_account) + + +class MapCreate(_MapCreate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZFileArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.map_content = AAZFileArg( + options=["--map-content"], + help="The content.", + ) + args_schema.content._registered = False + return args_schema + + def pre_operations(self): + args = self.ctx.args + if has_value(args.map_content): + args.content = args.map_content + + +class MapUpdate(_MapUpdate): + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + from azure.cli.core.aaz import AAZFileArg + args_schema = super()._build_arguments_schema(*args, **kwargs) + args_schema.map_content = AAZFileArg( + options=["--map-content"], + help="The content.", + ) + args_schema.content._registered = False + return args_schema + + def pre_instance_update(self, instance): + if has_value(self.ctx.args.content_type): + return + if instance.properties.map_type in ['Xslt', 'Xslt20', 'Xslt30']: + instance.properties.content_type = 'application/xml' + if instance.properties.map_type == 'Liquid': + instance.properties.content_type = 'text/plain' diff --git a/src/logic/azext_logic/tests/latest/map_content.txt b/src/logic/azext_logic/tests/latest/map_content.txt new file mode 100644 index 00000000000..bd7b280f417 --- /dev/null +++ b/src/logic/azext_logic/tests/latest/map_content.txt @@ -0,0 +1 @@ + diff --git a/src/logic/azext_logic/tests/latest/recordings/test_integration_account_map.yaml b/src/logic/azext_logic/tests/latest/recordings/test_integration_account_map.yaml new file mode 100644 index 00000000000..7875d8f8e59 --- /dev/null +++ b/src/logic/azext_logic/tests/latest/recordings/test_integration_account_map.yaml @@ -0,0 +1,475 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account create + Connection: + - keep-alive + ParameterSetName: + - -g -n --sku + User-Agent: + - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_integration_account_map","date":"2023-06-26T02:11:18Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '365' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:22 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "sku": {"name": "standard"}, "properties": {"state": + "Enabled"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account create + Connection: + - keep-alive + Content-Length: + - '87' + Content-Type: + - application/json + ParameterSetName: + - -g -n --sku + User-Agent: + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002?api-version=2019-05-01 + response: + body: + string: '{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002","name":"acc000002","type":"Microsoft.Logic/integrationAccounts","location":"westus"}' + headers: + cache-control: + - no-cache + content-length: + - '291' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:28 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map create + Connection: + - keep-alive + ParameterSetName: + - -g -n --integration-account --map-type --content-type --map-content + User-Agent: + - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_integration_account_map","date":"2023-06-26T02:11:18Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '365' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"content": " \n", + "contentType": "application/xml", "mapType": "Xslt"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map create + Connection: + - keep-alive + Content-Length: + - '3156' + Content-Type: + - application/json + ParameterSetName: + - -g -n --integration-account --map-type --content-type --map-content + User-Agent: + - AZURECLI/2.48.1 (AAZ) azsdk-python-core/1.26.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003?api-version=2019-05-01 + response: + body: + string: '{"properties":{"mapType":"Xslt","contentLink":{"uri":"https://prod-24.westus.logic.azure.com:443/integrationAccounts/6e310e003efe442fa2cfbff1ac6dd2ba/maps/map000003/contents/Value?api-version=2015-08-01-preview&se=2023-06-26T06%3A11%3A31.5487533Z&sp=%2Fmaps%2Fmap000003%2Fread&sv=1.0&sig=0xvq63zs5a-pBTfSaEXQi10Y8aqVUNg5XEmxuj1TBws","contentSize":2955},"createdTime":"2023-06-26T02:11:31.4944874Z","changedTime":"2023-06-26T02:11:31.4956517Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003","name":"map000003","type":"Microsoft.Logic/integrationAccounts/maps"}' + headers: + cache-control: + - no-cache + content-length: + - '675' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:30 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map update + Connection: + - keep-alive + ParameterSetName: + - -g -n --integration-account + User-Agent: + - AZURECLI/2.48.1 azsdk-python-azure-mgmt-resource/22.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_integration_account_map","date":"2023-06-26T02:11:18Z","module":"logic"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '365' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map update + Connection: + - keep-alive + ParameterSetName: + - -g -n --integration-account + User-Agent: + - AZURECLI/2.48.1 (AAZ) azsdk-python-core/1.26.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003?api-version=2019-05-01 + response: + body: + string: '{"properties":{"mapType":"Xslt","contentLink":{"uri":"https://prod-24.westus.logic.azure.com:443/integrationAccounts/6e310e003efe442fa2cfbff1ac6dd2ba/maps/map000003/contents/Value?api-version=2015-08-01-preview&se=2023-06-26T06%3A11%3A34.3918116Z&sp=%2Fmaps%2Fmap000003%2Fread&sv=1.0&sig=YJdv45jUNbJU9-DlT5cKn-SdF3lqFXvsetXtxciTBXo","contentSize":2955},"createdTime":"2023-06-26T02:11:31.4944874Z","changedTime":"2023-06-26T02:11:31.4956517Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003","name":"map000003","type":"Microsoft.Logic/integrationAccounts/maps"}' + headers: + cache-control: + - no-cache + content-length: + - '675' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:33 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"contentLink": {"uri": "https://prod-24.westus.logic.azure.com:443/integrationAccounts/6e310e003efe442fa2cfbff1ac6dd2ba/maps/map000003/contents/Value?api-version=2015-08-01-preview&se=2023-06-26T06%3A11%3A34.3918116Z&sp=%2Fmaps%2Fmap000003%2Fread&sv=1.0&sig=YJdv45jUNbJU9-DlT5cKn-SdF3lqFXvsetXtxciTBXo"}, + "contentType": "application/xml", "mapType": "Xslt"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map update + Connection: + - keep-alive + Content-Length: + - '396' + Content-Type: + - application/json + ParameterSetName: + - -g -n --integration-account + User-Agent: + - AZURECLI/2.48.1 (AAZ) azsdk-python-core/1.26.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003?api-version=2019-05-01 + response: + body: + string: '{"properties":{"mapType":"Xslt","contentLink":{"uri":"https://prod-24.westus.logic.azure.com:443/integrationAccounts/6e310e003efe442fa2cfbff1ac6dd2ba/maps/map000003/contents/Value?api-version=2015-08-01-preview&se=2023-06-26T06%3A11%3A35.1574920Z&sp=%2Fmaps%2Fmap000003%2Fread&sv=1.0&sig=CHFHB5bBuSz8OAMGtOtZUOsauN23f0DHemas3ut56t8","contentSize":2955},"createdTime":"2023-06-26T02:11:31.4944874Z","changedTime":"2023-06-26T02:11:35.1312678Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003","name":"map000003","type":"Microsoft.Logic/integrationAccounts/maps"}' + headers: + cache-control: + - no-cache + content-length: + - '675' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:34 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map show + Connection: + - keep-alive + ParameterSetName: + - -g -n --integration-account + User-Agent: + - AZURECLI/2.48.1 (AAZ) azsdk-python-core/1.26.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003?api-version=2019-05-01 + response: + body: + string: '{"properties":{"mapType":"Xslt","contentLink":{"uri":"https://prod-24.westus.logic.azure.com:443/integrationAccounts/6e310e003efe442fa2cfbff1ac6dd2ba/maps/map000003/contents/Value?api-version=2015-08-01-preview&se=2023-06-26T06%3A11%3A37.0118913Z&sp=%2Fmaps%2Fmap000003%2Fread&sv=1.0&sig=JIaceOiv62ITu13MyM2YnxvAi0TV_FeIy2jSdVKBQ1o","contentSize":2955},"createdTime":"2023-06-26T02:11:31.4944874Z","changedTime":"2023-06-26T02:11:35.1312678Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003","name":"map000003","type":"Microsoft.Logic/integrationAccounts/maps"}' + headers: + cache-control: + - no-cache + content-length: + - '675' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map list + Connection: + - keep-alive + ParameterSetName: + - -g --integration-account + User-Agent: + - AZURECLI/2.48.1 (AAZ) azsdk-python-core/1.26.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps?api-version=2019-05-01 + response: + body: + string: '{"value":[{"properties":{"mapType":"Xslt","contentLink":{"uri":"https://prod-24.westus.logic.azure.com:443/integrationAccounts/6e310e003efe442fa2cfbff1ac6dd2ba/maps/map000003/contents/Value?api-version=2015-08-01-preview&se=2023-06-26T06%3A11%3A38.9164614Z&sp=%2Fmaps%2Fmap000003%2Fread&sv=1.0&sig=FNfsaWVmkJoKzclDT_pA7vsl3U4oOlD_MsAT2XcdXeI","contentSize":2955},"createdTime":"2023-06-26T02:11:31.4944874Z","changedTime":"2023-06-26T02:11:35.1312678Z"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003","name":"map000003","type":"Microsoft.Logic/integrationAccounts/maps"}]}' + headers: + cache-control: + - no-cache + content-length: + - '687' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 26 Jun 2023 02:11:38 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - logic integration-account map delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --integration-account -y + User-Agent: + - AZURECLI/2.48.1 (AAZ) azsdk-python-core/1.26.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Logic/integrationAccounts/acc000002/maps/map000003?api-version=2019-05-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 26 Jun 2023 02:11:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +version: 1 diff --git a/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml b/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml index 922f183b6ac..31b702550ba 100644 --- a/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml +++ b/src/logic/azext_logic/tests/latest/recordings/test_logic.yaml @@ -18,7 +18,7 @@ interactions: ParameterSetName: - --location --sku --name --resource-group User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -28,11 +28,11 @@ interactions: cache-control: - no-cache content-length: - - '383' + - '305' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:13 GMT + - Mon, 26 Jun 2023 03:43:02 GMT expires: - '-1' pragma: @@ -65,7 +65,7 @@ interactions: ParameterSetName: - --location --input-path --name --resource-group User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -75,11 +75,11 @@ interactions: cache-control: - no-cache content-length: - - '383' + - '305' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:15 GMT + - Mon, 26 Jun 2023 03:43:04 GMT expires: - '-1' pragma: @@ -121,21 +121,21 @@ interactions: ParameterSetName: - --resource-group --location --definition --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:23.5191967Z","changedTime":"2022-01-24T07:27:23.5082967Z","state":"Enabled","version":"08585585976419894334","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' headers: cache-control: - no-cache content-length: - - '1945' + - '2088' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:25 GMT + - Mon, 26 Jun 2023 03:43:10 GMT expires: - '-1' pragma: @@ -163,21 +163,21 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: body: - string: '{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004","name":"cli_test_000004","type":"Microsoft.Logic/integrationAccounts","location":"centralus"}' + string: '{"properties":{"state":"Enabled","provisioningState":"Succeeded"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004","name":"cli_test_000004","type":"Microsoft.Logic/integrationAccounts","location":"centralus"}' headers: cache-control: - no-cache content-length: - - '383' + - '337' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:27 GMT + - Mon, 26 Jun 2023 03:43:12 GMT expires: - '-1' pragma: @@ -207,21 +207,21 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:23.5191967Z","changedTime":"2022-01-24T07:27:23.5082967Z","state":"Enabled","version":"08585585976419894334","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' headers: cache-control: - no-cache content-length: - - '1945' + - '2088' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:28 GMT + - Mon, 26 Jun 2023 03:43:14 GMT expires: - '-1' pragma: @@ -235,7 +235,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '19998' + - '19999' status: code: 200 message: OK @@ -253,7 +253,7 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts?api-version=2019-05-01 response: @@ -263,11 +263,11 @@ interactions: cache-control: - no-cache content-length: - - '395' + - '317' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:30 GMT + - Mon, 26 Jun 2023 03:43:17 GMT expires: - '-1' pragma: @@ -297,21 +297,21 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows?api-version=2019-05-01 response: body: - string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:23.5191967Z","changedTime":"2022-01-24T07:27:23.5082967Z","state":"Enabled","version":"08585585976419894334","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}]}' + string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}]}' headers: cache-control: - no-cache content-length: - - '1957' + - '2100' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:33 GMT + - Mon, 26 Jun 2023 03:43:18 GMT expires: - '-1' pragma: @@ -341,33 +341,34 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Logic/integrationAccounts?api-version=2019-05-01 response: body: - string: '{"value":[{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004","name":"cli_test_000004","type":"Microsoft.Logic/integrationAccounts","location":"centralus"}]}' + string: '{"value":[{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004","name":"cli_test_000004","type":"Microsoft.Logic/integrationAccounts","location":"centralus"},{"properties":{"state":"Enabled"},"sku":{"name":"Standard"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lgtest/providers/Microsoft.Logic/integrationAccounts/iacc1","name":"iacc1","type":"Microsoft.Logic/integrationAccounts","location":"eastus"}]}' headers: cache-control: - no-cache content-length: - - '395' + - '591' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:35 GMT + - Mon, 26 Jun 2023 03:43:20 GMT expires: - '-1' pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding x-content-type-options: - nosniff + x-ms-original-request-ids: + - centralus:f6550be8-9491-48c7-8ce3-ba3904e96415 + - eastus:27bcf5e7-4583-4118-b80b-61e53d13ccb8 status: code: 200 message: OK @@ -383,23 +384,28 @@ interactions: Connection: - keep-alive User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Logic/workflows?api-version=2019-05-01 response: body: - string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:23.5191967Z","changedTime":"2022-01-24T07:27:23.5082967Z","state":"Enabled","version":"08585585976419894334","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T04:01:33.1510349Z","changedTime":"2022-01-24T05:32:34.5054983Z","state":"Enabled","version":"08585586045309732017","accessEndpoint":"https://prod-185.westus.logic.azure.com:443/workflows/2fc344d1d95b4c45961142b761e30de8","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"accessControl":{"contents":{"allowedCallerIpAddresses":[{"addressRange":"10.0.0.0/24"}]}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli-test-rg/providers/Microsoft.Logic/workflows/yu-test-wf","name":"yu-test-wf","type":"Microsoft.Logic/workflows","location":"westus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2019-11-18T06:41:01.5064237Z","changedTime":"2021-04-21T05:57:33.1094235Z","state":"Enabled","version":"08585826222323923767","accessEndpoint":"https://prod-29.westus.logic.azure.com:443/workflows/cf5bb036a7fa41d4ad8b964d5eea3343","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Trigger_at_18:00_every_day":{"recurrence":{"frequency":"Day","interval":1,"schedule":{"hours":["18"]},"timeZone":"China + string: '{"value":[{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2019-11-18T06:41:01.5064237Z","changedTime":"2023-05-09T01:58:21.8749723Z","state":"Enabled","version":"08585180093836149808","accessEndpoint":"https://prod-29.westus.logic.azure.com:443/workflows/cf5bb036a7fa41d4ad8b964d5eea3343","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Trigger_at_Mon,_Wed,_Sat_every_week":{"recurrence":{"frequency":"Week","interval":1,"schedule":{"hours":["18"],"weekDays":["Monday","Wednesday","Saturday"]},"timeZone":"China + Standard Time"},"evaluatedRecurrence":{"frequency":"Week","interval":1,"schedule":{"hours":["18"],"weekDays":["Monday","Wednesday","Saturday"]},"timeZone":"China Standard Time"},"type":"Recurrence"}},"actions":{"Delete_resource_groups":{"foreach":"@body(''Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"'')","actions":{"Delete_a_resource_group":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(items(''Delete_resource_groups'')?[''name''])}","queries":{"x-ms-api-version":"2016-06-01"}}}},"runAfter":{"Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"":["Succeeded"]},"type":"Foreach"},"Filter_elements_except_resource_group_name_is_equal_to_\"AzureSDKTest_reserved\"":{"runAfter":{"List_resource_groups":["Succeeded"]},"type":"Query","inputs":{"from":"@body(''List_resource_groups'')?[''value'']","where":"@not(equals(item()?[''name''], - ''AzureSDKTest_reserved''))"}},"List_resource_groups":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups","queries":{"x-ms-api-version":"2016-06-01"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm_1":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm-1","connectionName":"arm-1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/AzureSDKTest_ScheduledCleaner","name":"AzureSDKTest_ScheduledCleaner","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2020-04-24T06:33:36.5052747Z","changedTime":"2020-04-24T06:33:36.4986025Z","state":"Enabled","version":"08586138968690384726","accessEndpoint":"https://prod-123.westus.logic.azure.com:443/workflows/72b1a436cf5a4f65950d224869dd7484","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{},"triggers":{},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/FetchModules","name":"FetchModules","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2019-11-25T03:03:51.6406922Z","changedTime":"2020-03-02T03:30:46.8880289Z","state":"Disabled","version":"08586184870386928444","accessEndpoint":"https://prod-52.westus.logic.azure.com:443/workflows/ad25d96f848444caaf7c4ec48853fbcf","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Recurrence":{"recurrence":{"frequency":"Day","interval":3},"type":"Recurrence"}},"actions":{"List_resource_groups":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups","queries":{"x-ms-api-version":"2016-06-01"}}},"Run_query_and_list_results":{"runAfter":{"List_resource_groups":["Succeeded"]},"type":"ApiConnection","inputs":{"body":"[].eventTimestamp","host":{"connection":{"name":"@parameters(''$connections'')[''azuremonitorlogs''][''connectionId'']"}},"method":"post","path":"/queryData","queries":{"resourcegroups":"new-experiences","resourcename":"Microsoft.ClassicCompute","resourcetype":"virtualMachines","subscriptions":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","timerange":"60"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm","connectionName":"arm","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"},"azuremonitorlogs":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/azuremonitorlogs","connectionName":"azuremonitorlogs","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/azuremonitorlogs"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/TestLogicApp","name":"TestLogicApp","type":"Microsoft.Logic/workflows","location":"westus","tags":{}}]}' + ''AzureSDKTest_reserved''))"}},"List_resource_groups":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups","queries":{"x-ms-api-version":"2016-06-01"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm_1":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm-1","connectionName":"arm-1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/AzureSDKTest_ScheduledCleaner","name":"AzureSDKTest_ScheduledCleaner","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2020-04-24T06:33:36.5052747Z","changedTime":"2020-04-24T06:33:36.4986025Z","state":"Enabled","version":"08586138968690384726","accessEndpoint":"https://prod-123.westus.logic.azure.com:443/workflows/72b1a436cf5a4f65950d224869dd7484","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{},"triggers":{},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/FetchModules","name":"FetchModules","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2022-07-05T02:21:31.5244292Z","changedTime":"2023-05-11T10:14:57.8703848Z","state":"Enabled","version":"08585178067876160392","accessEndpoint":"https://prod-179.westus.logic.azure.com:443/workflows/9744517e1ea54c55b94046389d510479","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Trigger_at_6pm_every_day":{"recurrence":{"frequency":"Day","interval":1,"schedule":{"hours":["18"]},"timeZone":"China + Standard Time"},"evaluatedRecurrence":{"frequency":"Day","interval":1,"schedule":{"hours":["18"]},"timeZone":"China + Standard Time"},"type":"Recurrence"}},"actions":{"Delete_VM":{"foreach":"@body(''List_VM'')?[''value'']","actions":{"Delete_a_VM":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(toLower(items(''Delete_VM'')?[''id'']),''resourcegroups/'')[1])}","queries":{"x-ms-api-version":"2022-03-01"}}}},"runAfter":{"List_VM":["Succeeded"]},"type":"Foreach"},"Delete_VM_resourcegroup":{"foreach":"@body(''List_VM'')?[''value'']","actions":{"Delete_a_VM_resourcegroup":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(split(toLower(items(''Delete_VM_resourcegroup'')?[''id'']),''resourcegroups/'')[1],''/providers'')[0])}","queries":{"x-ms-api-version":"2016-06-01"}}}},"runAfter":{"List_VM":["Succeeded"]},"type":"Foreach"},"Delete_public_ip":{"foreach":"@body(''List_public_ip'')?[''value'']","actions":{"Delete_a_public_ip":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(toLower(items(''Delete_public_ip'')?[''id'']),''resourcegroups/'')[1])}","queries":{"x-ms-api-version":"2021-08-01"}}}},"runAfter":{"List_public_ip":["Succeeded"]},"type":"Foreach"},"Delete_public_ip_resourcegroup":{"foreach":"@body(''List_public_ip'')?[''value'']","actions":{"Delete_a_public_ip_resourcegroup":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"delete","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups/@{encodeURIComponent(split(split(toLower(items(''Delete_public_ip_resourcegroup'')?[''id'']),''resourcegroups/'')[1],''/providers'')[0])}","queries":{"x-ms-api-version":"2016-06-01"}}}},"runAfter":{"List_public_ip":["Succeeded"]},"type":"Foreach"},"List_VM":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/providers/Microsoft.Compute/virtualMachines","queries":{"x-ms-api-version":"2022-03-01"}}},"List_public_ip":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm_1''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/providers/Microsoft.Network/publicIPAddresses","queries":{"x-ms-api-version":"2021-08-01"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm_1":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm-1","connectionName":"arm-1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/HighRiskResource_ScheduledCleaner","name":"HighRiskResource_ScheduledCleaner","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2019-11-25T03:03:51.6406922Z","changedTime":"2020-03-02T03:30:46.8880289Z","state":"Disabled","version":"08586184870386928444","accessEndpoint":"https://prod-52.westus.logic.azure.com:443/workflows/ad25d96f848444caaf7c4ec48853fbcf","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"Recurrence":{"recurrence":{"frequency":"Day","interval":3},"type":"Recurrence"}},"actions":{"List_resource_groups":{"runAfter":{},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''arm''][''connectionId'']"}},"method":"get","path":"/subscriptions/@{encodeURIComponent(''0b1f6471-1bf0-4dda-aec3-cb9272f09590'')}/resourcegroups","queries":{"x-ms-api-version":"2016-06-01"}}},"Run_query_and_list_results":{"runAfter":{"List_resource_groups":["Succeeded"]},"type":"ApiConnection","inputs":{"body":"[].eventTimestamp","host":{"connection":{"name":"@parameters(''$connections'')[''azuremonitorlogs''][''connectionId'']"}},"method":"post","path":"/queryData","queries":{"resourcegroups":"new-experiences","resourcename":"Microsoft.ClassicCompute","resourcetype":"virtualMachines","subscriptions":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","timerange":"60"}}}},"outputs":{}},"parameters":{"$connections":{"value":{"arm":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/arm","connectionName":"arm","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/arm"},"azuremonitorlogs":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Web/connections/azuremonitorlogs","connectionName":"azuremonitorlogs","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/westus/managedApis/azuremonitorlogs"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"52.160.92.112"},{"address":"40.118.244.241"},{"address":"40.118.241.243"},{"address":"157.56.162.53"},{"address":"157.56.167.147"},{"address":"104.42.49.145"},{"address":"40.83.164.80"},{"address":"104.42.38.32"},{"address":"13.86.223.0"},{"address":"13.86.223.1"},{"address":"13.86.223.2"},{"address":"13.86.223.3"},{"address":"13.86.223.4"},{"address":"13.86.223.5"},{"address":"104.40.34.169"},{"address":"104.40.32.148"},{"address":"52.160.70.221"},{"address":"52.160.70.105"},{"address":"13.91.81.221"},{"address":"13.64.231.196"},{"address":"13.87.204.182"},{"address":"40.78.65.193"},{"address":"13.87.207.39"},{"address":"104.42.44.28"},{"address":"40.83.134.97"},{"address":"40.78.65.112"},{"address":"168.62.9.74"},{"address":"168.62.28.191"}],"accessEndpointIpAddresses":[{"address":"52.160.90.237"},{"address":"138.91.188.137"},{"address":"13.91.252.184"},{"address":"157.56.160.212"},{"address":"104.40.34.112"},{"address":"52.160.68.27"},{"address":"13.88.168.158"},{"address":"104.42.40.164"},{"address":"13.87.207.79"},{"address":"13.87.204.210"},{"address":"168.62.9.100"}]},"connector":{"outgoingIpAddresses":[{"address":"13.93.148.62"},{"address":"104.42.122.49"},{"address":"40.112.195.87"},{"address":"13.86.223.32/27"},{"address":"40.112.243.160/28"},{"address":"20.59.77.0/27"},{"address":"20.66.6.112/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureSDKTest_reserved/providers/Microsoft.Logic/workflows/TestLogicApp","name":"TestLogicApp","type":"Microsoft.Logic/workflows","location":"westus","tags":{}},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T02:53:44.7803191Z","changedTime":"2023-06-26T02:58:14.6682465Z","state":"Enabled","version":"08585138585908197008","accessEndpoint":"https://prod-06.eastus.logic.azure.com:443/workflows/651218ee23a1404fadd59d57b182daf4","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"manual":{"type":"Request","kind":"Http","inputs":{"method":"POST","schema":{"properties":{"content":{"type":"string"},"subject":{"type":"string"},"to":{"type":"string"}},"type":"object"}}}},"actions":{"Send_an_email_(V2)":{"runAfter":{},"type":"ApiConnection","inputs":{"body":{"Body":"

@{triggerBody()?[''content'']}

","Importance":"Normal","Subject":"@triggerBody()?[''subject'']","To":"@triggerBody()?[''to'']"},"host":{"connection":{"name":"@parameters(''$connections'')[''office365''][''connectionId'']"}},"method":"post","path":"/v2/Mail"}}},"outputs":{}},"parameters":{"$connections":{"value":{"office365":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Web/connections/office365","connectionName":"office365","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/eastus/managedApis/office365"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Logic/workflows/SendMail","name":"SendMail","type":"Microsoft.Logic/workflows","location":"eastus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:00:51.7499166Z","changedTime":"2023-06-26T03:07:04.8617385Z","state":"Enabled","version":"08585138580606248885","accessEndpoint":"https://prod-64.eastus.logic.azure.com:443/workflows/a33ef5180fe145109b3e7dca39c74243","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"manual":{"type":"Request","kind":"Http","inputs":{"method":"POST","schema":{"properties":{"content":{"type":"string"},"title":{"type":"string"},"to":{"type":"string"}},"type":"object"}}}},"actions":{"Create_a_chat":{"runAfter":{},"type":"ApiConnection","inputs":{"body":{"members":"@triggerBody()?[''to'']","topic":"@triggerBody()?[''title'']"},"host":{"connection":{"name":"@parameters(''$connections'')[''teams''][''connectionId'']"}},"method":"post","path":"/beta/chats"}},"Get_an_@mention_token_for_a_user":{"runAfter":{"Create_a_chat":["Succeeded"]},"type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''teams''][''connectionId'']"}},"method":"get","path":"/v1.0/users/@{encodeURIComponent(triggerBody()?[''to''])}"}},"Post_message_in_a_chat_or_channel":{"runAfter":{"Get_an_@mention_token_for_a_user":["Succeeded"]},"type":"ApiConnection","inputs":{"body":{"messageBody":"

Hi + @{body(''Get_an_@mention_token_for_a_user'')?[''atMention'']},
\n@{triggerBody()?[''content'']}

","recipient":"@body(''Create_a_chat'')?[''id'']"},"host":{"connection":{"name":"@parameters(''$connections'')[''teams''][''connectionId'']"}},"method":"post","path":"/beta/teams/conversation/message/poster/@{encodeURIComponent(''User'')}/location/@{encodeURIComponent(''Group + chat'')}"}}},"outputs":{}},"parameters":{"$connections":{"value":{"teams":{"connectionId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Web/connections/teams","connectionName":"teams","id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/eastus/managedApis/teams"}}}},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/AzureClientToolsAutomation/providers/Microsoft.Logic/workflows/SendTeams","name":"SendTeams","type":"Microsoft.Logic/workflows","location":"eastus"},{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T02:34:20.53214Z","changedTime":"2023-06-26T02:35:32.3882186Z","state":"Enabled","version":"08585138599531032717","accessEndpoint":"https://prod-57.eastus.logic.azure.com:443/workflows/b978151f07bd4058aec3acd528211234","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"},{"address":"52.226.216.197"},{"address":"52.226.216.187"},{"address":"40.76.151.25"},{"address":"40.76.148.50"},{"address":"20.84.29.29"},{"address":"20.84.29.18"},{"address":"40.76.174.83"},{"address":"40.76.174.39"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"},{"address":"52.226.216.209"},{"address":"40.76.151.124"},{"address":"20.84.29.150"},{"address":"40.76.174.148"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.249.139"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.11.80/28"},{"address":"40.71.15.160/27"},{"address":"52.188.157.160"},{"address":"20.88.153.176/28"},{"address":"20.88.153.192/27"},{"address":"52.151.221.184"},{"address":"52.151.221.119"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/lgtest/providers/Microsoft.Logic/workflows/wf1","name":"wf1","type":"Microsoft.Logic/workflows","location":"eastus","identity":{"type":"SystemAssigned","principalId":"d37820de-597b-4ce3-8887-b2c37eb80b91","tenantId":"54826b22-38d6-4fb2-bad9-b7b93a3e9c5a"}}]}' headers: cache-control: - no-cache content-length: - - '12225' + - '26660' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:37 GMT + - Mon, 26 Jun 2023 03:43:21 GMT expires: - '-1' pragma: @@ -411,8 +417,9 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - centralus:7d160240-ef36-4fea-ab30-c8d04fa22cda - - westus:d8e2b45b-5f21-4444-b76b-fcdd85817426 + - centralus:d58073ee-0322-4c48-92d9-4163ecd033db + - westus:1a4e5b1d-c6e9-4697-8cdf-5ae5c7e094ea + - eastus:360f061b-f86b-487d-b519-8156d0d61e13 x-ms-ratelimit-remaining-subscription-resource-requests: - '19999' status: @@ -436,7 +443,7 @@ interactions: ParameterSetName: - --sku --name --resource-group User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -446,11 +453,11 @@ interactions: cache-control: - no-cache content-length: - - '380' + - '302' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:45 GMT + - Mon, 26 Jun 2023 03:43:28 GMT expires: - '-1' pragma: @@ -482,21 +489,21 @@ interactions: ParameterSetName: - --resource-group --tag --definition --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:23.5191967Z","changedTime":"2022-01-24T07:27:23.5082967Z","state":"Enabled","version":"08585585976419894334","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:09.8203656Z","state":"Enabled","version":"08585138558956768772","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":1},"evaluatedRecurrence":{"frequency":"Minute","interval":1},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus"}' headers: cache-control: - no-cache content-length: - - '1945' + - '2088' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:47 GMT + - Mon, 26 Jun 2023 03:43:30 GMT expires: - '-1' pragma: @@ -519,12 +526,15 @@ interactions: "Enabled", "endpointsConfiguration": {"workflow": {"outgoingIpAddresses": [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, - {"address": "23.100.87.56"}, {"address": "23.100.82.16"}], "accessEndpointIpAddresses": - [{"address": "13.67.236.76"}, {"address": "40.77.111.254"}, {"address": "40.77.31.87"}, - {"address": "104.43.243.39"}]}, "connector": {"outgoingIpAddresses": [{"address": + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}], + "accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": "40.77.111.254"}, + {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, {"address": "13.86.98.126"}, + {"address": "20.109.202.37"}]}, "connector": {"outgoingIpAddresses": [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, - {"address": "20.98.145.0/28"}]}}, "definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}}, + "definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": {}, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": {"$connections": {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"inputs": {"host": {"connection": {"name": "@parameters(''$connections'')[''rss''][''connectionId'']"}}, @@ -541,27 +551,27 @@ interactions: Connection: - keep-alive Content-Length: - - '1439' + - '1676' Content-Type: - application/json ParameterSetName: - --resource-group --tag --definition --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:49.5519561Z","changedTime":"2022-01-24T07:27:49.5326592Z","state":"Enabled","version":"08585585976159478845","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:32.6571013Z","changedTime":"2023-06-26T03:43:32.6393672Z","state":"Enabled","version":"08585138558740241614","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' headers: cache-control: - no-cache content-length: - - '1967' + - '2110' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:51 GMT + - Mon, 26 Jun 2023 03:43:37 GMT expires: - '-1' pragma: @@ -593,21 +603,21 @@ interactions: ParameterSetName: - --resource-group --tag --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:23.5191967Z","changedTime":"2022-01-24T07:27:49.5326592Z","state":"Enabled","version":"08585585976159478845","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:09.8214583Z","changedTime":"2023-06-26T03:43:32.6393672Z","state":"Enabled","version":"08585138558740241614","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"123"}}' headers: cache-control: - no-cache content-length: - - '1967' + - '2110' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:53 GMT + - Mon, 26 Jun 2023 03:43:40 GMT expires: - '-1' pragma: @@ -621,7 +631,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-resource-requests: - - '19998' + - '19999' status: code: 200 message: OK @@ -630,12 +640,15 @@ interactions: "Enabled", "endpointsConfiguration": {"workflow": {"outgoingIpAddresses": [{"address": "13.67.236.125"}, {"address": "104.208.25.27"}, {"address": "40.122.170.198"}, {"address": "40.113.218.230"}, {"address": "23.100.86.139"}, {"address": "23.100.87.24"}, - {"address": "23.100.87.56"}, {"address": "23.100.82.16"}], "accessEndpointIpAddresses": - [{"address": "13.67.236.76"}, {"address": "40.77.111.254"}, {"address": "40.77.31.87"}, - {"address": "104.43.243.39"}]}, "connector": {"outgoingIpAddresses": [{"address": + {"address": "23.100.87.56"}, {"address": "23.100.82.16"}, {"address": "52.141.221.6"}, + {"address": "52.141.218.55"}, {"address": "20.109.202.36"}, {"address": "20.109.202.29"}], + "accessEndpointIpAddresses": [{"address": "13.67.236.76"}, {"address": "40.77.111.254"}, + {"address": "40.77.31.87"}, {"address": "104.43.243.39"}, {"address": "13.86.98.126"}, + {"address": "20.109.202.37"}]}, "connector": {"outgoingIpAddresses": [{"address": "52.173.241.27"}, {"address": "52.173.245.164"}, {"address": "13.89.171.80/28"}, {"address": "13.89.178.64/27"}, {"address": "40.77.68.110"}, {"address": "20.98.144.224/27"}, - {"address": "20.98.145.0/28"}]}}, "definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", + {"address": "20.98.145.0/28"}, {"address": "20.80.123.134"}, {"address": "20.80.123.57"}]}}, + "definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "contentVersion": "1.0.0.0", "parameters": {"$connections": {"defaultValue": {}, "type": "Object"}}, "triggers": {"When_a_feed_item_is_published": {"recurrence": {"frequency": "Minute", "interval": 2}, "evaluatedRecurrence": {"frequency": @@ -653,27 +666,27 @@ interactions: Connection: - keep-alive Content-Length: - - '1502' + - '1739' Content-Type: - application/json ParameterSetName: - --resource-group --tag --name User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2022-01-24T07:27:55.0457762Z","changedTime":"2022-01-24T07:27:55.0405252Z","state":"Enabled","version":"08585585976104510389","accessEndpoint":"https://prod-25.centralus.logic.azure.com:443/workflows/f86fd089c6a744278a554786d174203c","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"foo"}}' + string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2023-06-26T03:43:40.9525999Z","changedTime":"2023-06-26T03:43:40.9440926Z","state":"Enabled","version":"08585138558645467342","accessEndpoint":"https://prod-12.centralus.logic.azure.com:443/workflows/2e63547be957434296fc8e533168207b","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{"$connections":{"defaultValue":{},"type":"Object"}},"triggers":{"When_a_feed_item_is_published":{"recurrence":{"frequency":"Minute","interval":2},"evaluatedRecurrence":{"frequency":"Minute","interval":2},"splitOn":"@triggerBody()?[''value'']","type":"ApiConnection","inputs":{"host":{"connection":{"name":"@parameters(''$connections'')[''rss''][''connectionId'']"}},"method":"get","path":"/OnNewFeed","queries":{"feedUrl":"http://feeds.reuters.com/reuters/topNews"}}}},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.67.236.125"},{"address":"104.208.25.27"},{"address":"40.122.170.198"},{"address":"40.113.218.230"},{"address":"23.100.86.139"},{"address":"23.100.87.24"},{"address":"23.100.87.56"},{"address":"23.100.82.16"},{"address":"52.141.221.6"},{"address":"52.141.218.55"},{"address":"20.109.202.36"},{"address":"20.109.202.29"}],"accessEndpointIpAddresses":[{"address":"13.67.236.76"},{"address":"40.77.111.254"},{"address":"40.77.31.87"},{"address":"104.43.243.39"},{"address":"13.86.98.126"},{"address":"20.109.202.37"}]},"connector":{"outgoingIpAddresses":[{"address":"52.173.241.27"},{"address":"52.173.245.164"},{"address":"13.89.171.80/28"},{"address":"13.89.178.64/27"},{"address":"40.77.68.110"},{"address":"20.98.144.224/27"},{"address":"20.98.145.0/28"},{"address":"20.80.123.134"},{"address":"20.80.123.57"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005","name":"cli_test_000005","type":"Microsoft.Logic/workflows","location":"centralus","tags":{"atag":"foo"}}' headers: cache-control: - no-cache content-length: - - '1967' + - '2110' content-type: - application/json; charset=utf-8 date: - - Mon, 24 Jan 2022 07:27:57 GMT + - Mon, 26 Jun 2023 03:43:44 GMT expires: - '-1' pragma: @@ -695,7 +708,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: @@ -707,7 +720,7 @@ interactions: ParameterSetName: - --resource-group --name -y User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000001/providers/Microsoft.Logic/workflows/cli_test_000005?api-version=2019-05-01 response: @@ -719,7 +732,7 @@ interactions: content-length: - '0' date: - - Mon, 24 Jan 2022 07:28:06 GMT + - Mon, 26 Jun 2023 03:43:54 GMT expires: - '-1' pragma: @@ -737,7 +750,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: @@ -749,7 +762,7 @@ interactions: ParameterSetName: - --name --resource-group -y User-Agent: - - AZURECLI/2.26.1 azsdk-python-logicmanagementclient/unknown Python/3.7.8 (Windows-10-10.0.19041-SP0) + - AZURECLI/2.48.1 azsdk-python-mgmt-logic/10.0.0 Python/3.9.10 (Windows-10-10.0.22621-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_000002/providers/Microsoft.Logic/integrationAccounts/cli_test_000004?api-version=2019-05-01 response: @@ -761,7 +774,7 @@ interactions: content-length: - '0' date: - - Mon, 24 Jan 2022 07:28:12 GMT + - Mon, 26 Jun 2023 03:43:59 GMT expires: - '-1' pragma: diff --git a/src/logic/azext_logic/tests/latest/test_logic_scenario.py b/src/logic/azext_logic/tests/latest/test_logic_scenario.py index e6344db5923..da162445930 100644 --- a/src/logic/azext_logic/tests/latest/test_logic_scenario.py +++ b/src/logic/azext_logic/tests/latest/test_logic_scenario.py @@ -7,7 +7,7 @@ from azure.cli.testsdk import JMESPathCheck from azure.cli.testsdk import ScenarioTest -from azure.cli.testsdk import ResourceGroupPreparer +from azure.cli.testsdk import ResourceGroupPreparer, record_only TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) @@ -22,17 +22,16 @@ def current_subscription(self): @ResourceGroupPreparer(name_prefix='cli_test_logic_test-resource-group'[:9], key='rg') @ResourceGroupPreparer(name_prefix='cli_test_logic_testResourceGroup'[:9], key='rg_2') def test_logic(self, resource_group): - - self.kwargs.update({ - 'subscription_id': self.current_subscription() - }) - + curr_dir = os.path.dirname(os.path.realpath(__file__)) self.kwargs.update({ 'testIntegrationAccount': self.create_random_name(prefix='cli_test_integration_accounts'[:9], length=24), 'IntegrationAccounts_2': self.create_random_name(prefix='cli_test_integration_accounts'[:9], length=24), 'testWorkflow': self.create_random_name(prefix='cli_test_workflows'[:9], length=24), 'Workflows_2': self.create_random_name(prefix='cli_test_workflows'[:9], length=24), 'Workflows_3': self.create_random_name(prefix='cli_test_workflows'[:9], length=24), + 'input_path': os.path.join(curr_dir, 'integration.json'), + 'definition_path': os.path.join(curr_dir, 'workflow.json'), + 'definition_path_2': os.path.join(curr_dir, 'workflowupdate.json'), }) self.cmd('az logic integration-account create ' @@ -44,7 +43,7 @@ def test_logic(self, resource_group): self.cmd('az logic integration-account import ' '--location "centralus" ' - '--input-path "src/logic/azext_logic/tests/latest/integration.json" ' + '--input-path "{input_path}" ' '--name "{IntegrationAccounts_2}" ' '--resource-group "{rg_2}" ', checks=[JMESPathCheck('name', self.kwargs.get('IntegrationAccounts_2', ''))]) @@ -52,7 +51,7 @@ def test_logic(self, resource_group): self.cmd('az logic workflow create ' '--resource-group "{rg}" ' '--location "centralus" ' - '--definition "src/logic/azext_logic/tests/latest/workflow.json" ' + '--definition "{definition_path}" ' '--name "{testWorkflow}"', checks=[JMESPathCheck('name', self.kwargs.get('testWorkflow', ''))]) @@ -89,7 +88,7 @@ def test_logic(self, resource_group): self.cmd('az logic workflow update ' '--resource-group "{rg}" ' '--tag atag=123 ' - '--definition "src/logic/azext_logic/tests/latest/workflowupdate.json" ' + '--definition "{definition_path_2}" ' '--name "{testWorkflow}"', checks=[JMESPathCheck('tags.atag', 123), JMESPathCheck('definition.triggers.When_a_feed_item_is_published.recurrence.interval', 2)]) @@ -112,3 +111,35 @@ def test_logic(self, resource_group): '--resource-group "{rg_2}" ' '-y', checks=[]) + + @ResourceGroupPreparer() + def test_integration_account_map(self): + curr_dir = os.path.dirname(os.path.realpath(__file__)) + map_content = os.path.join(curr_dir, 'map_content.txt').replace('\\', '\\\\') + self.kwargs.update({ + 'account': self.create_random_name('acc', 10), + 'map': self.create_random_name('map', 10), + 'content': map_content + }) + self.cmd('logic integration-account create -g {rg} -n {account} --sku standard') + self.cmd('logic integration-account map create -g {rg} -n {map} --integration-account {account} --map-type Xslt --content-type application/xml --map-content {content}', checks=[ + self.check('name', '{map}'), + self.check('mapType', 'Xslt'), + self.exists('contentLink.uri') + ]) + self.cmd('logic integration-account map update -g {rg} -n {map} --integration-account {account}', checks=[ + self.check('name', '{map}'), + self.check('mapType', 'Xslt'), + self.exists('contentLink.uri') + ]) + self.cmd('logic integration-account map show -g {rg} -n {map} --integration-account {account}', checks=[ + self.check('name', '{map}'), + self.check('mapType', 'Xslt'), + self.exists('contentLink.uri') + ]) + self.cmd('logic integration-account map list -g {rg} --integration-account {account}', checks=[ + self.check('[0].name', '{map}'), + self.check('[0].mapType', 'Xslt'), + self.exists('[0].contentLink.uri') + ]) + self.cmd('logic integration-account map delete -g {rg} -n {map} --integration-account {account} -y') diff --git a/src/logic/azext_logic/vendored_sdks/logic/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/__init__.py index 6763259b4b0..ff14d90f557 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/__init__.py @@ -7,4 +7,12 @@ # -------------------------------------------------------------------------- from ._logic_management_client import LogicManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['LogicManagementClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/src/logic/azext_logic/vendored_sdks/logic/_configuration.py b/src/logic/azext_logic/vendored_sdks/logic/_configuration.py index 7c60bd09ba3..dd393060c67 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/_configuration.py +++ b/src/logic/azext_logic/vendored_sdks/logic/_configuration.py @@ -6,42 +6,53 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy -VERSION = "unknown" +from ._version import VERSION -class LogicManagementClientConfiguration(Configuration): +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + + +class LogicManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for LogicManagementClient. Note that all parameters used to create this instance are saved as instance attributes. :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential + :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription id. :type subscription_id: str + :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + super(LogicManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(LogicManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-05-01" - kwargs.setdefault('sdk_moniker', 'logicmanagementclient/{}'.format(VERSION)) + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-logic/{}'.format(VERSION)) self._configure(**kwargs) def _configure( @@ -53,9 +64,10 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, **kwargs) + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py b/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py index 0d8dfe51233..97028a93e61 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py +++ b/src/logic/azext_logic/vendored_sdks/logic/_logic_management_client.py @@ -6,177 +6,186 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional +from copy import deepcopy +from typing import Any, TYPE_CHECKING -from azure.core import PipelineClient from msrest import Deserializer, Serializer -from ._configuration import LogicManagementClientConfiguration -from .operations import WorkflowOperations -from .operations import WorkflowVersionOperations -from .operations import WorkflowTriggerOperations -from .operations import WorkflowVersionTriggerOperations -from .operations import WorkflowTriggerHistoryOperations -from .operations import WorkflowRunOperations -from .operations import WorkflowRunActionOperations -from .operations import WorkflowRunActionRepetitionOperations -from .operations import WorkflowRunActionRepetitionRequestHistoryOperations -from .operations import WorkflowRunActionRequestHistoryOperations -from .operations import WorkflowRunActionScopeRepetitionOperations -from .operations import WorkflowRunOperationOperations -from .operations import IntegrationAccountOperations -from .operations import IntegrationAccountAssemblyOperations -from .operations import IntegrationAccountBatchConfigurationOperations -from .operations import IntegrationAccountSchemaOperations -from .operations import IntegrationAccountMapOperations -from .operations import IntegrationAccountPartnerOperations -from .operations import IntegrationAccountAgreementOperations -from .operations import IntegrationAccountCertificateOperations -from .operations import IntegrationAccountSessionOperations -from .operations import IntegrationServiceEnvironmentOperations -from .operations import IntegrationServiceEnvironmentSkuOperations -from .operations import IntegrationServiceEnvironmentNetworkHealthOperations -from .operations import IntegrationServiceEnvironmentManagedApiOperations -from .operations import IntegrationServiceEnvironmentManagedApiOperationOperations -from .operations import OperationOperations +from azure.core.rest import HttpRequest, HttpResponse +from azure.mgmt.core import ARMPipelineClient + from . import models +from ._configuration import LogicManagementClientConfiguration +from .operations import IntegrationAccountAgreementsOperations, IntegrationAccountAssembliesOperations, IntegrationAccountBatchConfigurationsOperations, IntegrationAccountCertificatesOperations, IntegrationAccountMapsOperations, IntegrationAccountPartnersOperations, IntegrationAccountSchemasOperations, IntegrationAccountSessionsOperations, IntegrationAccountsOperations, IntegrationServiceEnvironmentManagedApiOperationsOperations, IntegrationServiceEnvironmentManagedApisOperations, IntegrationServiceEnvironmentNetworkHealthOperations, IntegrationServiceEnvironmentSkusOperations, IntegrationServiceEnvironmentsOperations, Operations, WorkflowRunActionRepetitionsOperations, WorkflowRunActionRepetitionsRequestHistoriesOperations, WorkflowRunActionRequestHistoriesOperations, WorkflowRunActionScopeRepetitionsOperations, WorkflowRunActionsOperations, WorkflowRunOperationsOperations, WorkflowRunsOperations, WorkflowTriggerHistoriesOperations, WorkflowTriggersOperations, WorkflowVersionTriggersOperations, WorkflowVersionsOperations, WorkflowsOperations +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential -class LogicManagementClient(object): +class LogicManagementClient: # pylint: disable=too-many-instance-attributes """REST API for Azure Logic Apps. - :ivar workflow: WorkflowOperations operations - :vartype workflow: logic_management_client.operations.WorkflowOperations - :ivar workflow_version: WorkflowVersionOperations operations - :vartype workflow_version: logic_management_client.operations.WorkflowVersionOperations - :ivar workflow_trigger: WorkflowTriggerOperations operations - :vartype workflow_trigger: logic_management_client.operations.WorkflowTriggerOperations - :ivar workflow_version_trigger: WorkflowVersionTriggerOperations operations - :vartype workflow_version_trigger: logic_management_client.operations.WorkflowVersionTriggerOperations - :ivar workflow_trigger_history: WorkflowTriggerHistoryOperations operations - :vartype workflow_trigger_history: logic_management_client.operations.WorkflowTriggerHistoryOperations - :ivar workflow_run: WorkflowRunOperations operations - :vartype workflow_run: logic_management_client.operations.WorkflowRunOperations - :ivar workflow_run_action: WorkflowRunActionOperations operations - :vartype workflow_run_action: logic_management_client.operations.WorkflowRunActionOperations - :ivar workflow_run_action_repetition: WorkflowRunActionRepetitionOperations operations - :vartype workflow_run_action_repetition: logic_management_client.operations.WorkflowRunActionRepetitionOperations - :ivar workflow_run_action_repetition_request_history: WorkflowRunActionRepetitionRequestHistoryOperations operations - :vartype workflow_run_action_repetition_request_history: logic_management_client.operations.WorkflowRunActionRepetitionRequestHistoryOperations - :ivar workflow_run_action_request_history: WorkflowRunActionRequestHistoryOperations operations - :vartype workflow_run_action_request_history: logic_management_client.operations.WorkflowRunActionRequestHistoryOperations - :ivar workflow_run_action_scope_repetition: WorkflowRunActionScopeRepetitionOperations operations - :vartype workflow_run_action_scope_repetition: logic_management_client.operations.WorkflowRunActionScopeRepetitionOperations - :ivar workflow_run_operation: WorkflowRunOperationOperations operations - :vartype workflow_run_operation: logic_management_client.operations.WorkflowRunOperationOperations - :ivar integration_account: IntegrationAccountOperations operations - :vartype integration_account: logic_management_client.operations.IntegrationAccountOperations - :ivar integration_account_assembly: IntegrationAccountAssemblyOperations operations - :vartype integration_account_assembly: logic_management_client.operations.IntegrationAccountAssemblyOperations - :ivar integration_account_batch_configuration: IntegrationAccountBatchConfigurationOperations operations - :vartype integration_account_batch_configuration: logic_management_client.operations.IntegrationAccountBatchConfigurationOperations - :ivar integration_account_schema: IntegrationAccountSchemaOperations operations - :vartype integration_account_schema: logic_management_client.operations.IntegrationAccountSchemaOperations - :ivar integration_account_map: IntegrationAccountMapOperations operations - :vartype integration_account_map: logic_management_client.operations.IntegrationAccountMapOperations - :ivar integration_account_partner: IntegrationAccountPartnerOperations operations - :vartype integration_account_partner: logic_management_client.operations.IntegrationAccountPartnerOperations - :ivar integration_account_agreement: IntegrationAccountAgreementOperations operations - :vartype integration_account_agreement: logic_management_client.operations.IntegrationAccountAgreementOperations - :ivar integration_account_certificate: IntegrationAccountCertificateOperations operations - :vartype integration_account_certificate: logic_management_client.operations.IntegrationAccountCertificateOperations - :ivar integration_account_session: IntegrationAccountSessionOperations operations - :vartype integration_account_session: logic_management_client.operations.IntegrationAccountSessionOperations - :ivar integration_service_environment: IntegrationServiceEnvironmentOperations operations - :vartype integration_service_environment: logic_management_client.operations.IntegrationServiceEnvironmentOperations - :ivar integration_service_environment_sku: IntegrationServiceEnvironmentSkuOperations operations - :vartype integration_service_environment_sku: logic_management_client.operations.IntegrationServiceEnvironmentSkuOperations - :ivar integration_service_environment_network_health: IntegrationServiceEnvironmentNetworkHealthOperations operations - :vartype integration_service_environment_network_health: logic_management_client.operations.IntegrationServiceEnvironmentNetworkHealthOperations - :ivar integration_service_environment_managed_api: IntegrationServiceEnvironmentManagedApiOperations operations - :vartype integration_service_environment_managed_api: logic_management_client.operations.IntegrationServiceEnvironmentManagedApiOperations - :ivar integration_service_environment_managed_api_operation: IntegrationServiceEnvironmentManagedApiOperationOperations operations - :vartype integration_service_environment_managed_api_operation: logic_management_client.operations.IntegrationServiceEnvironmentManagedApiOperationOperations - :ivar operation: OperationOperations operations - :vartype operation: logic_management_client.operations.OperationOperations + :ivar workflows: WorkflowsOperations operations + :vartype workflows: azure.mgmt.logic.operations.WorkflowsOperations + :ivar workflow_versions: WorkflowVersionsOperations operations + :vartype workflow_versions: azure.mgmt.logic.operations.WorkflowVersionsOperations + :ivar workflow_triggers: WorkflowTriggersOperations operations + :vartype workflow_triggers: azure.mgmt.logic.operations.WorkflowTriggersOperations + :ivar workflow_version_triggers: WorkflowVersionTriggersOperations operations + :vartype workflow_version_triggers: + azure.mgmt.logic.operations.WorkflowVersionTriggersOperations + :ivar workflow_trigger_histories: WorkflowTriggerHistoriesOperations operations + :vartype workflow_trigger_histories: + azure.mgmt.logic.operations.WorkflowTriggerHistoriesOperations + :ivar workflow_runs: WorkflowRunsOperations operations + :vartype workflow_runs: azure.mgmt.logic.operations.WorkflowRunsOperations + :ivar workflow_run_actions: WorkflowRunActionsOperations operations + :vartype workflow_run_actions: azure.mgmt.logic.operations.WorkflowRunActionsOperations + :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitionsOperations operations + :vartype workflow_run_action_repetitions: + azure.mgmt.logic.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_repetitions_request_histories: + WorkflowRunActionRepetitionsRequestHistoriesOperations operations + :vartype workflow_run_action_repetitions_request_histories: + azure.mgmt.logic.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations + :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistoriesOperations + operations + :vartype workflow_run_action_request_histories: + azure.mgmt.logic.operations.WorkflowRunActionRequestHistoriesOperations + :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitionsOperations + operations + :vartype workflow_run_action_scope_repetitions: + azure.mgmt.logic.operations.WorkflowRunActionScopeRepetitionsOperations + :ivar workflow_run_operations: WorkflowRunOperationsOperations operations + :vartype workflow_run_operations: azure.mgmt.logic.operations.WorkflowRunOperationsOperations + :ivar integration_accounts: IntegrationAccountsOperations operations + :vartype integration_accounts: azure.mgmt.logic.operations.IntegrationAccountsOperations + :ivar integration_account_assemblies: IntegrationAccountAssembliesOperations operations + :vartype integration_account_assemblies: + azure.mgmt.logic.operations.IntegrationAccountAssembliesOperations + :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurationsOperations + operations + :vartype integration_account_batch_configurations: + azure.mgmt.logic.operations.IntegrationAccountBatchConfigurationsOperations + :ivar integration_account_schemas: IntegrationAccountSchemasOperations operations + :vartype integration_account_schemas: + azure.mgmt.logic.operations.IntegrationAccountSchemasOperations + :ivar integration_account_maps: IntegrationAccountMapsOperations operations + :vartype integration_account_maps: azure.mgmt.logic.operations.IntegrationAccountMapsOperations + :ivar integration_account_partners: IntegrationAccountPartnersOperations operations + :vartype integration_account_partners: + azure.mgmt.logic.operations.IntegrationAccountPartnersOperations + :ivar integration_account_agreements: IntegrationAccountAgreementsOperations operations + :vartype integration_account_agreements: + azure.mgmt.logic.operations.IntegrationAccountAgreementsOperations + :ivar integration_account_certificates: IntegrationAccountCertificatesOperations operations + :vartype integration_account_certificates: + azure.mgmt.logic.operations.IntegrationAccountCertificatesOperations + :ivar integration_account_sessions: IntegrationAccountSessionsOperations operations + :vartype integration_account_sessions: + azure.mgmt.logic.operations.IntegrationAccountSessionsOperations + :ivar integration_service_environments: IntegrationServiceEnvironmentsOperations operations + :vartype integration_service_environments: + azure.mgmt.logic.operations.IntegrationServiceEnvironmentsOperations + :ivar integration_service_environment_skus: IntegrationServiceEnvironmentSkusOperations + operations + :vartype integration_service_environment_skus: + azure.mgmt.logic.operations.IntegrationServiceEnvironmentSkusOperations + :ivar integration_service_environment_network_health: + IntegrationServiceEnvironmentNetworkHealthOperations operations + :vartype integration_service_environment_network_health: + azure.mgmt.logic.operations.IntegrationServiceEnvironmentNetworkHealthOperations + :ivar integration_service_environment_managed_apis: + IntegrationServiceEnvironmentManagedApisOperations operations + :vartype integration_service_environment_managed_apis: + azure.mgmt.logic.operations.IntegrationServiceEnvironmentManagedApisOperations + :ivar integration_service_environment_managed_api_operations: + IntegrationServiceEnvironmentManagedApiOperationsOperations operations + :vartype integration_service_environment_managed_api_operations: + azure.mgmt.logic.operations.IntegrationServiceEnvironmentManagedApiOperationsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.logic.operations.Operations :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential + :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The subscription id. :type subscription_id: str - :param str base_url: Service URL + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = LogicManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = LogicManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.workflows = WorkflowsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_versions = WorkflowVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_triggers = WorkflowTriggersOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_version_triggers = WorkflowVersionTriggersOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_runs = WorkflowRunsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_actions = WorkflowRunActionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_operations = WorkflowRunOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_accounts = IntegrationAccountsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_assemblies = IntegrationAccountAssembliesOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_schemas = IntegrationAccountSchemasOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_maps = IntegrationAccountMapsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_partners = IntegrationAccountPartnersOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_agreements = IntegrationAccountAgreementsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_certificates = IntegrationAccountCertificatesOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_sessions = IntegrationAccountSessionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environments = IntegrationServiceEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_skus = IntegrationServiceEnvironmentSkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_managed_apis = IntegrationServiceEnvironmentManagedApisOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_managed_api_operations = IntegrationServiceEnvironmentManagedApiOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ - self.workflow = WorkflowOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_version = WorkflowVersionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger = WorkflowTriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_version_trigger = WorkflowVersionTriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger_history = WorkflowTriggerHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run = WorkflowRunOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action = WorkflowRunActionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition = WorkflowRunActionRepetitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition_request_history = WorkflowRunActionRepetitionRequestHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_request_history = WorkflowRunActionRequestHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_scope_repetition = WorkflowRunActionScopeRepetitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_operation = WorkflowRunOperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account = IntegrationAccountOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_assembly = IntegrationAccountAssemblyOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_batch_configuration = IntegrationAccountBatchConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_schema = IntegrationAccountSchemaOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_map = IntegrationAccountMapOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_partner = IntegrationAccountPartnerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_agreement = IntegrationAccountAgreementOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_certificate = IntegrationAccountCertificateOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_session = IntegrationAccountSessionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment = IntegrationServiceEnvironmentOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_sku = IntegrationServiceEnvironmentSkuOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api = IntegrationServiceEnvironmentManagedApiOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api_operation = IntegrationServiceEnvironmentManagedApiOperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self._config, self._serialize, self._deserialize) + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/src/logic/azext_logic/vendored_sdks/logic/_patch.py b/src/logic/azext_logic/vendored_sdks/logic/_patch.py new file mode 100644 index 00000000000..74e48ecd07c --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/src/logic/azext_logic/vendored_sdks/logic/_vendor.py b/src/logic/azext_logic/vendored_sdks/logic/_vendor.py new file mode 100644 index 00000000000..138f663c53a --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/src/logic/azext_logic/vendored_sdks/logic/_version.py b/src/logic/azext_logic/vendored_sdks/logic/_version.py new file mode 100644 index 00000000000..9f8bb24bdd9 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "10.0.0" diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py index d1722987ad7..23b8536c72c 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/__init__.py @@ -6,5 +6,10 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._logic_management_client_async import LogicManagementClient +from ._logic_management_client import LogicManagementClient __all__ = ['LogicManagementClient'] + +# `._patch.py` is used for handwritten extensions to the generated code +# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +from ._patch import patch_sdk +patch_sdk() diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py similarity index 64% rename from src/logic/azext_logic/vendored_sdks/logic/aio/_configuration_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py index 1f3e4885bbf..1b842703551 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/_configuration.py @@ -6,41 +6,53 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy -VERSION = "unknown" +from .._version import VERSION -class LogicManagementClientConfiguration(Configuration): +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class LogicManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes """Configuration for LogicManagementClient. Note that all parameters used to create this instance are saved as instance attributes. :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential + :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The subscription id. :type subscription_id: str + :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( self, - credential: "TokenCredential", + credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any ) -> None: + super(LogicManagementClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(LogicManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id - self.api_version = "2019-05-01" - kwargs.setdefault('sdk_moniker', 'logicmanagementclient/{}'.format(VERSION)) + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-logic/{}'.format(VERSION)) self._configure(**kwargs) def _configure( @@ -51,9 +63,10 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) self.authentication_policy = kwargs.get('authentication_policy') if self.credential and not self.authentication_policy: - self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, **kwargs) + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py new file mode 100644 index 00000000000..9585250c94f --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client.py @@ -0,0 +1,200 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING + +from msrest import Deserializer, Serializer + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient + +from .. import models +from ._configuration import LogicManagementClientConfiguration +from .operations import IntegrationAccountAgreementsOperations, IntegrationAccountAssembliesOperations, IntegrationAccountBatchConfigurationsOperations, IntegrationAccountCertificatesOperations, IntegrationAccountMapsOperations, IntegrationAccountPartnersOperations, IntegrationAccountSchemasOperations, IntegrationAccountSessionsOperations, IntegrationAccountsOperations, IntegrationServiceEnvironmentManagedApiOperationsOperations, IntegrationServiceEnvironmentManagedApisOperations, IntegrationServiceEnvironmentNetworkHealthOperations, IntegrationServiceEnvironmentSkusOperations, IntegrationServiceEnvironmentsOperations, Operations, WorkflowRunActionRepetitionsOperations, WorkflowRunActionRepetitionsRequestHistoriesOperations, WorkflowRunActionRequestHistoriesOperations, WorkflowRunActionScopeRepetitionsOperations, WorkflowRunActionsOperations, WorkflowRunOperationsOperations, WorkflowRunsOperations, WorkflowTriggerHistoriesOperations, WorkflowTriggersOperations, WorkflowVersionTriggersOperations, WorkflowVersionsOperations, WorkflowsOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class LogicManagementClient: # pylint: disable=too-many-instance-attributes + """REST API for Azure Logic Apps. + + :ivar workflows: WorkflowsOperations operations + :vartype workflows: azure.mgmt.logic.aio.operations.WorkflowsOperations + :ivar workflow_versions: WorkflowVersionsOperations operations + :vartype workflow_versions: azure.mgmt.logic.aio.operations.WorkflowVersionsOperations + :ivar workflow_triggers: WorkflowTriggersOperations operations + :vartype workflow_triggers: azure.mgmt.logic.aio.operations.WorkflowTriggersOperations + :ivar workflow_version_triggers: WorkflowVersionTriggersOperations operations + :vartype workflow_version_triggers: + azure.mgmt.logic.aio.operations.WorkflowVersionTriggersOperations + :ivar workflow_trigger_histories: WorkflowTriggerHistoriesOperations operations + :vartype workflow_trigger_histories: + azure.mgmt.logic.aio.operations.WorkflowTriggerHistoriesOperations + :ivar workflow_runs: WorkflowRunsOperations operations + :vartype workflow_runs: azure.mgmt.logic.aio.operations.WorkflowRunsOperations + :ivar workflow_run_actions: WorkflowRunActionsOperations operations + :vartype workflow_run_actions: azure.mgmt.logic.aio.operations.WorkflowRunActionsOperations + :ivar workflow_run_action_repetitions: WorkflowRunActionRepetitionsOperations operations + :vartype workflow_run_action_repetitions: + azure.mgmt.logic.aio.operations.WorkflowRunActionRepetitionsOperations + :ivar workflow_run_action_repetitions_request_histories: + WorkflowRunActionRepetitionsRequestHistoriesOperations operations + :vartype workflow_run_action_repetitions_request_histories: + azure.mgmt.logic.aio.operations.WorkflowRunActionRepetitionsRequestHistoriesOperations + :ivar workflow_run_action_request_histories: WorkflowRunActionRequestHistoriesOperations + operations + :vartype workflow_run_action_request_histories: + azure.mgmt.logic.aio.operations.WorkflowRunActionRequestHistoriesOperations + :ivar workflow_run_action_scope_repetitions: WorkflowRunActionScopeRepetitionsOperations + operations + :vartype workflow_run_action_scope_repetitions: + azure.mgmt.logic.aio.operations.WorkflowRunActionScopeRepetitionsOperations + :ivar workflow_run_operations: WorkflowRunOperationsOperations operations + :vartype workflow_run_operations: + azure.mgmt.logic.aio.operations.WorkflowRunOperationsOperations + :ivar integration_accounts: IntegrationAccountsOperations operations + :vartype integration_accounts: azure.mgmt.logic.aio.operations.IntegrationAccountsOperations + :ivar integration_account_assemblies: IntegrationAccountAssembliesOperations operations + :vartype integration_account_assemblies: + azure.mgmt.logic.aio.operations.IntegrationAccountAssembliesOperations + :ivar integration_account_batch_configurations: IntegrationAccountBatchConfigurationsOperations + operations + :vartype integration_account_batch_configurations: + azure.mgmt.logic.aio.operations.IntegrationAccountBatchConfigurationsOperations + :ivar integration_account_schemas: IntegrationAccountSchemasOperations operations + :vartype integration_account_schemas: + azure.mgmt.logic.aio.operations.IntegrationAccountSchemasOperations + :ivar integration_account_maps: IntegrationAccountMapsOperations operations + :vartype integration_account_maps: + azure.mgmt.logic.aio.operations.IntegrationAccountMapsOperations + :ivar integration_account_partners: IntegrationAccountPartnersOperations operations + :vartype integration_account_partners: + azure.mgmt.logic.aio.operations.IntegrationAccountPartnersOperations + :ivar integration_account_agreements: IntegrationAccountAgreementsOperations operations + :vartype integration_account_agreements: + azure.mgmt.logic.aio.operations.IntegrationAccountAgreementsOperations + :ivar integration_account_certificates: IntegrationAccountCertificatesOperations operations + :vartype integration_account_certificates: + azure.mgmt.logic.aio.operations.IntegrationAccountCertificatesOperations + :ivar integration_account_sessions: IntegrationAccountSessionsOperations operations + :vartype integration_account_sessions: + azure.mgmt.logic.aio.operations.IntegrationAccountSessionsOperations + :ivar integration_service_environments: IntegrationServiceEnvironmentsOperations operations + :vartype integration_service_environments: + azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentsOperations + :ivar integration_service_environment_skus: IntegrationServiceEnvironmentSkusOperations + operations + :vartype integration_service_environment_skus: + azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentSkusOperations + :ivar integration_service_environment_network_health: + IntegrationServiceEnvironmentNetworkHealthOperations operations + :vartype integration_service_environment_network_health: + azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentNetworkHealthOperations + :ivar integration_service_environment_managed_apis: + IntegrationServiceEnvironmentManagedApisOperations operations + :vartype integration_service_environment_managed_apis: + azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentManagedApisOperations + :ivar integration_service_environment_managed_api_operations: + IntegrationServiceEnvironmentManagedApiOperationsOperations operations + :vartype integration_service_environment_managed_api_operations: + azure.mgmt.logic.aio.operations.IntegrationServiceEnvironmentManagedApiOperationsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.logic.aio.operations.Operations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription id. + :type subscription_id: str + :param base_url: Service URL. Default value is "https://management.azure.com". + :type base_url: str + :keyword api_version: Api Version. Default value is "2019-05-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = LogicManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.workflows = WorkflowsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_versions = WorkflowVersionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_triggers = WorkflowTriggersOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_version_triggers = WorkflowVersionTriggersOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_trigger_histories = WorkflowTriggerHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_runs = WorkflowRunsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_actions = WorkflowRunActionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions = WorkflowRunActionRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_repetitions_request_histories = WorkflowRunActionRepetitionsRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_request_histories = WorkflowRunActionRequestHistoriesOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_action_scope_repetitions = WorkflowRunActionScopeRepetitionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.workflow_run_operations = WorkflowRunOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_accounts = IntegrationAccountsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_assemblies = IntegrationAccountAssembliesOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_batch_configurations = IntegrationAccountBatchConfigurationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_schemas = IntegrationAccountSchemasOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_maps = IntegrationAccountMapsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_partners = IntegrationAccountPartnersOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_agreements = IntegrationAccountAgreementsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_certificates = IntegrationAccountCertificatesOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_account_sessions = IntegrationAccountSessionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environments = IntegrationServiceEnvironmentsOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_skus = IntegrationServiceEnvironmentSkusOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_managed_apis = IntegrationServiceEnvironmentManagedApisOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_service_environment_managed_api_operations = IntegrationServiceEnvironmentManagedApiOperationsOperations(self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "LogicManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py deleted file mode 100644 index 31b6bf138b3..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/_logic_management_client_async.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional - -from azure.core import AsyncPipelineClient -from msrest import Deserializer, Serializer - -from ._configuration_async import LogicManagementClientConfiguration -from .operations_async import WorkflowOperations -from .operations_async import WorkflowVersionOperations -from .operations_async import WorkflowTriggerOperations -from .operations_async import WorkflowVersionTriggerOperations -from .operations_async import WorkflowTriggerHistoryOperations -from .operations_async import WorkflowRunOperations -from .operations_async import WorkflowRunActionOperations -from .operations_async import WorkflowRunActionRepetitionOperations -from .operations_async import WorkflowRunActionRepetitionRequestHistoryOperations -from .operations_async import WorkflowRunActionRequestHistoryOperations -from .operations_async import WorkflowRunActionScopeRepetitionOperations -from .operations_async import WorkflowRunOperationOperations -from .operations_async import IntegrationAccountOperations -from .operations_async import IntegrationAccountAssemblyOperations -from .operations_async import IntegrationAccountBatchConfigurationOperations -from .operations_async import IntegrationAccountSchemaOperations -from .operations_async import IntegrationAccountMapOperations -from .operations_async import IntegrationAccountPartnerOperations -from .operations_async import IntegrationAccountAgreementOperations -from .operations_async import IntegrationAccountCertificateOperations -from .operations_async import IntegrationAccountSessionOperations -from .operations_async import IntegrationServiceEnvironmentOperations -from .operations_async import IntegrationServiceEnvironmentSkuOperations -from .operations_async import IntegrationServiceEnvironmentNetworkHealthOperations -from .operations_async import IntegrationServiceEnvironmentManagedApiOperations -from .operations_async import IntegrationServiceEnvironmentManagedApiOperationOperations -from .operations_async import OperationOperations -from .. import models - - -class LogicManagementClient(object): - """REST API for Azure Logic Apps. - - :ivar workflow: WorkflowOperations operations - :vartype workflow: logic_management_client.aio.operations_async.WorkflowOperations - :ivar workflow_version: WorkflowVersionOperations operations - :vartype workflow_version: logic_management_client.aio.operations_async.WorkflowVersionOperations - :ivar workflow_trigger: WorkflowTriggerOperations operations - :vartype workflow_trigger: logic_management_client.aio.operations_async.WorkflowTriggerOperations - :ivar workflow_version_trigger: WorkflowVersionTriggerOperations operations - :vartype workflow_version_trigger: logic_management_client.aio.operations_async.WorkflowVersionTriggerOperations - :ivar workflow_trigger_history: WorkflowTriggerHistoryOperations operations - :vartype workflow_trigger_history: logic_management_client.aio.operations_async.WorkflowTriggerHistoryOperations - :ivar workflow_run: WorkflowRunOperations operations - :vartype workflow_run: logic_management_client.aio.operations_async.WorkflowRunOperations - :ivar workflow_run_action: WorkflowRunActionOperations operations - :vartype workflow_run_action: logic_management_client.aio.operations_async.WorkflowRunActionOperations - :ivar workflow_run_action_repetition: WorkflowRunActionRepetitionOperations operations - :vartype workflow_run_action_repetition: logic_management_client.aio.operations_async.WorkflowRunActionRepetitionOperations - :ivar workflow_run_action_repetition_request_history: WorkflowRunActionRepetitionRequestHistoryOperations operations - :vartype workflow_run_action_repetition_request_history: logic_management_client.aio.operations_async.WorkflowRunActionRepetitionRequestHistoryOperations - :ivar workflow_run_action_request_history: WorkflowRunActionRequestHistoryOperations operations - :vartype workflow_run_action_request_history: logic_management_client.aio.operations_async.WorkflowRunActionRequestHistoryOperations - :ivar workflow_run_action_scope_repetition: WorkflowRunActionScopeRepetitionOperations operations - :vartype workflow_run_action_scope_repetition: logic_management_client.aio.operations_async.WorkflowRunActionScopeRepetitionOperations - :ivar workflow_run_operation: WorkflowRunOperationOperations operations - :vartype workflow_run_operation: logic_management_client.aio.operations_async.WorkflowRunOperationOperations - :ivar integration_account: IntegrationAccountOperations operations - :vartype integration_account: logic_management_client.aio.operations_async.IntegrationAccountOperations - :ivar integration_account_assembly: IntegrationAccountAssemblyOperations operations - :vartype integration_account_assembly: logic_management_client.aio.operations_async.IntegrationAccountAssemblyOperations - :ivar integration_account_batch_configuration: IntegrationAccountBatchConfigurationOperations operations - :vartype integration_account_batch_configuration: logic_management_client.aio.operations_async.IntegrationAccountBatchConfigurationOperations - :ivar integration_account_schema: IntegrationAccountSchemaOperations operations - :vartype integration_account_schema: logic_management_client.aio.operations_async.IntegrationAccountSchemaOperations - :ivar integration_account_map: IntegrationAccountMapOperations operations - :vartype integration_account_map: logic_management_client.aio.operations_async.IntegrationAccountMapOperations - :ivar integration_account_partner: IntegrationAccountPartnerOperations operations - :vartype integration_account_partner: logic_management_client.aio.operations_async.IntegrationAccountPartnerOperations - :ivar integration_account_agreement: IntegrationAccountAgreementOperations operations - :vartype integration_account_agreement: logic_management_client.aio.operations_async.IntegrationAccountAgreementOperations - :ivar integration_account_certificate: IntegrationAccountCertificateOperations operations - :vartype integration_account_certificate: logic_management_client.aio.operations_async.IntegrationAccountCertificateOperations - :ivar integration_account_session: IntegrationAccountSessionOperations operations - :vartype integration_account_session: logic_management_client.aio.operations_async.IntegrationAccountSessionOperations - :ivar integration_service_environment: IntegrationServiceEnvironmentOperations operations - :vartype integration_service_environment: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentOperations - :ivar integration_service_environment_sku: IntegrationServiceEnvironmentSkuOperations operations - :vartype integration_service_environment_sku: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentSkuOperations - :ivar integration_service_environment_network_health: IntegrationServiceEnvironmentNetworkHealthOperations operations - :vartype integration_service_environment_network_health: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentNetworkHealthOperations - :ivar integration_service_environment_managed_api: IntegrationServiceEnvironmentManagedApiOperations operations - :vartype integration_service_environment_managed_api: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentManagedApiOperations - :ivar integration_service_environment_managed_api_operation: IntegrationServiceEnvironmentManagedApiOperationOperations operations - :vartype integration_service_environment_managed_api_operation: logic_management_client.aio.operations_async.IntegrationServiceEnvironmentManagedApiOperationOperations - :ivar operation: OperationOperations operations - :vartype operation: logic_management_client.aio.operations_async.OperationOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: azure.core.credentials.TokenCredential - :param subscription_id: The subscription id. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = LogicManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.workflow = WorkflowOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_version = WorkflowVersionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger = WorkflowTriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_version_trigger = WorkflowVersionTriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_trigger_history = WorkflowTriggerHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run = WorkflowRunOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action = WorkflowRunActionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition = WorkflowRunActionRepetitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_repetition_request_history = WorkflowRunActionRepetitionRequestHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_request_history = WorkflowRunActionRequestHistoryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_action_scope_repetition = WorkflowRunActionScopeRepetitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workflow_run_operation = WorkflowRunOperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account = IntegrationAccountOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_assembly = IntegrationAccountAssemblyOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_batch_configuration = IntegrationAccountBatchConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_schema = IntegrationAccountSchemaOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_map = IntegrationAccountMapOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_partner = IntegrationAccountPartnerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_agreement = IntegrationAccountAgreementOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_certificate = IntegrationAccountCertificateOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_account_session = IntegrationAccountSessionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment = IntegrationServiceEnvironmentOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_sku = IntegrationServiceEnvironmentSkuOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_network_health = IntegrationServiceEnvironmentNetworkHealthOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api = IntegrationServiceEnvironmentManagedApiOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_service_environment_managed_api_operation = IntegrationServiceEnvironmentManagedApiOperationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "LogicManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/_patch.py b/src/logic/azext_logic/vendored_sdks/logic/aio/_patch.py new file mode 100644 index 00000000000..74e48ecd07c --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/_patch.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +# This file is used for handwritten extensions to the generated code. Example: +# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md +def patch_sdk(): + pass \ No newline at end of file diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py new file mode 100644 index 00000000000..5c557560db0 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/__init__.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._workflows_operations import WorkflowsOperations +from ._workflow_versions_operations import WorkflowVersionsOperations +from ._workflow_triggers_operations import WorkflowTriggersOperations +from ._workflow_version_triggers_operations import WorkflowVersionTriggersOperations +from ._workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations +from ._workflow_runs_operations import WorkflowRunsOperations +from ._workflow_run_actions_operations import WorkflowRunActionsOperations +from ._workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from ._workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from ._workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations +from ._workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations +from ._workflow_run_operations_operations import WorkflowRunOperationsOperations +from ._integration_accounts_operations import IntegrationAccountsOperations +from ._integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from ._integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations +from ._integration_account_schemas_operations import IntegrationAccountSchemasOperations +from ._integration_account_maps_operations import IntegrationAccountMapsOperations +from ._integration_account_partners_operations import IntegrationAccountPartnersOperations +from ._integration_account_agreements_operations import IntegrationAccountAgreementsOperations +from ._integration_account_certificates_operations import IntegrationAccountCertificatesOperations +from ._integration_account_sessions_operations import IntegrationAccountSessionsOperations +from ._integration_service_environments_operations import IntegrationServiceEnvironmentsOperations +from ._integration_service_environment_skus_operations import IntegrationServiceEnvironmentSkusOperations +from ._integration_service_environment_network_health_operations import IntegrationServiceEnvironmentNetworkHealthOperations +from ._integration_service_environment_managed_apis_operations import IntegrationServiceEnvironmentManagedApisOperations +from ._integration_service_environment_managed_api_operations_operations import IntegrationServiceEnvironmentManagedApiOperationsOperations +from ._operations import Operations + +__all__ = [ + 'WorkflowsOperations', + 'WorkflowVersionsOperations', + 'WorkflowTriggersOperations', + 'WorkflowVersionTriggersOperations', + 'WorkflowTriggerHistoriesOperations', + 'WorkflowRunsOperations', + 'WorkflowRunActionsOperations', + 'WorkflowRunActionRepetitionsOperations', + 'WorkflowRunActionRepetitionsRequestHistoriesOperations', + 'WorkflowRunActionRequestHistoriesOperations', + 'WorkflowRunActionScopeRepetitionsOperations', + 'WorkflowRunOperationsOperations', + 'IntegrationAccountsOperations', + 'IntegrationAccountAssembliesOperations', + 'IntegrationAccountBatchConfigurationsOperations', + 'IntegrationAccountSchemasOperations', + 'IntegrationAccountMapsOperations', + 'IntegrationAccountPartnersOperations', + 'IntegrationAccountAgreementsOperations', + 'IntegrationAccountCertificatesOperations', + 'IntegrationAccountSessionsOperations', + 'IntegrationServiceEnvironmentsOperations', + 'IntegrationServiceEnvironmentSkusOperations', + 'IntegrationServiceEnvironmentNetworkHealthOperations', + 'IntegrationServiceEnvironmentManagedApisOperations', + 'IntegrationServiceEnvironmentManagedApiOperationsOperations', + 'Operations', +] diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py new file mode 100644 index 00000000000..5407f919c22 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_agreements_operations.py @@ -0,0 +1,407 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_agreements_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountAgreementsOperations: + """IntegrationAccountAgreementsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountAgreementListResult"]: + """Gets a list of integration account agreements. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: + AgreementType. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountAgreementListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountAgreementListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreementListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountAgreementListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountAgreement": + """Gets an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountAgreement, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreement"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + agreement: "_models.IntegrationAccountAgreement", + **kwargs: Any + ) -> "_models.IntegrationAccountAgreement": + """Creates or updates an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param agreement: The integration account agreement. + :type agreement: ~azure.mgmt.logic.models.IntegrationAccountAgreement + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountAgreement, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreement"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(agreement, 'IntegrationAccountAgreement') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}"} # type: ignore + + + @distributed_trace_async + async def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py new file mode 100644 index 00000000000..c73abcb18d2 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_assemblies_operations.py @@ -0,0 +1,387 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_assemblies_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountAssembliesOperations: + """IntegrationAccountAssembliesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AssemblyCollection"]: + """List the assemblies for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AssemblyCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.AssemblyCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("AssemblyCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any + ) -> "_models.AssemblyDefinition": + """Get an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssemblyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + assembly_artifact: "_models.AssemblyDefinition", + **kwargs: Any + ) -> "_models.AssemblyDefinition": + """Create or update an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param assembly_artifact: The assembly artifact. + :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssemblyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(assembly_artifact, 'AssemblyDefinition') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any + ) -> None: + """Delete an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}"} # type: ignore + + + @distributed_trace_async + async def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url for an integration account assembly. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py new file mode 100644 index 00000000000..4149df4ecee --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_batch_configurations_operations.py @@ -0,0 +1,326 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_batch_configurations_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountBatchConfigurationsOperations: + """IntegrationAccountBatchConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.BatchConfigurationCollection"]: + """List the batch configurations for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BatchConfigurationCollection or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.BatchConfigurationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfigurationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("BatchConfigurationCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs: Any + ) -> "_models.BatchConfiguration": + """Get a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.BatchConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + batch_configuration: "_models.BatchConfiguration", + **kwargs: Any + ) -> "_models.BatchConfiguration": + """Create or update a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param batch_configuration: The batch configuration. + :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.BatchConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(batch_configuration, 'BatchConfiguration') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs: Any + ) -> None: + """Delete a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py new file mode 100644 index 00000000000..39925a3f11a --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_certificates_operations.py @@ -0,0 +1,331 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_certificates_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountCertificatesOperations: + """IntegrationAccountCertificatesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountCertificateListResult"]: + """Gets a list of integration account certificates. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountCertificateListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountCertificateListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificateListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountCertificateListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountCertificate": + """Gets an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + certificate: "_models.IntegrationAccountCertificate", + **kwargs: Any + ) -> "_models.IntegrationAccountCertificate": + """Creates or updates an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :param certificate: The integration account certificate. + :type certificate: ~azure.mgmt.logic.models.IntegrationAccountCertificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(certificate, 'IntegrationAccountCertificate') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py new file mode 100644 index 00000000000..26a7b9d372b --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_maps_operations.py @@ -0,0 +1,409 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_maps_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountMapsOperations: + """IntegrationAccountMapsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountMapListResult"]: + """Gets a list of integration account maps. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: MapType. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountMapListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountMapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMapListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountMapListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountMap": + """Gets an integration account map. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountMap, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + map: "_models.IntegrationAccountMap", + **kwargs: Any + ) -> "_models.IntegrationAccountMap": + """Creates or updates an integration account map. If the map is larger than 4 MB, you need to + store the map in an Azure blob and use the blob's Shared Access Signature (SAS) URL as the + 'contentLink' property value. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param map: The integration account map. + :type map: ~azure.mgmt.logic.models.IntegrationAccountMap + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountMap, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(map, 'IntegrationAccountMap') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account map. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}"} # type: ignore + + + @distributed_trace_async + async def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py new file mode 100644 index 00000000000..cb733877681 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_partners_operations.py @@ -0,0 +1,407 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_partners_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountPartnersOperations: + """IntegrationAccountPartnersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountPartnerListResult"]: + """Gets a list of integration account partners. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: PartnerType. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountPartnerListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountPartnerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartnerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountPartnerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountPartner": + """Gets an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountPartner, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartner"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + partner: "_models.IntegrationAccountPartner", + **kwargs: Any + ) -> "_models.IntegrationAccountPartner": + """Creates or updates an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param partner: The integration account partner. + :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountPartner, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartner"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(partner, 'IntegrationAccountPartner') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}"} # type: ignore + + + @distributed_trace_async + async def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py new file mode 100644 index 00000000000..59d98b7d3d9 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_schemas_operations.py @@ -0,0 +1,407 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_schemas_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_content_callback_url_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountSchemasOperations: + """IntegrationAccountSchemasOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountSchemaListResult"]: + """Gets a list of integration account schemas. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: SchemaType. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountSchemaListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountSchemaListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchemaListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountSchemaListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountSchema": + """Gets an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSchema, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchema"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + schema: "_models.IntegrationAccountSchema", + **kwargs: Any + ) -> "_models.IntegrationAccountSchema": + """Creates or updates an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param schema: The integration account schema. + :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSchema, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchema"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(schema, 'IntegrationAccountSchema') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}"} # type: ignore + + + @distributed_trace_async + async def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py new file mode 100644 index 00000000000..6a781d525c6 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_account_sessions_operations.py @@ -0,0 +1,337 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_account_sessions_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountSessionsOperations: + """IntegrationAccountSessionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountSessionListResult"]: + """Gets a list of integration account sessions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountSessionListResult or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountSessionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSessionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountSessionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountSession": + """Gets an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSession, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + session: "_models.IntegrationAccountSession", + **kwargs: Any + ) -> "_models.IntegrationAccountSession": + """Creates or updates an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :param session: The integration account session. + :type session: ~azure.mgmt.logic.models.IntegrationAccountSession + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSession, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(session, 'IntegrationAccountSession') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py new file mode 100644 index 00000000000..bac3564469d --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_accounts_operations.py @@ -0,0 +1,746 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_accounts_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_callback_url_request, build_list_key_vault_keys_request, build_log_tracking_events_request, build_regenerate_access_key_request, build_update_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationAccountsOperations: + """IntegrationAccountsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_subscription( + self, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountListResult"]: + """Gets a list of integration accounts by subscription. + + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationAccountListResult"]: + """Gets a list of integration accounts by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Gets an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + integration_account: "_models.IntegrationAccount", + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Creates or updates an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_account, 'IntegrationAccount') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + integration_account_name: str, + integration_account: "_models.IntegrationAccount", + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Updates an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_account, 'IntegrationAccount') + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace_async + async def list_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + parameters: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.CallbackUrl": + """Gets the integration account callback URL. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param parameters: The callback URL parameters. + :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.CallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl"} # type: ignore + + + @distributed_trace + def list_key_vault_keys( + self, + resource_group_name: str, + integration_account_name: str, + list_key_vault_keys: "_models.ListKeyVaultKeysDefinition", + **kwargs: Any + ) -> AsyncIterable["_models.KeyVaultKeyCollection"]: + """Gets the integration account's Key Vault keys. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param list_key_vault_keys: The key vault parameters. + :type list_key_vault_keys: ~azure.mgmt.logic.models.ListKeyVaultKeysDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyVaultKeyCollection or the result of + cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.KeyVaultKeyCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyVaultKeyCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + + request = build_list_key_vault_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_key_vault_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + + request = build_list_key_vault_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("KeyVaultKeyCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_key_vault_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys"} # type: ignore + + @distributed_trace_async + async def log_tracking_events( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + log_tracking_events: "_models.TrackingEventsDefinition", + **kwargs: Any + ) -> None: + """Logs the integration account's tracking events. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param log_tracking_events: The callback URL parameters. + :type log_tracking_events: ~azure.mgmt.logic.models.TrackingEventsDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') + + request = build_log_tracking_events_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.log_tracking_events.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + log_tracking_events.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents"} # type: ignore + + + @distributed_trace_async + async def regenerate_access_key( + self, + resource_group_name: str, + integration_account_name: str, + regenerate_access_key: "_models.RegenerateActionParameter", + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Regenerates the integration account access key. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param regenerate_access_key: The access key type. + :type regenerate_access_key: ~azure.mgmt.logic.models.RegenerateActionParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') + + request = build_regenerate_access_key_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.regenerate_access_key.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + regenerate_access_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py new file mode 100644 index 00000000000..16bc0f4b2cb --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py @@ -0,0 +1,134 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_service_environment_managed_api_operations_operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentManagedApiOperationsOperations: + """IntegrationServiceEnvironmentManagedApiOperationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ApiOperationListResult"]: + """Gets the managed Api operations. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiOperationListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.ApiOperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiOperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ApiOperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py new file mode 100644 index 00000000000..d816c840903 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_managed_apis_operations.py @@ -0,0 +1,441 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_service_environment_managed_apis_operations import build_delete_request_initial, build_get_request, build_list_request, build_put_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentManagedApisOperations: + """IntegrationServiceEnvironmentManagedApisOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationServiceEnvironmentManagedApiListResult"]: + """Gets the integration service environment managed Apis. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentManagedApiListResult + or the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApiListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentManagedApiListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironmentManagedApi": + """Gets the integration service environment managed Api. + + :param resource_group: The resource group name. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationServiceEnvironmentManagedApi, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + + async def _put_initial( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironmentManagedApi": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment_managed_api, 'IntegrationServiceEnvironmentManagedApi') + + request = build_put_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._put_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _put_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + + @distributed_trace_async + async def begin_put( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", + **kwargs: Any + ) -> AsyncLROPoller["_models.IntegrationServiceEnvironmentManagedApi"]: + """Puts the integration service environment managed Api. + + :param resource_group: The resource group name. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :param integration_service_environment_managed_api: The integration service environment managed + api. + :type integration_service_environment_managed_api: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either + IntegrationServiceEnvironmentManagedApi or the result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._put_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + integration_service_environment_managed_api=integration_service_environment_managed_api, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_put.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + async def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + + @distributed_trace_async + async def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the integration service environment managed Api. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_network_health_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py similarity index 54% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_network_health_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py index 182063c8f0a..3c7864aac3e 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_network_health_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_network_health_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,15 +6,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Optional, TypeVar -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_service_environment_network_health_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -24,14 +28,14 @@ class IntegrationServiceEnvironmentNetworkHealthOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models + :type models: ~azure.mgmt.logic.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -39,12 +43,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, resource_group: str, integration_service_environment_name: str, - **kwargs - ) -> Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"]: + **kwargs: Any + ) -> Dict[str, "_models.IntegrationServiceEnvironmentSubnetNetworkHealth"]: """Gets the integration service environment network health. :param resource_group: The resource group. @@ -52,45 +57,48 @@ async def get( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: dict or the result of cls(response) - :rtype: dict[str, ~logic_management_client.models.IntegrationServiceEnvironmentSubnetNetworkHealth] + :return: dict mapping str to IntegrationServiceEnvironmentSubnetNetworkHealth, or the result of + cls(response) + :rtype: dict[str, ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSubnetNetworkHealth] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"]] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "_models.IntegrationServiceEnvironmentSubnetNetworkHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('{IntegrationServiceEnvironmentSubnetNetworkHealth}', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py new file mode 100644 index 00000000000..c5fd6c5d254 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environment_skus_operations.py @@ -0,0 +1,129 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_service_environment_skus_operations import build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentSkusOperations: + """IntegrationServiceEnvironmentSkusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationServiceEnvironmentSkuList"]: + """Gets a list of integration service environment Skus. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentSkuList or the result + of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentSkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentSkuList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py new file mode 100644 index 00000000000..1da1e65e6e8 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_integration_service_environments_operations.py @@ -0,0 +1,632 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._integration_service_environments_operations import build_create_or_update_request_initial, build_delete_request, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_restart_request, build_update_request_initial +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IntegrationServiceEnvironmentsOperations: + """IntegrationServiceEnvironmentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_subscription( + self, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationServiceEnvironmentListResult"]: + """Gets a list of integration service environments by subscription. + + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group: str, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationServiceEnvironmentListResult"]: + """Gets a list of integration service environments by resource group. + + :param resource_group: The resource group. + :type resource_group: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + api_version=api_version, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironment": + """Gets an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationServiceEnvironment, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + async def _create_or_update_initial( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + @distributed_trace_async + async def begin_create_or_update( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> AsyncLROPoller["_models.IntegrationServiceEnvironment"]: + """Creates or updates an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IntegrationServiceEnvironment or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + async def _update_initial( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + @distributed_trace_async + async def begin_update( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> AsyncLROPoller["_models.IntegrationServiceEnvironment"]: + """Updates an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IntegrationServiceEnvironment or the + result of cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + @distributed_trace_async + async def restart( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> None: + """Restarts an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_restart_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.restart.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_operation_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py similarity index 51% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_operation_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py index d4059badd62..72b737962ae 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_operation_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,34 +6,37 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class OperationOperations: - """OperationOperations async operations. +class Operations: + """Operations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models + :type models: ~azure.mgmt.logic.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -40,42 +44,48 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - **kwargs - ) -> "models.OperationListResult": + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Logic REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.OperationListResult + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) def prepare_request(next_link=None): if not next_link: - # Construct URL - url = self.list.metadata['url'] - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + else: + + request = build_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('OperationListResult', pipeline_response) + deserialized = self._deserialize("OperationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -84,17 +94,22 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.Logic/operations'} + list.metadata = {'url': "/providers/Microsoft.Logic/operations"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py new file mode 100644 index 00000000000..dc12b996735 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_operations.py @@ -0,0 +1,308 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_run_action_repetitions_operations import build_get_request, build_list_expression_traces_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionRepetitionsOperations: + """WorkflowRunActionRepetitionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowRunActionRepetitionDefinitionCollection"]: + """Get all of a workflow run action repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> "_models.WorkflowRunActionRepetitionDefinition": + """Get a workflow run action repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}"} # type: ignore + + + @distributed_trace + def list_expression_traces( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressionTraces"]: + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.ExpressionTraces] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressionTraces", pipeline_response) + list_of_elem = deserialized.inputs + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py new file mode 100644 index 00000000000..9b4e69a86e8 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py @@ -0,0 +1,220 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_run_action_repetitions_request_histories_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionRepetitionsRequestHistoriesOperations: + """WorkflowRunActionRepetitionsRequestHistoriesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.RequestHistoryListResult"]: + """List a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RequestHistoryListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.RequestHistoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + request_history_name: str, + **kwargs: Any + ) -> "_models.RequestHistory": + """Gets a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param request_history_name: The request history name. + :type request_history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RequestHistory, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.RequestHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + request_history_name=request_history_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RequestHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py new file mode 100644 index 00000000000..96b34877709 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_request_histories_operations.py @@ -0,0 +1,211 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_run_action_request_histories_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionRequestHistoriesOperations: + """WorkflowRunActionRequestHistoriesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.RequestHistoryListResult"]: + """List a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RequestHistoryListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.RequestHistoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + request_history_name: str, + **kwargs: Any + ) -> "_models.RequestHistory": + """Gets a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param request_history_name: The request history name. + :type request_history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RequestHistory, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.RequestHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + request_history_name=request_history_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RequestHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py new file mode 100644 index 00000000000..b575d2d0768 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py @@ -0,0 +1,211 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_run_action_scope_repetitions_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionScopeRepetitionsOperations: + """WorkflowRunActionScopeRepetitionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowRunActionRepetitionDefinitionCollection"]: + """List the workflow run action scoped repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or + the result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> "_models.WorkflowRunActionRepetitionDefinition": + """Get a workflow run action scoped repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py new file mode 100644 index 00000000000..05eead647e8 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_actions_operations.py @@ -0,0 +1,305 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_run_actions_operations import build_get_request, build_list_expression_traces_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunActionsOperations: + """WorkflowRunActionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowRunActionListResult"]: + """Gets a list of workflow run actions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: Status. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunActionListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowRunActionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunActionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> "_models.WorkflowRunAction": + """Gets a workflow run action. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRunAction, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRunAction + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunAction"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunAction', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}"} # type: ignore + + + @distributed_trace + def list_expression_traces( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressionTraces"]: + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.ExpressionTraces] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressionTraces", pipeline_response) + list_of_elem = deserialized.inputs + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operation_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py similarity index 52% rename from src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operation_operations_async.py rename to src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py index 1f9a83baf7c..e26956721ac 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operation_operations_async.py +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_run_operations_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,33 +6,36 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Optional, TypeVar -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_run_operations_operations import build_get_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class WorkflowRunOperationOperations: - """WorkflowRunOperationOperations async operations. +class WorkflowRunOperationsOperations: + """WorkflowRunOperationsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models + :type models: ~azure.mgmt.logic.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -39,14 +43,15 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get( self, resource_group_name: str, workflow_name: str, run_name: str, operation_id: str, - **kwargs - ) -> "models.WorkflowRun": + **kwargs: Any + ) -> "_models.WorkflowRun": """Gets an operation for a run. :param resource_group_name: The resource group name. @@ -58,47 +63,49 @@ async def get( :param operation_id: The workflow operation id. :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRun + :return: WorkflowRun, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRun :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py new file mode 100644 index 00000000000..55d700a18ad --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_runs_operations.py @@ -0,0 +1,262 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_runs_operations import build_cancel_request, build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowRunsOperations: + """WorkflowRunsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowRunListResult"]: + """Gets a list of workflow runs. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: Status, + StartTime, and ClientTrackingId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunListResult or the result of + cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowRunListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs: Any + ) -> "_models.WorkflowRun": + """Gets a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRun, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRun + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}"} # type: ignore + + + @distributed_trace_async + async def cancel( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs: Any + ) -> None: + """Cancels a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_cancel_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + template_url=self.cancel.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py new file mode 100644 index 00000000000..2c29d10e3d4 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_trigger_histories_operations.py @@ -0,0 +1,278 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_trigger_histories_operations import build_get_request, build_list_request, build_resubmit_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowTriggerHistoriesOperations: + """WorkflowTriggerHistoriesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowTriggerHistoryListResult"]: + """Gets a list of workflow trigger histories. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: Status, + StartTime, and ClientTrackingId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowTriggerHistoryListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowTriggerHistoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerHistoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowTriggerHistoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs: Any + ) -> "_models.WorkflowTriggerHistory": + """Gets a workflow trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to the run name for + triggers that resulted in a run. + :type history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerHistory, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerHistory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + history_name=history_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}"} # type: ignore + + + @distributed_trace_async + async def resubmit( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs: Any + ) -> None: + """Resubmits a workflow run based on the trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to the run name for + triggers that resulted in a run. + :type history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_resubmit_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + history_name=history_name, + api_version=api_version, + template_url=self.resubmit.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resubmit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py new file mode 100644 index 00000000000..589bbcfd817 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_triggers_operations.py @@ -0,0 +1,513 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_triggers_operations import build_get_request, build_get_schema_json_request, build_list_callback_url_request, build_list_request, build_reset_request, build_run_request, build_set_state_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowTriggersOperations: + """WorkflowTriggersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowTriggerListResult"]: + """Gets a list of workflow triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowTriggerListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowTriggerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowTriggerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> "_models.WorkflowTrigger": + """Gets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTrigger, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTrigger + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTrigger"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTrigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}"} # type: ignore + + + @distributed_trace_async + async def reset( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> None: + """Resets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_reset_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.reset.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset"} # type: ignore + + + @distributed_trace_async + async def run( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> None: + """Runs a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_run_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.run.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + run.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run"} # type: ignore + + + @distributed_trace_async + async def get_schema_json( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> "_models.JsonSchema": + """Get the trigger schema as JSON. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JsonSchema, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.JsonSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JsonSchema"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_schema_json_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.get_schema_json.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JsonSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_schema_json.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json"} # type: ignore + + + @distributed_trace_async + async def set_state( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + set_state: "_models.SetTriggerStateActionDefinition", + **kwargs: Any + ) -> None: + """Sets the state of a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param set_state: The workflow trigger state. + :type set_state: ~azure.mgmt.logic.models.SetTriggerStateActionDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(set_state, 'SetTriggerStateActionDefinition') + + request = build_set_state_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.set_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + set_state.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState"} # type: ignore + + + @distributed_trace_async + async def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the callback URL for a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py new file mode 100644 index 00000000000..d4017437b6b --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_version_triggers_operations.py @@ -0,0 +1,121 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_version_triggers_operations import build_list_callback_url_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowVersionTriggersOperations: + """WorkflowVersionTriggersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + version_id: str, + trigger_name: str, + parameters: Optional["_models.GetCallbackUrlParameters"] = None, + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the callback url for a trigger of a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param version_id: The workflow versionId. + :type version_id: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param parameters: The callback URL parameters. Default value is None. + :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') + else: + _json = None + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + version_id=version_id, + trigger_name=trigger_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py new file mode 100644 index 00000000000..943b46a2bbb --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflow_versions_operations.py @@ -0,0 +1,198 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflow_versions_operations import build_get_request, build_list_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowVersionsOperations: + """WorkflowVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowVersionListResult"]: + """Gets a list of workflow versions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowVersionListResult or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowVersionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowVersionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowVersionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + version_id: str, + **kwargs: Any + ) -> "_models.WorkflowVersion": + """Gets a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param version_id: The workflow versionId. + :type version_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowVersion, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + version_id=version_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py new file mode 100644 index 00000000000..c4d57bd7ebb --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/aio/operations/_workflows_operations.py @@ -0,0 +1,1068 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._workflows_operations import build_create_or_update_request, build_delete_request, build_disable_request, build_enable_request, build_generate_upgraded_definition_request, build_get_request, build_list_by_resource_group_request, build_list_by_subscription_request, build_list_callback_url_request, build_list_swagger_request, build_move_request_initial, build_regenerate_access_key_request, build_update_request, build_validate_by_location_request, build_validate_by_resource_group_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkflowsOperations: + """WorkflowsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_subscription( + self, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowListResult"]: + """Gets a list of workflows by subscription. + + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: State, + Trigger, and ReferencedResourceId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.WorkflowListResult"]: + """Gets a list of workflows by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: State, + Trigger, and ReferencedResourceId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows"} # type: ignore + + @distributed_trace_async + async def get( + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> "_models.Workflow": + """Gets a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workflow, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workflow"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace_async + async def create_or_update( + self, + resource_group_name: str, + workflow_name: str, + workflow: "_models.Workflow", + **kwargs: Any + ) -> "_models.Workflow": + """Creates or updates a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param workflow: The workflow. + :type workflow: ~azure.mgmt.logic.models.Workflow + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workflow, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workflow"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(workflow, 'Workflow') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Workflow', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace_async + async def update( + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> "_models.Workflow": + """Updates a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workflow, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workflow"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace_async + async def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: + """Deletes a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace_async + async def disable( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: + """Disables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_disable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.disable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable"} # type: ignore + + + @distributed_trace_async + async def enable( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: + """Enables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_enable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.enable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable"} # type: ignore + + + @distributed_trace_async + async def generate_upgraded_definition( + self, + resource_group_name: str, + workflow_name: str, + parameters: "_models.GenerateUpgradedDefinitionParameters", + **kwargs: Any + ) -> Any: + """Generates the upgraded definition for a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param parameters: Parameters for generating an upgraded definition. + :type parameters: ~azure.mgmt.logic.models.GenerateUpgradedDefinitionParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') + + request = build_generate_upgraded_definition_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.generate_upgraded_definition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + generate_upgraded_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition"} # type: ignore + + + @distributed_trace_async + async def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + list_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the workflow callback Url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param list_callback_url: Which callback url to list. + :type list_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl"} # type: ignore + + + @distributed_trace_async + async def list_swagger( + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> Any: + """Gets an OpenAPI definition for the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_list_swagger_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.list_swagger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_swagger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger"} # type: ignore + + + async def _move_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + move: "_models.WorkflowReference", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(move, 'WorkflowReference') + + request = build_move_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._move_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _move_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move"} # type: ignore + + + @distributed_trace_async + async def begin_move( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + move: "_models.WorkflowReference", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Moves an existing workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param move: The workflow to move. + :type move: ~azure.mgmt.logic.models.WorkflowReference + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._move_initial( + resource_group_name=resource_group_name, + workflow_name=workflow_name, + move=move, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move"} # type: ignore + + @distributed_trace_async + async def regenerate_access_key( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + key_type: "_models.RegenerateActionParameter", + **kwargs: Any + ) -> None: + """Regenerates the callback URL access key for request triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param key_type: The access key type. + :type key_type: ~azure.mgmt.logic.models.RegenerateActionParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(key_type, 'RegenerateActionParameter') + + request = build_regenerate_access_key_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.regenerate_access_key.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + regenerate_access_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey"} # type: ignore + + + @distributed_trace_async + async def validate_by_resource_group( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + validate: "_models.Workflow", + **kwargs: Any + ) -> None: + """Validates the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param validate: The workflow. + :type validate: ~azure.mgmt.logic.models.Workflow + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(validate, 'Workflow') + + request = build_validate_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate"} # type: ignore + + + @distributed_trace_async + async def validate_by_location( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + location: str, + workflow_name: str, + validate: "_models.Workflow", + **kwargs: Any + ) -> None: + """Validates the workflow definition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param location: The workflow location. + :type location: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param validate: The workflow. + :type validate: ~azure.mgmt.logic.models.Workflow + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(validate, 'Workflow') + + request = build_validate_by_location_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate_by_location.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py deleted file mode 100644 index 46e654ae232..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/__init__.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._workflow_operations_async import WorkflowOperations -from ._workflow_version_operations_async import WorkflowVersionOperations -from ._workflow_trigger_operations_async import WorkflowTriggerOperations -from ._workflow_version_trigger_operations_async import WorkflowVersionTriggerOperations -from ._workflow_trigger_history_operations_async import WorkflowTriggerHistoryOperations -from ._workflow_run_operations_async import WorkflowRunOperations -from ._workflow_run_action_operations_async import WorkflowRunActionOperations -from ._workflow_run_action_repetition_operations_async import WorkflowRunActionRepetitionOperations -from ._workflow_run_action_repetition_request_history_operations_async import WorkflowRunActionRepetitionRequestHistoryOperations -from ._workflow_run_action_request_history_operations_async import WorkflowRunActionRequestHistoryOperations -from ._workflow_run_action_scope_repetition_operations_async import WorkflowRunActionScopeRepetitionOperations -from ._workflow_run_operation_operations_async import WorkflowRunOperationOperations -from ._integration_account_operations_async import IntegrationAccountOperations -from ._integration_account_assembly_operations_async import IntegrationAccountAssemblyOperations -from ._integration_account_batch_configuration_operations_async import IntegrationAccountBatchConfigurationOperations -from ._integration_account_schema_operations_async import IntegrationAccountSchemaOperations -from ._integration_account_map_operations_async import IntegrationAccountMapOperations -from ._integration_account_partner_operations_async import IntegrationAccountPartnerOperations -from ._integration_account_agreement_operations_async import IntegrationAccountAgreementOperations -from ._integration_account_certificate_operations_async import IntegrationAccountCertificateOperations -from ._integration_account_session_operations_async import IntegrationAccountSessionOperations -from ._integration_service_environment_operations_async import IntegrationServiceEnvironmentOperations -from ._integration_service_environment_sku_operations_async import IntegrationServiceEnvironmentSkuOperations -from ._integration_service_environment_network_health_operations_async import IntegrationServiceEnvironmentNetworkHealthOperations -from ._integration_service_environment_managed_api_operations_async import IntegrationServiceEnvironmentManagedApiOperations -from ._integration_service_environment_managed_api_operation_operations_async import IntegrationServiceEnvironmentManagedApiOperationOperations -from ._operation_operations_async import OperationOperations - -__all__ = [ - 'WorkflowOperations', - 'WorkflowVersionOperations', - 'WorkflowTriggerOperations', - 'WorkflowVersionTriggerOperations', - 'WorkflowTriggerHistoryOperations', - 'WorkflowRunOperations', - 'WorkflowRunActionOperations', - 'WorkflowRunActionRepetitionOperations', - 'WorkflowRunActionRepetitionRequestHistoryOperations', - 'WorkflowRunActionRequestHistoryOperations', - 'WorkflowRunActionScopeRepetitionOperations', - 'WorkflowRunOperationOperations', - 'IntegrationAccountOperations', - 'IntegrationAccountAssemblyOperations', - 'IntegrationAccountBatchConfigurationOperations', - 'IntegrationAccountSchemaOperations', - 'IntegrationAccountMapOperations', - 'IntegrationAccountPartnerOperations', - 'IntegrationAccountAgreementOperations', - 'IntegrationAccountCertificateOperations', - 'IntegrationAccountSessionOperations', - 'IntegrationServiceEnvironmentOperations', - 'IntegrationServiceEnvironmentSkuOperations', - 'IntegrationServiceEnvironmentNetworkHealthOperations', - 'IntegrationServiceEnvironmentManagedApiOperations', - 'IntegrationServiceEnvironmentManagedApiOperationOperations', - 'OperationOperations', -] diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_agreement_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_agreement_operations_async.py deleted file mode 100644 index 36e5a6d3e64..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_agreement_operations_async.py +++ /dev/null @@ -1,416 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountAgreementOperations: - """IntegrationAccountAgreementOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.IntegrationAccountAgreementListResult": - """Gets a list of integration account agreements. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: - AgreementType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreementListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreementListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreementListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountAgreementListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs - ) -> "models.IntegrationAccountAgreement": - """Gets an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreement - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - agreement_type: Union[str, "models.AgreementType"], - host_partner: str, - guest_partner: str, - host_identity: "models.BusinessIdentity", - guest_identity: "models.BusinessIdentity", - content: "models.AgreementContent", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, - **kwargs - ) -> "models.IntegrationAccountAgreement": - """Creates or updates an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param agreement_type: The agreement type. - :type agreement_type: str or ~logic_management_client.models.AgreementType - :param host_partner: The integration account partner that is set as host partner for this - agreement. - :type host_partner: str - :param guest_partner: The integration account partner that is set as guest partner for this - agreement. - :type guest_partner: str - :param host_identity: The business identity of the host partner. - :type host_identity: ~logic_management_client.models.BusinessIdentity - :param guest_identity: The business identity of the guest partner. - :type guest_identity: ~logic_management_client.models.BusinessIdentity - :param content: The agreement content. - :type content: ~logic_management_client.models.AgreementContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreement or ~logic_management_client.models.IntegrationAccountAgreement - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _agreement = models.IntegrationAccountAgreement(location=location, tags=tags, metadata=metadata, agreement_type=agreement_type, host_partner=host_partner, guest_partner=guest_partner, host_identity=host_identity, guest_identity=guest_identity, content=content) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_agreement, 'IntegrationAccountAgreement') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - **kwargs - ) -> None: - """Deletes an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - agreement_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_assembly_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_assembly_operations_async.py deleted file mode 100644 index 3861a78c869..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_assembly_operations_async.py +++ /dev/null @@ -1,370 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountAssemblyOperations: - """IntegrationAccountAssemblyOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs - ) -> "models.AssemblyCollection": - """List the assemblies for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('AssemblyCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs - ) -> "models.AssemblyDefinition": - """Get an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('AssemblyDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - properties: "models.AssemblyProperties", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ) -> "models.AssemblyDefinition": - """Create or update an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :param properties: The assembly properties. - :type properties: ~logic_management_client.models.AssemblyProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyDefinition or ~logic_management_client.models.AssemblyDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _assembly_artifact = models.AssemblyDefinition(location=location, tags=tags, properties=properties) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_assembly_artifact, 'AssemblyDefinition') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AssemblyDefinition', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('AssemblyDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs - ) -> None: - """Delete an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - assembly_artifact_name: str, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the content callback url for an integration account assembly. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_batch_configuration_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_batch_configuration_operations_async.py deleted file mode 100644 index 62e25f4a415..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_batch_configuration_operations_async.py +++ /dev/null @@ -1,310 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountBatchConfigurationOperations: - """IntegrationAccountBatchConfigurationOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs - ) -> "models.BatchConfigurationCollection": - """List the batch configurations for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfigurationCollection or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfigurationCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfigurationCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('BatchConfigurationCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs - ) -> "models.BatchConfiguration": - """Get a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('BatchConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - properties: "models.BatchConfigurationProperties", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ) -> "models.BatchConfiguration": - """Create or update a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :param properties: The batch configuration properties. - :type properties: ~logic_management_client.models.BatchConfigurationProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfiguration or ~logic_management_client.models.BatchConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _batch_configuration = models.BatchConfiguration(location=location, tags=tags, properties=properties) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_batch_configuration, 'BatchConfiguration') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BatchConfiguration', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('BatchConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - batch_configuration_name: str, - **kwargs - ) -> None: - """Delete a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_certificate_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_certificate_operations_async.py deleted file mode 100644 index 01c482936d5..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_certificate_operations_async.py +++ /dev/null @@ -1,321 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountCertificateOperations: - """IntegrationAccountCertificateOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - **kwargs - ) -> "models.IntegrationAccountCertificateListResult": - """Gets a list of integration account certificates. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificateListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificateListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificateListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountCertificateListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs - ) -> "models.IntegrationAccountCertificate": - """Gets an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificate - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, - key: Optional["models.KeyVaultKeyReference"] = None, - public_certificate: Optional[str] = None, - **kwargs - ) -> "models.IntegrationAccountCertificate": - """Creates or updates an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~logic_management_client.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificate or ~logic_management_client.models.IntegrationAccountCertificate - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _certificate = models.IntegrationAccountCertificate(location=location, tags=tags, metadata=metadata, key=key, public_certificate=public_certificate) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_certificate, 'IntegrationAccountCertificate') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - certificate_name: str, - **kwargs - ) -> None: - """Deletes an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_map_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_map_operations_async.py deleted file mode 100644 index 20cdf27623e..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_map_operations_async.py +++ /dev/null @@ -1,407 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountMapOperations: - """IntegrationAccountMapOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.IntegrationAccountMapListResult": - """Gets a list of integration account maps. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: MapType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMapListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMapListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMapListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountMapListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs - ) -> "models.IntegrationAccountMap": - """Gets an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMap - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - map_type: Union[str, "models.MapType"], - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - parameters_schema: Optional["models.IntegrationAccountMapPropertiesParametersSchema"] = None, - content: Optional[str] = None, - content_type_parameter: Optional[str] = None, - metadata: Optional[object] = None, - **kwargs - ) -> "models.IntegrationAccountMap": - """Creates or updates an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param map_type: The map type. - :type map_type: str or ~logic_management_client.models.MapType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: ~logic_management_client.models.IntegrationAccountMapPropertiesParametersSchema - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str - :param metadata: The metadata. - :type metadata: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMap or ~logic_management_client.models.IntegrationAccountMap - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _map = models.IntegrationAccountMap(location=location, tags=tags, map_type=map_type, parameters_schema=parameters_schema, content=content, content_type=content_type_parameter, metadata=metadata) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_map, 'IntegrationAccountMap') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - **kwargs - ) -> None: - """Deletes an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - map_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_operations_async.py deleted file mode 100644 index 4453a7d2b63..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_operations_async.py +++ /dev/null @@ -1,743 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountOperations: - """IntegrationAccountOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - top: Optional[int] = None, - **kwargs - ) -> "models.IntegrationAccountListResult": - """Gets a list of integration accounts by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} - - def list_by_resource_group( - self, - resource_group_name: str, - top: Optional[int] = None, - **kwargs - ) -> "models.IntegrationAccountListResult": - """Gets a list of integration accounts by resource group. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs - ) -> "models.IntegrationAccount": - """Gets an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["models.IntegrationAccountSku"] = None, - integration_service_environment: Optional["models.IntegrationServiceEnvironment"] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - **kwargs - ) -> "models.IntegrationAccount": - """Creates or updates an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount or ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - async def update( - self, - resource_group_name: str, - integration_account_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["models.IntegrationAccountSku"] = None, - integration_service_environment: Optional["models.IntegrationServiceEnvironment"] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - **kwargs - ) -> "models.IntegrationAccount": - """Updates an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - **kwargs - ) -> None: - """Deletes an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - async def list_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.CallbackUrl": - """Gets the integration account callback URL. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.CallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.CallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('CallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} - - def list_key_vault_key( - self, - resource_group_name: str, - integration_account_name: str, - key_vault: "models.KeyVaultReference", - skip_token: Optional[str] = None, - **kwargs - ) -> "models.KeyVaultKeyCollection": - """Gets the integration account's Key Vault keys. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param key_vault: The key vault reference. - :type key_vault: ~logic_management_client.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: KeyVaultKeyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.KeyVaultKeyCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.KeyVaultKeyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - _list_key_vault_keys = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) - api_version = "2019-05-01" - content_type = "application/json" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_key_vault_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_key_vault_keys, 'ListKeyVaultKeysDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('KeyVaultKeyCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_key_vault_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} - - async def log_tracking_event( - self, - resource_group_name: str, - integration_account_name: str, - source_type: str, - events: List["TrackingEvent"], - track_events_options: Optional[Union[str, "models.TrackEventsOperationOptions"]] = None, - **kwargs - ) -> None: - """Logs the integration account's tracking events. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param source_type: The source type. - :type source_type: str - :param events: The events. - :type events: list[~logic_management_client.models.TrackingEvent] - :param track_events_options: The track events options. - :type track_events_options: str or ~logic_management_client.models.TrackEventsOperationOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _log_tracking_events = models.TrackingEventsDefinition(source_type=source_type, track_events_options=track_events_options, events=events) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.log_tracking_event.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_log_tracking_events, 'TrackingEventsDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - log_tracking_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} - - async def regenerate_access_key( - self, - resource_group_name: str, - integration_account_name: str, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.IntegrationAccount": - """Regenerates the integration account access key. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _regenerate_access_key = models.RegenerateActionParameter(key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.regenerate_access_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_regenerate_access_key, 'RegenerateActionParameter') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_partner_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_partner_operations_async.py deleted file mode 100644 index a7b3459dfd3..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_partner_operations_async.py +++ /dev/null @@ -1,401 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountPartnerOperations: - """IntegrationAccountPartnerOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.IntegrationAccountPartnerListResult": - """Gets a list of integration account partners. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: PartnerType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartnerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartnerListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartnerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountPartnerListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs - ) -> "models.IntegrationAccountPartner": - """Gets an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartner - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - partner_type: Union[str, "models.PartnerType"], - content: "models.PartnerContent", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, - **kwargs - ) -> "models.IntegrationAccountPartner": - """Creates or updates an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param partner_type: The partner type. - :type partner_type: str or ~logic_management_client.models.PartnerType - :param content: The partner content. - :type content: ~logic_management_client.models.PartnerContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartner or ~logic_management_client.models.IntegrationAccountPartner - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _partner = models.IntegrationAccountPartner(location=location, tags=tags, partner_type=partner_type, metadata=metadata, content=content) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_partner, 'IntegrationAccountPartner') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - **kwargs - ) -> None: - """Deletes an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - partner_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_schema_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_schema_operations_async.py deleted file mode 100644 index da1ff6336bd..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_schema_operations_async.py +++ /dev/null @@ -1,413 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountSchemaOperations: - """IntegrationAccountSchemaOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.IntegrationAccountSchemaListResult": - """Gets a list of integration account schemas. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: SchemaType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchemaListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchemaListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchemaListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountSchemaListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs - ) -> "models.IntegrationAccountSchema": - """Gets an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchema - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - schema_type: Union[str, "models.SchemaType"], - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - target_namespace: Optional[str] = None, - document_name: Optional[str] = None, - file_name: Optional[str] = None, - metadata: Optional[object] = None, - content: Optional[str] = None, - content_type_parameter: Optional[str] = None, - **kwargs - ) -> "models.IntegrationAccountSchema": - """Creates or updates an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param schema_type: The schema type. - :type schema_type: str or ~logic_management_client.models.SchemaType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchema or ~logic_management_client.models.IntegrationAccountSchema - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _schema = models.IntegrationAccountSchema(location=location, tags=tags, schema_type=schema_type, target_namespace=target_namespace, document_name=document_name, file_name=file_name, metadata=metadata, content=content, content_type=content_type_parameter) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_schema, 'IntegrationAccountSchema') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - **kwargs - ) -> None: - """Deletes an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - async def list_content_callback_url( - self, - resource_group_name: str, - integration_account_name: str, - schema_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_session_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_session_operations_async.py deleted file mode 100644 index 2ed274d71bf..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_account_session_operations_async.py +++ /dev/null @@ -1,320 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountSessionOperations: - """IntegrationAccountSessionOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - integration_account_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.IntegrationAccountSessionListResult": - """Gets a list of integration account sessions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSessionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSessionListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSessionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountSessionListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} - - async def get( - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs - ) -> "models.IntegrationAccountSession": - """Gets an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} - - async def create_or_update( - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - content: Optional[object] = None, - **kwargs - ) -> "models.IntegrationAccountSession": - """Creates or updates an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param content: The session content. - :type content: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSession or ~logic_management_client.models.IntegrationAccountSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _session = models.IntegrationAccountSession(location=location, tags=tags, content=content) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_session, 'IntegrationAccountSession') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} - - async def delete( - self, - resource_group_name: str, - integration_account_name: str, - session_name: str, - **kwargs - ) -> None: - """Deletes an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operation_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operation_operations_async.py deleted file mode 100644 index 085d28c8212..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operation_operations_async.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentManagedApiOperationOperations: - """IntegrationServiceEnvironmentManagedApiOperationOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs - ) -> "models.ApiOperationListResult": - """Gets the managed Api operations. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApiOperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ApiOperationListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ApiOperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ApiOperationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operations_async.py deleted file mode 100644 index 9c0380324d2..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_managed_api_operations_async.py +++ /dev/null @@ -1,367 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentManagedApiOperations: - """IntegrationServiceEnvironmentManagedApiOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs - ) -> "models.ManagedApiListResult": - """Gets the integration service environment managed Apis. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApiListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ManagedApiListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApiListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ManagedApiListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis'} - - async def get( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs - ) -> "models.ManagedApi": - """Gets the integration service environment managed Api. - - :param resource_group: The resource group name. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApi or the result of cls(response) - :rtype: ~logic_management_client.models.ManagedApi - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - async def _put_initial( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs - ) -> "models.ManagedApi": - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self._put_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - async def put( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs - ) -> "models.ManagedApi": - """Puts the integration service environment managed Api. - - :param resource_group: The resource group name. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns ManagedApi - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.ManagedApi] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - raw_result = await self._put_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - async def _delete_initial( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self._delete_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - async def delete( - self, - resource_group: str, - integration_service_environment_name: str, - api_name: str, - **kwargs - ) -> None: - """Deletes the integration service environment managed Api. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = await self._delete_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_operations_async.py deleted file mode 100644 index 47134dc48cc..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_operations_async.py +++ /dev/null @@ -1,587 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentOperations: - """IntegrationServiceEnvironmentOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - top: Optional[int] = None, - **kwargs - ) -> "models.IntegrationServiceEnvironmentListResult": - """Gets a list of integration service environments by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironmentListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments'} - - def list_by_resource_group( - self, - resource_group: str, - top: Optional[int] = None, - **kwargs - ) -> "models.IntegrationServiceEnvironmentListResult": - """Gets a list of integration service environments by resource group. - - :param resource_group: The resource group. - :type resource_group: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironmentListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments'} - - async def get( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs - ) -> "models.IntegrationServiceEnvironment": - """Gets an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironment or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - async def _create_or_update_initial( - self, - resource_group: str, - integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, - **kwargs - ) -> "models.IntegrationServiceEnvironment": - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self._create_or_update_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - async def create_or_update( - self, - resource_group: str, - integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, - **kwargs - ) -> "models.IntegrationServiceEnvironment": - """Creates or updates an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = await self._create_or_update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - async def _update_initial( - self, - resource_group: str, - integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, - **kwargs - ) -> "models.IntegrationServiceEnvironment": - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self._update_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - async def update( - self, - resource_group: str, - integration_service_environment_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - properties: Optional["models.IntegrationServiceEnvironmentProperties"] = None, - sku: Optional["models.IntegrationServiceEnvironmentSku"] = None, - **kwargs - ) -> "models.IntegrationServiceEnvironment": - """Updates an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = await self._update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - async def delete( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs - ) -> None: - """Deletes an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - async def restart( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs - ) -> None: - """Restarts an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_sku_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_sku_operations_async.py deleted file mode 100644 index 68e19d61a2f..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_integration_service_environment_sku_operations_async.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentSkuOperations: - """IntegrationServiceEnvironmentSkuOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group: str, - integration_service_environment_name: str, - **kwargs - ) -> "models.IntegrationServiceEnvironmentSkuList": - """Gets a list of integration service environment Skus. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentSkuList or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentSkuList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentSkuList"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironmentSkuList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_operations_async.py deleted file mode 100644 index 8fde256f5ca..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_operations_async.py +++ /dev/null @@ -1,1117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncNoPolling, AsyncPollingMethod, async_poller - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowOperations: - """WorkflowOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.WorkflowListResult": - """Gets a list of workflows by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} - - def list_by_resource_group( - self, - resource_group_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.WorkflowListResult": - """Gets a list of workflows by resource group. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - **kwargs - ) -> "models.Workflow": - """Gets a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Workflow', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - async def create_or_update( - self, - resource_group_name: str, - workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, - **kwargs - ) -> "models.Workflow": - """Creates or updates a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow or ~logic_management_client.models.Workflow - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Workflow', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Workflow', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - async def update( - self, - resource_group_name: str, - workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, - **kwargs - ) -> "models.Workflow": - """Updates a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Workflow', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - async def delete( - self, - resource_group_name: str, - workflow_name: str, - **kwargs - ) -> None: - """Deletes a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - async def disable( - self, - resource_group_name: str, - workflow_name: str, - **kwargs - ) -> None: - """Disables a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.disable.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} - - async def enable( - self, - resource_group_name: str, - workflow_name: str, - **kwargs - ) -> None: - """Enables a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.enable.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} - - async def generate_upgraded_definition( - self, - resource_group_name: str, - workflow_name: str, - target_schema_version: Optional[str] = None, - **kwargs - ) -> object: - """Generates the upgraded definition for a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param target_schema_version: The target schema version. - :type target_schema_version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) - :rtype: object - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.generate_upgraded_definition.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GenerateUpgradedDefinitionParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('object', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} - - async def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the workflow callback Url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} - - async def list_swagger( - self, - resource_group_name: str, - workflow_name: str, - **kwargs - ) -> object: - """Gets an OpenAPI definition for the workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) - :rtype: object - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.list_swagger.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('object', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} - - async def _move_initial( - self, - resource_group_name: str, - workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, - **kwargs - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _move = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self._move_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_move, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - _move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} - - async def move( - self, - resource_group_name: str, - workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, - **kwargs - ) -> None: - """Moves an existing workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = await self._move_initial( - resource_group_name=resource_group_name, - workflow_name=workflow_name, - location=location, - tags=tags, - state=state, - endpoints_configuration=endpoints_configuration, - integration_account=integration_account, - integration_service_environment=integration_service_environment, - definition=definition, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - return await async_poller(self._client, raw_result, get_long_running_output, polling_method) - move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} - - async def regenerate_access_key( - self, - resource_group_name: str, - workflow_name: str, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> None: - """Regenerates the callback URL access key for request triggers. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _key_type = models.RegenerateActionParameter(key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.regenerate_access_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_key_type, 'RegenerateActionParameter') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} - - async def validate_by_resource_group( - self, - resource_group_name: str, - workflow_name: str, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - state: Optional[Union[str, "models.WorkflowState"]] = None, - endpoints_configuration: Optional["models.FlowEndpointsConfiguration"] = None, - integration_account: Optional["models.ResourceReference"] = None, - integration_service_environment: Optional["models.ResourceReference"] = None, - definition: Optional[object] = None, - parameters: Optional[Dict[str, "WorkflowParameter"]] = None, - **kwargs - ) -> None: - """Validates the workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _validate = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.validate_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_validate, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} - - async def validate_by_location( - self, - resource_group_name: str, - location: str, - workflow_name: str, - **kwargs - ) -> None: - """Validates the workflow definition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param location: The workflow location. - :type location: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.validate_by_location.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'location': self._serialize.url("location", location, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_operations_async.py deleted file mode 100644 index be74db4440a..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_operations_async.py +++ /dev/null @@ -1,269 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionOperations: - """WorkflowRunActionOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.WorkflowRunActionListResult": - """Gets a list of workflow run actions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunActionListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs - ) -> "models.WorkflowRunAction": - """Gets a workflow run action. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunAction or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunAction - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunAction"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRunAction', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} - - def list_expression_trace( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs - ) -> "models.ExpressionTraces": - """Lists a workflow run expression trace. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_expression_trace.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressionTraces', pipeline_response) - list_of_elem = deserialized.inputs - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_operations_async.py deleted file mode 100644 index d16fe2f0b6a..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_operations_async.py +++ /dev/null @@ -1,271 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRepetitionOperations: - """WorkflowRunActionRepetitionOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs - ) -> "models.WorkflowRunActionRepetitionDefinitionCollection": - """Get all of a workflow run action repetitions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs - ) -> "models.WorkflowRunActionRepetitionDefinition": - """Get a workflow run action repetition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} - - def list_expression_trace( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs - ) -> "models.ExpressionTraces": - """Lists a workflow run expression trace. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_expression_trace.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressionTraces', pipeline_response) - list_of_elem = deserialized.inputs - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_request_history_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_request_history_operations_async.py deleted file mode 100644 index faa4ba487cf..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_repetition_request_history_operations_async.py +++ /dev/null @@ -1,196 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRepetitionRequestHistoryOperations: - """WorkflowRunActionRepetitionRequestHistoryOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs - ) -> "models.RequestHistoryListResult": - """List a workflow run repetition request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RequestHistoryListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - request_history_name: str, - **kwargs - ) -> "models.RequestHistory": - """Gets a workflow run repetition request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :param request_history_name: The request history name. - :type request_history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistory - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('RequestHistory', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_request_history_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_request_history_operations_async.py deleted file mode 100644 index edfdb25ca27..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_request_history_operations_async.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRequestHistoryOperations: - """WorkflowRunActionRequestHistoryOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs - ) -> "models.RequestHistoryListResult": - """List a workflow run request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('RequestHistoryListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - request_history_name: str, - **kwargs - ) -> "models.RequestHistory": - """Gets a workflow run request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param request_history_name: The request history name. - :type request_history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistory - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('RequestHistory', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_scope_repetition_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_scope_repetition_operations_async.py deleted file mode 100644 index 466b93bc8e5..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_action_scope_repetition_operations_async.py +++ /dev/null @@ -1,188 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionScopeRepetitionOperations: - """WorkflowRunActionScopeRepetitionOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - **kwargs - ) -> "models.WorkflowRunActionRepetitionDefinitionCollection": - """List the workflow run action scoped repetitions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - action_name: str, - repetition_name: str, - **kwargs - ) -> "models.WorkflowRunActionRepetitionDefinition": - """Get a workflow run action scoped repetition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operations_async.py deleted file mode 100644 index 6928623af09..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_run_operations_async.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunOperations: - """WorkflowRunOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.WorkflowRunListResult": - """Gets a list of workflow runs. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs - ) -> "models.WorkflowRun": - """Gets a workflow run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRun - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRun', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} - - async def cancel( - self, - resource_group_name: str, - workflow_name: str, - run_name: str, - **kwargs - ) -> None: - """Cancels a workflow run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_history_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_history_operations_async.py deleted file mode 100644 index c312c502edf..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_history_operations_async.py +++ /dev/null @@ -1,253 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowTriggerHistoryOperations: - """WorkflowTriggerHistoryOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.WorkflowTriggerHistoryListResult": - """Gets a list of workflow trigger histories. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerHistoryListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowTriggerHistoryListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs - ) -> "models.WorkflowTriggerHistory": - """Gets a workflow trigger history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param history_name: The workflow trigger history name. Corresponds to the run name for - triggers that resulted in a run. - :type history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistory or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerHistory - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - 'historyName': self._serialize.url("history_name", history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} - - async def resubmit( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - history_name: str, - **kwargs - ) -> None: - """Resubmits a workflow run based on the trigger history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param history_name: The workflow trigger history name. Corresponds to the run name for - triggers that resulted in a run. - :type history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.resubmit.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - 'historyName': self._serialize.url("history_name", history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_operations_async.py deleted file mode 100644 index f0089b62dc1..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_trigger_operations_async.py +++ /dev/null @@ -1,481 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowTriggerOperations: - """WorkflowTriggerOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - filter: Optional[str] = None, - **kwargs - ) -> "models.WorkflowTriggerListResult": - """Gets a list of workflow triggers. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowTriggerListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs - ) -> "models.WorkflowTrigger": - """Gets a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTrigger or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTrigger - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTrigger"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTrigger', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} - - async def reset( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs - ) -> None: - """Resets a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.reset.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} - - async def run( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs - ) -> None: - """Runs a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.run.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in []: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize('object', response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} - - async def get_schema_json( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs - ) -> "models.JsonSchema": - """Get the trigger schema as JSON. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: JsonSchema or the result of cls(response) - :rtype: ~logic_management_client.models.JsonSchema - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.JsonSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get_schema_json.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('JsonSchema', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} - - async def set_state( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - source: "models.WorkflowTrigger", - **kwargs - ) -> None: - """Sets the state of a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param source: The source. - :type source: ~logic_management_client.models.WorkflowTrigger - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _set_state = models.SetTriggerStateActionDefinition(source=source) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.set_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_set_state, 'SetTriggerStateActionDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} - - async def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - trigger_name: str, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the callback URL for a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_operations_async.py deleted file mode 100644 index a03d909848f..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_operations_async.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowVersionOperations: - """WorkflowVersionOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - workflow_name: str, - top: Optional[int] = None, - **kwargs - ) -> "models.WorkflowVersionListResult": - """Gets a list of workflow versions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowVersionListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowVersionListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} - - async def get( - self, - resource_group_name: str, - workflow_name: str, - version_id: str, - **kwargs - ) -> "models.WorkflowVersion": - """Gets a workflow version. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param version_id: The workflow versionId. - :type version_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersion or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowVersion - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersion"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'versionId': self._serialize.url("version_id", version_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowVersion', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_trigger_operations_async.py b/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_trigger_operations_async.py deleted file mode 100644 index 527772d7cb7..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/aio/operations_async/_workflow_version_trigger_operations_async.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowVersionTriggerOperations: - """WorkflowVersionTriggerOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def list_callback_url( - self, - resource_group_name: str, - workflow_name: str, - version_id: str, - trigger_name: str, - not_after: Optional[datetime.datetime] = None, - key_type: Optional[Union[str, "models.KeyType"]] = None, - **kwargs - ) -> "models.WorkflowTriggerCallbackUrl": - """Get the callback url for a trigger of a workflow version. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param version_id: The workflow versionId. - :type version_id: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'versionId': self._serialize.url("version_id", version_id, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - if _parameters is not None: - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py index 92a2e904287..5c09cf9afc9 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/__init__.py @@ -6,389 +6,212 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -try: - from ._models_py3 import AgreementContent - from ._models_py3 import ApiDeploymentParameterMetadata - from ._models_py3 import ApiDeploymentParameterMetadataSet - from ._models_py3 import ApiOperation - from ._models_py3 import ApiOperationAnnotation - from ._models_py3 import ApiOperationListResult - from ._models_py3 import ApiOperationPropertiesDefinition - from ._models_py3 import ApiReference - from ._models_py3 import ApiResourceBackendService - from ._models_py3 import ApiResourceDefinitions - from ._models_py3 import ApiResourceGeneralInformation - from ._models_py3 import ApiResourceMetadata - from ._models_py3 import ApiResourcePolicies - from ._models_py3 import ApiResourceProperties - from ._models_py3 import ArtifactContentPropertiesDefinition - from ._models_py3 import ArtifactProperties - from ._models_py3 import As2AcknowledgementConnectionSettings - from ._models_py3 import As2AgreementContent - from ._models_py3 import As2EnvelopeSettings - from ._models_py3 import As2ErrorSettings - from ._models_py3 import As2MdnSettings - from ._models_py3 import As2MessageConnectionSettings - from ._models_py3 import As2OneWayAgreement - from ._models_py3 import As2ProtocolSettings - from ._models_py3 import As2SecuritySettings - from ._models_py3 import As2ValidationSettings - from ._models_py3 import AssemblyCollection - from ._models_py3 import AssemblyDefinition - from ._models_py3 import AssemblyProperties - from ._models_py3 import AzureResourceErrorInfo - from ._models_py3 import B2BPartnerContent - from ._models_py3 import BatchConfiguration - from ._models_py3 import BatchConfigurationCollection - from ._models_py3 import BatchConfigurationProperties - from ._models_py3 import BatchReleaseCriteria - from ._models_py3 import BusinessIdentity - from ._models_py3 import CallbackUrl - from ._models_py3 import ContentHash - from ._models_py3 import ContentLink - from ._models_py3 import Correlation - from ._models_py3 import EdifactAcknowledgementSettings - from ._models_py3 import EdifactAgreementContent - from ._models_py3 import EdifactDelimiterOverride - from ._models_py3 import EdifactEnvelopeOverride - from ._models_py3 import EdifactEnvelopeSettings - from ._models_py3 import EdifactFramingSettings - from ._models_py3 import EdifactMessageFilter - from ._models_py3 import EdifactMessageIdentifier - from ._models_py3 import EdifactOneWayAgreement - from ._models_py3 import EdifactProcessingSettings - from ._models_py3 import EdifactProtocolSettings - from ._models_py3 import EdifactSchemaReference - from ._models_py3 import EdifactValidationOverride - from ._models_py3 import EdifactValidationSettings - from ._models_py3 import ErrorInfo - from ._models_py3 import ErrorProperties - from ._models_py3 import ErrorResponse - from ._models_py3 import Expression - from ._models_py3 import ExpressionRoot - from ._models_py3 import ExpressionTraces - from ._models_py3 import ExtendedErrorInfo - from ._models_py3 import FlowAccessControlConfiguration - from ._models_py3 import FlowAccessControlConfigurationPolicy - from ._models_py3 import FlowEndpoints - from ._models_py3 import FlowEndpointsConfiguration - from ._models_py3 import GenerateUpgradedDefinitionParameters - from ._models_py3 import GetCallbackUrlParameters - from ._models_py3 import IntegrationAccount - from ._models_py3 import IntegrationAccountAgreement - from ._models_py3 import IntegrationAccountAgreementFilter - from ._models_py3 import IntegrationAccountAgreementListResult - from ._models_py3 import IntegrationAccountCertificate - from ._models_py3 import IntegrationAccountCertificateListResult - from ._models_py3 import IntegrationAccountListResult - from ._models_py3 import IntegrationAccountMap - from ._models_py3 import IntegrationAccountMapFilter - from ._models_py3 import IntegrationAccountMapListResult - from ._models_py3 import IntegrationAccountMapPropertiesParametersSchema - from ._models_py3 import IntegrationAccountPartner - from ._models_py3 import IntegrationAccountPartnerFilter - from ._models_py3 import IntegrationAccountPartnerListResult - from ._models_py3 import IntegrationAccountSchema - from ._models_py3 import IntegrationAccountSchemaFilter - from ._models_py3 import IntegrationAccountSchemaListResult - from ._models_py3 import IntegrationAccountSession - from ._models_py3 import IntegrationAccountSessionFilter - from ._models_py3 import IntegrationAccountSessionListResult - from ._models_py3 import IntegrationAccountSku - from ._models_py3 import IntegrationServiceEnvironment - from ._models_py3 import IntegrationServiceEnvironmentAccessEndpoint - from ._models_py3 import IntegrationServiceEnvironmentListResult - from ._models_py3 import IntegrationServiceEnvironmentNetworkDependency - from ._models_py3 import IntegrationServiceEnvironmentNetworkDependencyHealth - from ._models_py3 import IntegrationServiceEnvironmentNetworkEndpoint - from ._models_py3 import IntegrationServiceEnvironmentProperties - from ._models_py3 import IntegrationServiceEnvironmentSku - from ._models_py3 import IntegrationServiceEnvironmentSkuCapacity - from ._models_py3 import IntegrationServiceEnvironmentSkuDefinition - from ._models_py3 import IntegrationServiceEnvironmentSkuDefinitionSku - from ._models_py3 import IntegrationServiceEnvironmentSkuList - from ._models_py3 import IntegrationServiceEnvironmentSubnetNetworkHealth - from ._models_py3 import IpAddress - from ._models_py3 import IpAddressRange - from ._models_py3 import JsonSchema - from ._models_py3 import KeyVaultKey - from ._models_py3 import KeyVaultKeyAttributes - from ._models_py3 import KeyVaultKeyCollection - from ._models_py3 import KeyVaultKeyReference - from ._models_py3 import KeyVaultKeyReferenceKeyVault - from ._models_py3 import KeyVaultReference - from ._models_py3 import ListKeyVaultKeysDefinition - from ._models_py3 import ManagedApi - from ._models_py3 import ManagedApiListResult - from ._models_py3 import NetworkConfiguration - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import OperationResult - from ._models_py3 import OperationResultProperties - from ._models_py3 import PartnerContent - from ._models_py3 import RecurrenceSchedule - from ._models_py3 import RecurrenceScheduleOccurrence - from ._models_py3 import RegenerateActionParameter - from ._models_py3 import RepetitionIndex - from ._models_py3 import Request - from ._models_py3 import RequestHistory - from ._models_py3 import RequestHistoryListResult - from ._models_py3 import RequestHistoryProperties - from ._models_py3 import Resource - from ._models_py3 import ResourceReference - from ._models_py3 import Response - from ._models_py3 import RetryHistory - from ._models_py3 import RunActionCorrelation - from ._models_py3 import RunCorrelation - from ._models_py3 import SetTriggerStateActionDefinition - from ._models_py3 import Sku - from ._models_py3 import SubResource - from ._models_py3 import SwaggerCustomDynamicList - from ._models_py3 import SwaggerCustomDynamicProperties - from ._models_py3 import SwaggerCustomDynamicSchema - from ._models_py3 import SwaggerCustomDynamicTree - from ._models_py3 import SwaggerCustomDynamicTreeCommand - from ._models_py3 import SwaggerCustomDynamicTreeParameter - from ._models_py3 import SwaggerCustomDynamicTreeSettings - from ._models_py3 import SwaggerExternalDocumentation - from ._models_py3 import SwaggerSchema - from ._models_py3 import SwaggerXml - from ._models_py3 import TrackingEvent - from ._models_py3 import TrackingEventErrorInfo - from ._models_py3 import TrackingEventsDefinition - from ._models_py3 import Workflow - from ._models_py3 import WorkflowFilter - from ._models_py3 import WorkflowListResult - from ._models_py3 import WorkflowOutputParameter - from ._models_py3 import WorkflowParameter - from ._models_py3 import WorkflowRun - from ._models_py3 import WorkflowRunAction - from ._models_py3 import WorkflowRunActionFilter - from ._models_py3 import WorkflowRunActionListResult - from ._models_py3 import WorkflowRunActionRepetitionDefinition - from ._models_py3 import WorkflowRunActionRepetitionDefinitionCollection - from ._models_py3 import WorkflowRunActionRepetitionProperties - from ._models_py3 import WorkflowRunFilter - from ._models_py3 import WorkflowRunListResult - from ._models_py3 import WorkflowRunTrigger - from ._models_py3 import WorkflowTrigger - from ._models_py3 import WorkflowTriggerCallbackUrl - from ._models_py3 import WorkflowTriggerFilter - from ._models_py3 import WorkflowTriggerHistory - from ._models_py3 import WorkflowTriggerHistoryFilter - from ._models_py3 import WorkflowTriggerHistoryListResult - from ._models_py3 import WorkflowTriggerListCallbackUrlQueries - from ._models_py3 import WorkflowTriggerListResult - from ._models_py3 import WorkflowTriggerRecurrence - from ._models_py3 import WorkflowVersion - from ._models_py3 import WorkflowVersionListResult - from ._models_py3 import WsdlService - from ._models_py3 import X12AcknowledgementSettings - from ._models_py3 import X12AgreementContent - from ._models_py3 import X12DelimiterOverrides - from ._models_py3 import X12EnvelopeOverride - from ._models_py3 import X12EnvelopeSettings - from ._models_py3 import X12FramingSettings - from ._models_py3 import X12MessageFilter - from ._models_py3 import X12MessageIdentifier - from ._models_py3 import X12OneWayAgreement - from ._models_py3 import X12ProcessingSettings - from ._models_py3 import X12ProtocolSettings - from ._models_py3 import X12SchemaReference - from ._models_py3 import X12SecuritySettings - from ._models_py3 import X12ValidationOverride - from ._models_py3 import X12ValidationSettings -except (SyntaxError, ImportError): - from ._models import AgreementContent # type: ignore - from ._models import ApiDeploymentParameterMetadata # type: ignore - from ._models import ApiDeploymentParameterMetadataSet # type: ignore - from ._models import ApiOperation # type: ignore - from ._models import ApiOperationAnnotation # type: ignore - from ._models import ApiOperationListResult # type: ignore - from ._models import ApiOperationPropertiesDefinition # type: ignore - from ._models import ApiReference # type: ignore - from ._models import ApiResourceBackendService # type: ignore - from ._models import ApiResourceDefinitions # type: ignore - from ._models import ApiResourceGeneralInformation # type: ignore - from ._models import ApiResourceMetadata # type: ignore - from ._models import ApiResourcePolicies # type: ignore - from ._models import ApiResourceProperties # type: ignore - from ._models import ArtifactContentPropertiesDefinition # type: ignore - from ._models import ArtifactProperties # type: ignore - from ._models import As2AcknowledgementConnectionSettings # type: ignore - from ._models import As2AgreementContent # type: ignore - from ._models import As2EnvelopeSettings # type: ignore - from ._models import As2ErrorSettings # type: ignore - from ._models import As2MdnSettings # type: ignore - from ._models import As2MessageConnectionSettings # type: ignore - from ._models import As2OneWayAgreement # type: ignore - from ._models import As2ProtocolSettings # type: ignore - from ._models import As2SecuritySettings # type: ignore - from ._models import As2ValidationSettings # type: ignore - from ._models import AssemblyCollection # type: ignore - from ._models import AssemblyDefinition # type: ignore - from ._models import AssemblyProperties # type: ignore - from ._models import AzureResourceErrorInfo # type: ignore - from ._models import B2BPartnerContent # type: ignore - from ._models import BatchConfiguration # type: ignore - from ._models import BatchConfigurationCollection # type: ignore - from ._models import BatchConfigurationProperties # type: ignore - from ._models import BatchReleaseCriteria # type: ignore - from ._models import BusinessIdentity # type: ignore - from ._models import CallbackUrl # type: ignore - from ._models import ContentHash # type: ignore - from ._models import ContentLink # type: ignore - from ._models import Correlation # type: ignore - from ._models import EdifactAcknowledgementSettings # type: ignore - from ._models import EdifactAgreementContent # type: ignore - from ._models import EdifactDelimiterOverride # type: ignore - from ._models import EdifactEnvelopeOverride # type: ignore - from ._models import EdifactEnvelopeSettings # type: ignore - from ._models import EdifactFramingSettings # type: ignore - from ._models import EdifactMessageFilter # type: ignore - from ._models import EdifactMessageIdentifier # type: ignore - from ._models import EdifactOneWayAgreement # type: ignore - from ._models import EdifactProcessingSettings # type: ignore - from ._models import EdifactProtocolSettings # type: ignore - from ._models import EdifactSchemaReference # type: ignore - from ._models import EdifactValidationOverride # type: ignore - from ._models import EdifactValidationSettings # type: ignore - from ._models import ErrorInfo # type: ignore - from ._models import ErrorProperties # type: ignore - from ._models import ErrorResponse # type: ignore - from ._models import Expression # type: ignore - from ._models import ExpressionRoot # type: ignore - from ._models import ExpressionTraces # type: ignore - from ._models import ExtendedErrorInfo # type: ignore - from ._models import FlowEndpoints # type: ignore - from ._models import FlowEndpointsConfiguration # type: ignore - from ._models import GenerateUpgradedDefinitionParameters # type: ignore - from ._models import GetCallbackUrlParameters # type: ignore - from ._models import IntegrationAccount # type: ignore - from ._models import IntegrationAccountAgreement # type: ignore - from ._models import IntegrationAccountAgreementFilter # type: ignore - from ._models import IntegrationAccountAgreementListResult # type: ignore - from ._models import IntegrationAccountCertificate # type: ignore - from ._models import IntegrationAccountCertificateListResult # type: ignore - from ._models import IntegrationAccountListResult # type: ignore - from ._models import IntegrationAccountMap # type: ignore - from ._models import IntegrationAccountMapFilter # type: ignore - from ._models import IntegrationAccountMapListResult # type: ignore - from ._models import IntegrationAccountMapPropertiesParametersSchema # type: ignore - from ._models import IntegrationAccountPartner # type: ignore - from ._models import IntegrationAccountPartnerFilter # type: ignore - from ._models import IntegrationAccountPartnerListResult # type: ignore - from ._models import IntegrationAccountSchema # type: ignore - from ._models import IntegrationAccountSchemaFilter # type: ignore - from ._models import IntegrationAccountSchemaListResult # type: ignore - from ._models import IntegrationAccountSession # type: ignore - from ._models import IntegrationAccountSessionFilter # type: ignore - from ._models import IntegrationAccountSessionListResult # type: ignore - from ._models import IntegrationAccountSku # type: ignore - from ._models import IntegrationServiceEnvironment # type: ignore - from ._models import IntegrationServiceEnvironmentAccessEndpoint # type: ignore - from ._models import IntegrationServiceEnvironmentListResult # type: ignore - from ._models import IntegrationServiceEnvironmentNetworkDependency # type: ignore - from ._models import IntegrationServiceEnvironmentNetworkDependencyHealth # type: ignore - from ._models import IntegrationServiceEnvironmentNetworkEndpoint # type: ignore - from ._models import IntegrationServiceEnvironmentProperties # type: ignore - from ._models import IntegrationServiceEnvironmentSku # type: ignore - from ._models import IntegrationServiceEnvironmentSkuCapacity # type: ignore - from ._models import IntegrationServiceEnvironmentSkuDefinition # type: ignore - from ._models import IntegrationServiceEnvironmentSkuDefinitionSku # type: ignore - from ._models import IntegrationServiceEnvironmentSkuList # type: ignore - from ._models import IntegrationServiceEnvironmentSubnetNetworkHealth # type: ignore - from ._models import IpAddress # type: ignore - from ._models import JsonSchema # type: ignore - from ._models import KeyVaultKey # type: ignore - from ._models import KeyVaultKeyAttributes # type: ignore - from ._models import KeyVaultKeyCollection # type: ignore - from ._models import KeyVaultKeyReference # type: ignore - from ._models import KeyVaultKeyReferenceKeyVault # type: ignore - from ._models import KeyVaultReference # type: ignore - from ._models import ListKeyVaultKeysDefinition # type: ignore - from ._models import ManagedApi # type: ignore - from ._models import ManagedApiListResult # type: ignore - from ._models import NetworkConfiguration # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationListResult # type: ignore - from ._models import OperationResult # type: ignore - from ._models import OperationResultProperties # type: ignore - from ._models import PartnerContent # type: ignore - from ._models import RecurrenceSchedule # type: ignore - from ._models import RecurrenceScheduleOccurrence # type: ignore - from ._models import RegenerateActionParameter # type: ignore - from ._models import RepetitionIndex # type: ignore - from ._models import Request # type: ignore - from ._models import RequestHistory # type: ignore - from ._models import RequestHistoryListResult # type: ignore - from ._models import RequestHistoryProperties # type: ignore - from ._models import Resource # type: ignore - from ._models import ResourceReference # type: ignore - from ._models import Response # type: ignore - from ._models import RetryHistory # type: ignore - from ._models import RunActionCorrelation # type: ignore - from ._models import RunCorrelation # type: ignore - from ._models import SetTriggerStateActionDefinition # type: ignore - from ._models import Sku # type: ignore - from ._models import SubResource # type: ignore - from ._models import SwaggerCustomDynamicList # type: ignore - from ._models import SwaggerCustomDynamicProperties # type: ignore - from ._models import SwaggerCustomDynamicSchema # type: ignore - from ._models import SwaggerCustomDynamicTree # type: ignore - from ._models import SwaggerCustomDynamicTreeCommand # type: ignore - from ._models import SwaggerCustomDynamicTreeParameter # type: ignore - from ._models import SwaggerCustomDynamicTreeSettings # type: ignore - from ._models import SwaggerExternalDocumentation # type: ignore - from ._models import SwaggerSchema # type: ignore - from ._models import SwaggerXml # type: ignore - from ._models import TrackingEvent # type: ignore - from ._models import TrackingEventErrorInfo # type: ignore - from ._models import TrackingEventsDefinition # type: ignore - from ._models import Workflow # type: ignore - from ._models import WorkflowFilter # type: ignore - from ._models import WorkflowListResult # type: ignore - from ._models import WorkflowOutputParameter # type: ignore - from ._models import WorkflowParameter # type: ignore - from ._models import WorkflowRun # type: ignore - from ._models import WorkflowRunAction # type: ignore - from ._models import WorkflowRunActionFilter # type: ignore - from ._models import WorkflowRunActionListResult # type: ignore - from ._models import WorkflowRunActionRepetitionDefinition # type: ignore - from ._models import WorkflowRunActionRepetitionDefinitionCollection # type: ignore - from ._models import WorkflowRunActionRepetitionProperties # type: ignore - from ._models import WorkflowRunFilter # type: ignore - from ._models import WorkflowRunListResult # type: ignore - from ._models import WorkflowRunTrigger # type: ignore - from ._models import WorkflowTrigger # type: ignore - from ._models import WorkflowTriggerCallbackUrl # type: ignore - from ._models import WorkflowTriggerFilter # type: ignore - from ._models import WorkflowTriggerHistory # type: ignore - from ._models import WorkflowTriggerHistoryFilter # type: ignore - from ._models import WorkflowTriggerHistoryListResult # type: ignore - from ._models import WorkflowTriggerListCallbackUrlQueries # type: ignore - from ._models import WorkflowTriggerListResult # type: ignore - from ._models import WorkflowTriggerRecurrence # type: ignore - from ._models import WorkflowVersion # type: ignore - from ._models import WorkflowVersionListResult # type: ignore - from ._models import WsdlService # type: ignore - from ._models import X12AcknowledgementSettings # type: ignore - from ._models import X12AgreementContent # type: ignore - from ._models import X12DelimiterOverrides # type: ignore - from ._models import X12EnvelopeOverride # type: ignore - from ._models import X12EnvelopeSettings # type: ignore - from ._models import X12FramingSettings # type: ignore - from ._models import X12MessageFilter # type: ignore - from ._models import X12MessageIdentifier # type: ignore - from ._models import X12OneWayAgreement # type: ignore - from ._models import X12ProcessingSettings # type: ignore - from ._models import X12ProtocolSettings # type: ignore - from ._models import X12SchemaReference # type: ignore - from ._models import X12SecuritySettings # type: ignore - from ._models import X12ValidationOverride # type: ignore - from ._models import X12ValidationSettings # type: ignore +from ._models_py3 import AS2AcknowledgementConnectionSettings +from ._models_py3 import AS2AgreementContent +from ._models_py3 import AS2EnvelopeSettings +from ._models_py3 import AS2ErrorSettings +from ._models_py3 import AS2MdnSettings +from ._models_py3 import AS2MessageConnectionSettings +from ._models_py3 import AS2OneWayAgreement +from ._models_py3 import AS2ProtocolSettings +from ._models_py3 import AS2SecuritySettings +from ._models_py3 import AS2ValidationSettings +from ._models_py3 import AgreementContent +from ._models_py3 import ApiDeploymentParameterMetadata +from ._models_py3 import ApiDeploymentParameterMetadataSet +from ._models_py3 import ApiOperation +from ._models_py3 import ApiOperationAnnotation +from ._models_py3 import ApiOperationListResult +from ._models_py3 import ApiOperationPropertiesDefinition +from ._models_py3 import ApiReference +from ._models_py3 import ApiResourceBackendService +from ._models_py3 import ApiResourceDefinitions +from ._models_py3 import ApiResourceGeneralInformation +from ._models_py3 import ApiResourceMetadata +from ._models_py3 import ApiResourcePolicies +from ._models_py3 import ApiResourceProperties +from ._models_py3 import ArtifactContentPropertiesDefinition +from ._models_py3 import ArtifactProperties +from ._models_py3 import AssemblyCollection +from ._models_py3 import AssemblyDefinition +from ._models_py3 import AssemblyProperties +from ._models_py3 import AzureResourceErrorInfo +from ._models_py3 import B2BPartnerContent +from ._models_py3 import BatchConfiguration +from ._models_py3 import BatchConfigurationCollection +from ._models_py3 import BatchConfigurationProperties +from ._models_py3 import BatchReleaseCriteria +from ._models_py3 import BusinessIdentity +from ._models_py3 import CallbackUrl +from ._models_py3 import ContentHash +from ._models_py3 import ContentLink +from ._models_py3 import Correlation +from ._models_py3 import EdifactAcknowledgementSettings +from ._models_py3 import EdifactAgreementContent +from ._models_py3 import EdifactDelimiterOverride +from ._models_py3 import EdifactEnvelopeOverride +from ._models_py3 import EdifactEnvelopeSettings +from ._models_py3 import EdifactFramingSettings +from ._models_py3 import EdifactMessageFilter +from ._models_py3 import EdifactMessageIdentifier +from ._models_py3 import EdifactOneWayAgreement +from ._models_py3 import EdifactProcessingSettings +from ._models_py3 import EdifactProtocolSettings +from ._models_py3 import EdifactSchemaReference +from ._models_py3 import EdifactValidationOverride +from ._models_py3 import EdifactValidationSettings +from ._models_py3 import ErrorInfo +from ._models_py3 import ErrorProperties +from ._models_py3 import ErrorResponse +from ._models_py3 import Expression +from ._models_py3 import ExpressionRoot +from ._models_py3 import ExpressionTraces +from ._models_py3 import ExtendedErrorInfo +from ._models_py3 import FlowAccessControlConfiguration +from ._models_py3 import FlowAccessControlConfigurationPolicy +from ._models_py3 import FlowEndpoints +from ._models_py3 import FlowEndpointsConfiguration +from ._models_py3 import GenerateUpgradedDefinitionParameters +from ._models_py3 import GetCallbackUrlParameters +from ._models_py3 import IntegrationAccount +from ._models_py3 import IntegrationAccountAgreement +from ._models_py3 import IntegrationAccountAgreementFilter +from ._models_py3 import IntegrationAccountAgreementListResult +from ._models_py3 import IntegrationAccountCertificate +from ._models_py3 import IntegrationAccountCertificateListResult +from ._models_py3 import IntegrationAccountListResult +from ._models_py3 import IntegrationAccountMap +from ._models_py3 import IntegrationAccountMapFilter +from ._models_py3 import IntegrationAccountMapListResult +from ._models_py3 import IntegrationAccountMapPropertiesParametersSchema +from ._models_py3 import IntegrationAccountPartner +from ._models_py3 import IntegrationAccountPartnerFilter +from ._models_py3 import IntegrationAccountPartnerListResult +from ._models_py3 import IntegrationAccountSchema +from ._models_py3 import IntegrationAccountSchemaFilter +from ._models_py3 import IntegrationAccountSchemaListResult +from ._models_py3 import IntegrationAccountSession +from ._models_py3 import IntegrationAccountSessionFilter +from ._models_py3 import IntegrationAccountSessionListResult +from ._models_py3 import IntegrationAccountSku +from ._models_py3 import IntegrationServiceEnvironmenEncryptionConfiguration +from ._models_py3 import IntegrationServiceEnvironmenEncryptionKeyReference +from ._models_py3 import IntegrationServiceEnvironment +from ._models_py3 import IntegrationServiceEnvironmentAccessEndpoint +from ._models_py3 import IntegrationServiceEnvironmentListResult +from ._models_py3 import IntegrationServiceEnvironmentManagedApi +from ._models_py3 import IntegrationServiceEnvironmentManagedApiDeploymentParameters +from ._models_py3 import IntegrationServiceEnvironmentManagedApiListResult +from ._models_py3 import IntegrationServiceEnvironmentManagedApiProperties +from ._models_py3 import IntegrationServiceEnvironmentNetworkDependency +from ._models_py3 import IntegrationServiceEnvironmentNetworkDependencyHealth +from ._models_py3 import IntegrationServiceEnvironmentNetworkEndpoint +from ._models_py3 import IntegrationServiceEnvironmentProperties +from ._models_py3 import IntegrationServiceEnvironmentSku +from ._models_py3 import IntegrationServiceEnvironmentSkuCapacity +from ._models_py3 import IntegrationServiceEnvironmentSkuDefinition +from ._models_py3 import IntegrationServiceEnvironmentSkuDefinitionSku +from ._models_py3 import IntegrationServiceEnvironmentSkuList +from ._models_py3 import IntegrationServiceEnvironmentSubnetNetworkHealth +from ._models_py3 import IpAddress +from ._models_py3 import IpAddressRange +from ._models_py3 import JsonSchema +from ._models_py3 import KeyVaultKey +from ._models_py3 import KeyVaultKeyAttributes +from ._models_py3 import KeyVaultKeyCollection +from ._models_py3 import KeyVaultKeyReference +from ._models_py3 import KeyVaultKeyReferenceKeyVault +from ._models_py3 import KeyVaultReference +from ._models_py3 import ListKeyVaultKeysDefinition +from ._models_py3 import ManagedApi +from ._models_py3 import ManagedApiListResult +from ._models_py3 import ManagedServiceIdentity +from ._models_py3 import NetworkConfiguration +from ._models_py3 import OpenAuthenticationAccessPolicies +from ._models_py3 import OpenAuthenticationAccessPolicy +from ._models_py3 import OpenAuthenticationPolicyClaim +from ._models_py3 import Operation +from ._models_py3 import OperationDisplay +from ._models_py3 import OperationListResult +from ._models_py3 import OperationResult +from ._models_py3 import OperationResultProperties +from ._models_py3 import PartnerContent +from ._models_py3 import RecurrenceSchedule +from ._models_py3 import RecurrenceScheduleOccurrence +from ._models_py3 import RegenerateActionParameter +from ._models_py3 import RepetitionIndex +from ._models_py3 import Request +from ._models_py3 import RequestHistory +from ._models_py3 import RequestHistoryListResult +from ._models_py3 import RequestHistoryProperties +from ._models_py3 import Resource +from ._models_py3 import ResourceReference +from ._models_py3 import Response +from ._models_py3 import RetryHistory +from ._models_py3 import RunActionCorrelation +from ._models_py3 import RunCorrelation +from ._models_py3 import SetTriggerStateActionDefinition +from ._models_py3 import Sku +from ._models_py3 import SubResource +from ._models_py3 import SwaggerCustomDynamicList +from ._models_py3 import SwaggerCustomDynamicProperties +from ._models_py3 import SwaggerCustomDynamicSchema +from ._models_py3 import SwaggerCustomDynamicTree +from ._models_py3 import SwaggerCustomDynamicTreeCommand +from ._models_py3 import SwaggerCustomDynamicTreeParameter +from ._models_py3 import SwaggerCustomDynamicTreeSettings +from ._models_py3 import SwaggerExternalDocumentation +from ._models_py3 import SwaggerSchema +from ._models_py3 import SwaggerXml +from ._models_py3 import TrackingEvent +from ._models_py3 import TrackingEventErrorInfo +from ._models_py3 import TrackingEventsDefinition +from ._models_py3 import UserAssignedIdentity +from ._models_py3 import Workflow +from ._models_py3 import WorkflowFilter +from ._models_py3 import WorkflowListResult +from ._models_py3 import WorkflowOutputParameter +from ._models_py3 import WorkflowParameter +from ._models_py3 import WorkflowReference +from ._models_py3 import WorkflowRun +from ._models_py3 import WorkflowRunAction +from ._models_py3 import WorkflowRunActionFilter +from ._models_py3 import WorkflowRunActionListResult +from ._models_py3 import WorkflowRunActionRepetitionDefinition +from ._models_py3 import WorkflowRunActionRepetitionDefinitionCollection +from ._models_py3 import WorkflowRunActionRepetitionProperties +from ._models_py3 import WorkflowRunFilter +from ._models_py3 import WorkflowRunListResult +from ._models_py3 import WorkflowRunTrigger +from ._models_py3 import WorkflowTrigger +from ._models_py3 import WorkflowTriggerCallbackUrl +from ._models_py3 import WorkflowTriggerFilter +from ._models_py3 import WorkflowTriggerHistory +from ._models_py3 import WorkflowTriggerHistoryFilter +from ._models_py3 import WorkflowTriggerHistoryListResult +from ._models_py3 import WorkflowTriggerListCallbackUrlQueries +from ._models_py3 import WorkflowTriggerListResult +from ._models_py3 import WorkflowTriggerRecurrence +from ._models_py3 import WorkflowTriggerReference +from ._models_py3 import WorkflowVersion +from ._models_py3 import WorkflowVersionListResult +from ._models_py3 import WsdlService +from ._models_py3 import X12AcknowledgementSettings +from ._models_py3 import X12AgreementContent +from ._models_py3 import X12DelimiterOverrides +from ._models_py3 import X12EnvelopeOverride +from ._models_py3 import X12EnvelopeSettings +from ._models_py3 import X12FramingSettings +from ._models_py3 import X12MessageFilter +from ._models_py3 import X12MessageIdentifier +from ._models_py3 import X12OneWayAgreement +from ._models_py3 import X12ProcessingSettings +from ._models_py3 import X12ProtocolSettings +from ._models_py3 import X12SchemaReference +from ._models_py3 import X12SecuritySettings +from ._models_py3 import X12ValidationOverride +from ._models_py3 import X12ValidationSettings + from ._logic_management_client_enums import ( AgreementType, @@ -412,8 +235,10 @@ IntegrationServiceEnvironmentSkuName, IntegrationServiceEnvironmentSkuScaleType, KeyType, + ManagedServiceIdentityType, MapType, MessageFilterType, + OpenAuthenticationProviderType, ParameterType, PartnerType, RecurrenceFrequency, @@ -438,6 +263,16 @@ ) __all__ = [ + 'AS2AcknowledgementConnectionSettings', + 'AS2AgreementContent', + 'AS2EnvelopeSettings', + 'AS2ErrorSettings', + 'AS2MdnSettings', + 'AS2MessageConnectionSettings', + 'AS2OneWayAgreement', + 'AS2ProtocolSettings', + 'AS2SecuritySettings', + 'AS2ValidationSettings', 'AgreementContent', 'ApiDeploymentParameterMetadata', 'ApiDeploymentParameterMetadataSet', @@ -454,16 +289,6 @@ 'ApiResourceProperties', 'ArtifactContentPropertiesDefinition', 'ArtifactProperties', - 'As2AcknowledgementConnectionSettings', - 'As2AgreementContent', - 'As2EnvelopeSettings', - 'As2ErrorSettings', - 'As2MdnSettings', - 'As2MessageConnectionSettings', - 'As2OneWayAgreement', - 'As2ProtocolSettings', - 'As2SecuritySettings', - 'As2ValidationSettings', 'AssemblyCollection', 'AssemblyDefinition', 'AssemblyProperties', @@ -499,6 +324,8 @@ 'ExpressionRoot', 'ExpressionTraces', 'ExtendedErrorInfo', + 'FlowAccessControlConfiguration', + 'FlowAccessControlConfigurationPolicy', 'FlowEndpoints', 'FlowEndpointsConfiguration', 'GenerateUpgradedDefinitionParameters', @@ -524,9 +351,15 @@ 'IntegrationAccountSessionFilter', 'IntegrationAccountSessionListResult', 'IntegrationAccountSku', + 'IntegrationServiceEnvironmenEncryptionConfiguration', + 'IntegrationServiceEnvironmenEncryptionKeyReference', 'IntegrationServiceEnvironment', 'IntegrationServiceEnvironmentAccessEndpoint', 'IntegrationServiceEnvironmentListResult', + 'IntegrationServiceEnvironmentManagedApi', + 'IntegrationServiceEnvironmentManagedApiDeploymentParameters', + 'IntegrationServiceEnvironmentManagedApiListResult', + 'IntegrationServiceEnvironmentManagedApiProperties', 'IntegrationServiceEnvironmentNetworkDependency', 'IntegrationServiceEnvironmentNetworkDependencyHealth', 'IntegrationServiceEnvironmentNetworkEndpoint', @@ -538,6 +371,7 @@ 'IntegrationServiceEnvironmentSkuList', 'IntegrationServiceEnvironmentSubnetNetworkHealth', 'IpAddress', + 'IpAddressRange', 'JsonSchema', 'KeyVaultKey', 'KeyVaultKeyAttributes', @@ -548,7 +382,11 @@ 'ListKeyVaultKeysDefinition', 'ManagedApi', 'ManagedApiListResult', + 'ManagedServiceIdentity', 'NetworkConfiguration', + 'OpenAuthenticationAccessPolicies', + 'OpenAuthenticationAccessPolicy', + 'OpenAuthenticationPolicyClaim', 'Operation', 'OperationDisplay', 'OperationListResult', @@ -585,11 +423,13 @@ 'TrackingEvent', 'TrackingEventErrorInfo', 'TrackingEventsDefinition', + 'UserAssignedIdentity', 'Workflow', 'WorkflowFilter', 'WorkflowListResult', 'WorkflowOutputParameter', 'WorkflowParameter', + 'WorkflowReference', 'WorkflowRun', 'WorkflowRunAction', 'WorkflowRunActionFilter', @@ -609,6 +449,7 @@ 'WorkflowTriggerListCallbackUrlQueries', 'WorkflowTriggerListResult', 'WorkflowTriggerRecurrence', + 'WorkflowTriggerReference', 'WorkflowVersion', 'WorkflowVersionListResult', 'WsdlService', @@ -648,8 +489,10 @@ 'IntegrationServiceEnvironmentSkuName', 'IntegrationServiceEnvironmentSkuScaleType', 'KeyType', + 'ManagedServiceIdentityType', 'MapType', 'MessageFilterType', + 'OpenAuthenticationProviderType', 'ParameterType', 'PartnerType', 'RecurrenceFrequency', diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py b/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py index df43fa81c24..9ded384d117 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/_logic_management_client_enums.py @@ -7,482 +7,504 @@ # -------------------------------------------------------------------------- from enum import Enum +from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class WorkflowProvisioningState(str, Enum): - """The workflow provisioning state. - """ - not_specified = "NotSpecified" - accepted = "Accepted" - running = "Running" - ready = "Ready" - creating = "Creating" - created = "Created" - deleting = "Deleting" - deleted = "Deleted" - canceled = "Canceled" - failed = "Failed" - succeeded = "Succeeded" - moving = "Moving" - updating = "Updating" - registering = "Registering" - registered = "Registered" - unregistering = "Unregistering" - unregistered = "Unregistered" - completed = "Completed" - -class WorkflowState(str, Enum): - """The workflow state. +class AgreementType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The agreement type. """ - not_specified = "NotSpecified" - completed = "Completed" - enabled = "Enabled" - disabled = "Disabled" - deleted = "Deleted" - suspended = "Suspended" + NOT_SPECIFIED = "NotSpecified" + AS2 = "AS2" + X12 = "X12" + EDIFACT = "Edifact" -class ParameterType(str, Enum): - """The parameter type. +class ApiDeploymentParameterVisibility(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Api deployment parameter visibility. """ - not_specified = "NotSpecified" - string = "String" - secure_string = "SecureString" - int = "Int" - float = "Float" - bool = "Bool" - array = "Array" - object = "Object" - secure_object = "SecureObject" + NOT_SPECIFIED = "NotSpecified" + DEFAULT = "Default" + INTERNAL = "Internal" -class SkuName(str, Enum): - """The sku name. +class ApiTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Api tier. """ - not_specified = "NotSpecified" - free = "Free" - shared = "Shared" - basic = "Basic" - standard = "Standard" - premium = "Premium" + NOT_SPECIFIED = "NotSpecified" + ENTERPRISE = "Enterprise" + STANDARD = "Standard" + PREMIUM = "Premium" -class DaysOfWeek(str, Enum): +class ApiType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" + NOT_SPECIFIED = "NotSpecified" + REST = "Rest" + SOAP = "Soap" -class DayOfWeek(str, Enum): - """The day of the week. +class AzureAsyncOperationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The Azure async operation state. """ - sunday = "Sunday" - monday = "Monday" - tuesday = "Tuesday" - wednesday = "Wednesday" - thursday = "Thursday" - friday = "Friday" - saturday = "Saturday" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + PENDING = "Pending" + CANCELED = "Canceled" -class WorkflowTriggerProvisioningState(str, Enum): - """The workflow trigger provisioning state. +class DayOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The day of the week. """ - not_specified = "NotSpecified" - accepted = "Accepted" - running = "Running" - ready = "Ready" - creating = "Creating" - created = "Created" - deleting = "Deleting" - deleted = "Deleted" - canceled = "Canceled" - failed = "Failed" - succeeded = "Succeeded" - moving = "Moving" - updating = "Updating" - registering = "Registering" - registered = "Registered" - unregistering = "Unregistering" - unregistered = "Unregistered" - completed = "Completed" - -class WorkflowStatus(str, Enum): - """The workflow status. - """ + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" - not_specified = "NotSpecified" - paused = "Paused" - running = "Running" - waiting = "Waiting" - succeeded = "Succeeded" - skipped = "Skipped" - suspended = "Suspended" - cancelled = "Cancelled" - failed = "Failed" - faulted = "Faulted" - timed_out = "TimedOut" - aborted = "Aborted" - ignored = "Ignored" - -class RecurrenceFrequency(str, Enum): - """The recurrence frequency. - """ +class DaysOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - not_specified = "NotSpecified" - second = "Second" - minute = "Minute" - hour = "Hour" - day = "Day" - week = "Week" - month = "Month" - year = "Year" + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" -class IntegrationAccountSkuName(str, Enum): - """The integration account sku name. +class EdifactCharacterSet(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The edifact character set. + """ + + NOT_SPECIFIED = "NotSpecified" + UNOB = "UNOB" + UNOA = "UNOA" + UNOC = "UNOC" + UNOD = "UNOD" + UNOE = "UNOE" + UNOF = "UNOF" + UNOG = "UNOG" + UNOH = "UNOH" + UNOI = "UNOI" + UNOJ = "UNOJ" + UNOK = "UNOK" + UNOX = "UNOX" + UNOY = "UNOY" + KECA = "KECA" + +class EdifactDecimalIndicator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The edifact decimal indicator. """ - not_specified = "NotSpecified" - free = "Free" - basic = "Basic" - standard = "Standard" + NOT_SPECIFIED = "NotSpecified" + COMMA = "Comma" + DECIMAL = "Decimal" -class IntegrationServiceEnvironmentAccessEndpointType(str, Enum): - """The integration service environment access endpoint type. +class EncryptionAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The encryption algorithm. """ - not_specified = "NotSpecified" - external = "External" - internal = "Internal" + NOT_SPECIFIED = "NotSpecified" + NONE = "None" + DES3 = "DES3" + RC2 = "RC2" + AES128 = "AES128" + AES192 = "AES192" + AES256 = "AES256" -class IntegrationServiceEnvironmentSkuName(str, Enum): - """The integration service environment sku name. +class ErrorResponseCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The error response code. """ - not_specified = "NotSpecified" - premium = "Premium" - developer = "Developer" + NOT_SPECIFIED = "NotSpecified" + INTEGRATION_SERVICE_ENVIRONMENT_NOT_FOUND = "IntegrationServiceEnvironmentNotFound" + INTERNAL_SERVER_ERROR = "InternalServerError" + INVALID_OPERATION_ID = "InvalidOperationId" -class EventLevel(str, Enum): +class EventLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The event level. """ - log_always = "LogAlways" - critical = "Critical" - error = "Error" - warning = "Warning" - informational = "Informational" - verbose = "Verbose" + LOG_ALWAYS = "LogAlways" + CRITICAL = "Critical" + ERROR = "Error" + WARNING = "Warning" + INFORMATIONAL = "Informational" + VERBOSE = "Verbose" -class TrackingRecordType(str, Enum): - """The tracking record type. +class HashingAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The signing or hashing algorithm. """ - not_specified = "NotSpecified" - custom = "Custom" - as2_message = "AS2Message" - as2_mdn = "AS2MDN" - x12_interchange = "X12Interchange" - x12_functional_group = "X12FunctionalGroup" - x12_transaction_set = "X12TransactionSet" - x12_interchange_acknowledgment = "X12InterchangeAcknowledgment" - x12_functional_group_acknowledgment = "X12FunctionalGroupAcknowledgment" - x12_transaction_set_acknowledgment = "X12TransactionSetAcknowledgment" - edifact_interchange = "EdifactInterchange" - edifact_functional_group = "EdifactFunctionalGroup" - edifact_transaction_set = "EdifactTransactionSet" - edifact_interchange_acknowledgment = "EdifactInterchangeAcknowledgment" - edifact_functional_group_acknowledgment = "EdifactFunctionalGroupAcknowledgment" - edifact_transaction_set_acknowledgment = "EdifactTransactionSetAcknowledgment" - -class SchemaType(str, Enum): - """The schema type. + NOT_SPECIFIED = "NotSpecified" + NONE = "None" + MD5 = "MD5" + SHA1 = "SHA1" + SHA2256 = "SHA2256" + SHA2384 = "SHA2384" + SHA2512 = "SHA2512" + +class IntegrationAccountSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The integration account sku name. """ - not_specified = "NotSpecified" - xml = "Xml" + NOT_SPECIFIED = "NotSpecified" + FREE = "Free" + BASIC = "Basic" + STANDARD = "Standard" -class MapType(str, Enum): - """The map type. +class IntegrationServiceEnvironmentAccessEndpointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment access endpoint type. """ - not_specified = "NotSpecified" - xslt = "Xslt" - xslt20 = "Xslt20" - xslt30 = "Xslt30" - liquid = "Liquid" + NOT_SPECIFIED = "NotSpecified" + EXTERNAL = "External" + INTERNAL = "Internal" -class PartnerType(str, Enum): - """The partner type. +class IntegrationServiceEnvironmentNetworkDependencyCategoryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment network dependency category type. """ - not_specified = "NotSpecified" - b2_b = "B2B" - -class X12DateFormat(str, Enum): - """The x12 date format. + NOT_SPECIFIED = "NotSpecified" + AZURE_STORAGE = "AzureStorage" + AZURE_MANAGEMENT = "AzureManagement" + AZURE_ACTIVE_DIRECTORY = "AzureActiveDirectory" + SSL_CERTIFICATE_VERIFICATION = "SSLCertificateVerification" + DIAGNOSTIC_LOGS_AND_METRICS = "DiagnosticLogsAndMetrics" + INTEGRATION_SERVICE_ENVIRONMENT_CONNECTORS = "IntegrationServiceEnvironmentConnectors" + REDIS_CACHE = "RedisCache" + ACCESS_ENDPOINTS = "AccessEndpoints" + RECOVERY_SERVICE = "RecoveryService" + SQL = "SQL" + REGIONAL_SERVICE = "RegionalService" + +class IntegrationServiceEnvironmentNetworkDependencyHealthState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment network dependency health state. """ - not_specified = "NotSpecified" - ccyymmdd = "CCYYMMDD" - yymmdd = "YYMMDD" + NOT_SPECIFIED = "NotSpecified" + HEALTHY = "Healthy" + UNHEALTHY = "Unhealthy" + UNKNOWN = "Unknown" -class X12TimeFormat(str, Enum): - """The x12 time format. +class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment network endpoint accessibility state. """ - not_specified = "NotSpecified" - hhmm = "HHMM" - hhmmss = "HHMMSS" - hhmms_sdd = "HHMMSSdd" - hhmms_sd = "HHMMSSd" + NOT_SPECIFIED = "NotSpecified" + UNKNOWN = "Unknown" + AVAILABLE = "Available" + NOT_AVAILABLE = "NotAvailable" -class TrailingSeparatorPolicy(str, Enum): - """The trailing separator policy. +class IntegrationServiceEnvironmentSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment sku name. """ - not_specified = "NotSpecified" - not_allowed = "NotAllowed" - optional = "Optional" - mandatory = "Mandatory" + NOT_SPECIFIED = "NotSpecified" + PREMIUM = "Premium" + DEVELOPER = "Developer" -class SegmentTerminatorSuffix(str, Enum): - """The segment terminator suffix. +class IntegrationServiceEnvironmentSkuScaleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The integration service environment sku scale type. """ - not_specified = "NotSpecified" - none = "None" - cr = "CR" - lf = "LF" - crlf = "CRLF" + MANUAL = "Manual" + AUTOMATIC = "Automatic" + NONE = "None" -class EdifactDecimalIndicator(str, Enum): - """The edifact decimal indicator. +class KeyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The key type. """ - not_specified = "NotSpecified" - comma = "Comma" - decimal = "Decimal" + NOT_SPECIFIED = "NotSpecified" + PRIMARY = "Primary" + SECONDARY = "Secondary" -class AgreementType(str, Enum): - """The agreement type. +class ManagedServiceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Type of managed service identity. The type 'SystemAssigned' includes an implicitly created + identity. The type 'None' will remove any identities from the resource. """ - not_specified = "NotSpecified" - as2 = "AS2" - x12 = "X12" - edifact = "Edifact" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + NONE = "None" -class HashingAlgorithm(str, Enum): - """The signing or hashing algorithm. +class MapType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The map type. """ - not_specified = "NotSpecified" - none = "None" - md5 = "MD5" - sha1 = "SHA1" - sha2256 = "SHA2256" - sha2384 = "SHA2384" - sha2512 = "SHA2512" + NOT_SPECIFIED = "NotSpecified" + XSLT = "Xslt" + XSLT20 = "Xslt20" + XSLT30 = "Xslt30" + LIQUID = "Liquid" -class EncryptionAlgorithm(str, Enum): - """The encryption algorithm. +class MessageFilterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The message filter type. """ - not_specified = "NotSpecified" - none = "None" - des3 = "DES3" - rc2 = "RC2" - aes128 = "AES128" - aes192 = "AES192" - aes256 = "AES256" + NOT_SPECIFIED = "NotSpecified" + INCLUDE = "Include" + EXCLUDE = "Exclude" -class SigningAlgorithm(str, Enum): - """The signing or hashing algorithm. +class OpenAuthenticationProviderType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Open authentication policy provider type. """ - not_specified = "NotSpecified" - default = "Default" - sha1 = "SHA1" - sha2256 = "SHA2256" - sha2384 = "SHA2384" - sha2512 = "SHA2512" + AAD = "AAD" -class X12CharacterSet(str, Enum): - """The X12 character set. +class ParameterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The parameter type. """ - not_specified = "NotSpecified" - basic = "Basic" - extended = "Extended" - utf8 = "UTF8" + NOT_SPECIFIED = "NotSpecified" + STRING = "String" + SECURE_STRING = "SecureString" + INT = "Int" + FLOAT = "Float" + BOOL = "Bool" + ARRAY = "Array" + OBJECT = "Object" + SECURE_OBJECT = "SecureObject" -class UsageIndicator(str, Enum): - """The usage indicator. +class PartnerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The partner type. """ - not_specified = "NotSpecified" - test = "Test" - information = "Information" - production = "Production" + NOT_SPECIFIED = "NotSpecified" + B2_B = "B2B" -class MessageFilterType(str, Enum): - """The message filter type. +class RecurrenceFrequency(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The recurrence frequency. """ - not_specified = "NotSpecified" - include = "Include" - exclude = "Exclude" + NOT_SPECIFIED = "NotSpecified" + SECOND = "Second" + MINUTE = "Minute" + HOUR = "Hour" + DAY = "Day" + WEEK = "Week" + MONTH = "Month" + YEAR = "Year" -class EdifactCharacterSet(str, Enum): - """The edifact character set. +class SchemaType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The schema type. """ - not_specified = "NotSpecified" - unob = "UNOB" - unoa = "UNOA" - unoc = "UNOC" - unod = "UNOD" - unoe = "UNOE" - unof = "UNOF" - unog = "UNOG" - unoh = "UNOH" - unoi = "UNOI" - unoj = "UNOJ" - unok = "UNOK" - unox = "UNOX" - unoy = "UNOY" - keca = "KECA" - -class IntegrationServiceEnvironmentSkuScaleType(str, Enum): - """The integration service environment sku scale type. + NOT_SPECIFIED = "NotSpecified" + XML = "Xml" + +class SegmentTerminatorSuffix(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The segment terminator suffix. """ - manual = "Manual" - automatic = "Automatic" - none = "None" + NOT_SPECIFIED = "NotSpecified" + NONE = "None" + CR = "CR" + LF = "LF" + CRLF = "CRLF" -class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(str, Enum): - """The integration service environment network endpoint accessibility state. +class SigningAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The signing or hashing algorithm. """ - not_specified = "NotSpecified" - unknown = "Unknown" - available = "Available" - not_available = "NotAvailable" + NOT_SPECIFIED = "NotSpecified" + DEFAULT = "Default" + SHA1 = "SHA1" + SHA2256 = "SHA2256" + SHA2384 = "SHA2384" + SHA2512 = "SHA2512" -class IntegrationServiceEnvironmentNetworkDependencyCategoryType(str, Enum): - """The integration service environment network dependency category type. +class SkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The sku name. """ - not_specified = "NotSpecified" - azure_storage = "AzureStorage" - azure_management = "AzureManagement" - azure_active_directory = "AzureActiveDirectory" - ssl_certificate_verification = "SSLCertificateVerification" - diagnostic_logs_and_metrics = "DiagnosticLogsAndMetrics" - integration_service_environment_connectors = "IntegrationServiceEnvironmentConnectors" - redis_cache = "RedisCache" - access_endpoints = "AccessEndpoints" - recovery_service = "RecoveryService" - sql = "SQL" - regional_service = "RegionalService" - -class ErrorResponseCode(str, Enum): - """The error response code. + NOT_SPECIFIED = "NotSpecified" + FREE = "Free" + SHARED = "Shared" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class StatusAnnotation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The status annotation. """ - not_specified = "NotSpecified" - integration_service_environment_not_found = "IntegrationServiceEnvironmentNotFound" - internal_server_error = "InternalServerError" - invalid_operation_id = "InvalidOperationId" + NOT_SPECIFIED = "NotSpecified" + PREVIEW = "Preview" + PRODUCTION = "Production" -class ApiType(str, Enum): +class SwaggerSchemaType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The swagger schema type. + """ - not_specified = "NotSpecified" - rest = "Rest" - soap = "Soap" + STRING = "String" + NUMBER = "Number" + INTEGER = "Integer" + BOOLEAN = "Boolean" + ARRAY = "Array" + FILE = "File" + OBJECT = "Object" + NULL = "Null" -class WsdlImportMethod(str, Enum): - """The WSDL import method. +class TrackEventsOperationOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The track events operation options. """ - not_specified = "NotSpecified" - soap_to_rest = "SoapToRest" - soap_pass_through = "SoapPassThrough" + NONE = "None" + DISABLE_SOURCE_INFO_ENRICH = "DisableSourceInfoEnrich" -class ApiDeploymentParameterVisibility(str, Enum): - """The Api deployment parameter visibility. +class TrackingRecordType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The tracking record type. + """ + + NOT_SPECIFIED = "NotSpecified" + CUSTOM = "Custom" + AS2_MESSAGE = "AS2Message" + AS2_MDN = "AS2MDN" + X12_INTERCHANGE = "X12Interchange" + X12_FUNCTIONAL_GROUP = "X12FunctionalGroup" + X12_TRANSACTION_SET = "X12TransactionSet" + X12_INTERCHANGE_ACKNOWLEDGMENT = "X12InterchangeAcknowledgment" + X12_FUNCTIONAL_GROUP_ACKNOWLEDGMENT = "X12FunctionalGroupAcknowledgment" + X12_TRANSACTION_SET_ACKNOWLEDGMENT = "X12TransactionSetAcknowledgment" + EDIFACT_INTERCHANGE = "EdifactInterchange" + EDIFACT_FUNCTIONAL_GROUP = "EdifactFunctionalGroup" + EDIFACT_TRANSACTION_SET = "EdifactTransactionSet" + EDIFACT_INTERCHANGE_ACKNOWLEDGMENT = "EdifactInterchangeAcknowledgment" + EDIFACT_FUNCTIONAL_GROUP_ACKNOWLEDGMENT = "EdifactFunctionalGroupAcknowledgment" + EDIFACT_TRANSACTION_SET_ACKNOWLEDGMENT = "EdifactTransactionSetAcknowledgment" + +class TrailingSeparatorPolicy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The trailing separator policy. """ - not_specified = "NotSpecified" - default = "Default" - internal = "Internal" + NOT_SPECIFIED = "NotSpecified" + NOT_ALLOWED = "NotAllowed" + OPTIONAL = "Optional" + MANDATORY = "Mandatory" -class ApiTier(str, Enum): - """The Api tier. +class UsageIndicator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The usage indicator. """ - not_specified = "NotSpecified" - enterprise = "Enterprise" - standard = "Standard" - premium = "Premium" + NOT_SPECIFIED = "NotSpecified" + TEST = "Test" + INFORMATION = "Information" + PRODUCTION = "Production" -class SwaggerSchemaType(str, Enum): - """The swagger schema type. +class WorkflowProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The workflow provisioning state. """ - string = "String" - number = "Number" - integer = "Integer" - boolean = "Boolean" - array = "Array" - file = "File" - object = "Object" - null = "Null" + NOT_SPECIFIED = "NotSpecified" + ACCEPTED = "Accepted" + RUNNING = "Running" + READY = "Ready" + CREATING = "Creating" + CREATED = "Created" + DELETING = "Deleting" + DELETED = "Deleted" + CANCELED = "Canceled" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + MOVING = "Moving" + UPDATING = "Updating" + REGISTERING = "Registering" + REGISTERED = "Registered" + UNREGISTERING = "Unregistering" + UNREGISTERED = "Unregistered" + COMPLETED = "Completed" + RENEWING = "Renewing" + PENDING = "Pending" + WAITING = "Waiting" + IN_PROGRESS = "InProgress" + +class WorkflowState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The workflow state. + """ -class StatusAnnotation(str, Enum): - """The status annotation. + NOT_SPECIFIED = "NotSpecified" + COMPLETED = "Completed" + ENABLED = "Enabled" + DISABLED = "Disabled" + DELETED = "Deleted" + SUSPENDED = "Suspended" + +class WorkflowStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The workflow status. """ - not_specified = "NotSpecified" - preview = "Preview" - production = "Production" + NOT_SPECIFIED = "NotSpecified" + PAUSED = "Paused" + RUNNING = "Running" + WAITING = "Waiting" + SUCCEEDED = "Succeeded" + SKIPPED = "Skipped" + SUSPENDED = "Suspended" + CANCELLED = "Cancelled" + FAILED = "Failed" + FAULTED = "Faulted" + TIMED_OUT = "TimedOut" + ABORTED = "Aborted" + IGNORED = "Ignored" + +class WorkflowTriggerProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The workflow trigger provisioning state. + """ -class KeyType(str, Enum): - """The key type. + NOT_SPECIFIED = "NotSpecified" + ACCEPTED = "Accepted" + RUNNING = "Running" + READY = "Ready" + CREATING = "Creating" + CREATED = "Created" + DELETING = "Deleting" + DELETED = "Deleted" + CANCELED = "Canceled" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + MOVING = "Moving" + UPDATING = "Updating" + REGISTERING = "Registering" + REGISTERED = "Registered" + UNREGISTERING = "Unregistering" + UNREGISTERED = "Unregistered" + COMPLETED = "Completed" + +class WsdlImportMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The WSDL import method. """ - not_specified = "NotSpecified" - primary = "Primary" - secondary = "Secondary" + NOT_SPECIFIED = "NotSpecified" + SOAP_TO_REST = "SoapToRest" + SOAP_PASS_THROUGH = "SoapPassThrough" -class TrackEventsOperationOptions(str, Enum): - """The track events operation options. +class X12CharacterSet(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The X12 character set. """ - none = "None" - disable_source_info_enrich = "DisableSourceInfoEnrich" + NOT_SPECIFIED = "NotSpecified" + BASIC = "Basic" + EXTENDED = "Extended" + UTF8 = "UTF8" -class IntegrationServiceEnvironmentNetworkDependencyHealthState(str, Enum): - """The integration service environment network dependency health state. +class X12DateFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The x12 date format. """ - not_specified = "NotSpecified" - healthy = "Healthy" - unhealthy = "Unhealthy" - unknown = "Unknown" + NOT_SPECIFIED = "NotSpecified" + CCYYMMDD = "CCYYMMDD" + YYMMDD = "YYMMDD" -class AzureAsyncOperationState(str, Enum): - """The Azure async operation state. +class X12TimeFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The x12 time format. """ - failed = "Failed" - succeeded = "Succeeded" - pending = "Pending" - canceled = "Canceled" + NOT_SPECIFIED = "NotSpecified" + HHMM = "HHMM" + HHMMSS = "HHMMSS" + HHMMS_SDD = "HHMMSSdd" + HHMMS_SD = "HHMMSSd" diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/_models.py b/src/logic/azext_logic/vendored_sdks/logic/models/_models.py deleted file mode 100644 index baf7e711522..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_models.py +++ /dev/null @@ -1,7951 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class AgreementContent(msrest.serialization.Model): - """The integration account agreement content. - - :param a_s2: The AS2 agreement content. - :type a_s2: ~azure.mgmt.logic.models.As2AgreementContent - :param x12: The X12 agreement content. - :type x12: ~azure.mgmt.logic.models.X12AgreementContent - :param edifact: The EDIFACT agreement content. - :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent - """ - - _attribute_map = { - 'a_s2': {'key': 'aS2', 'type': 'As2AgreementContent'}, - 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, - 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, - } - - def __init__( - self, - **kwargs - ): - super(AgreementContent, self).__init__(**kwargs) - self.a_s2 = kwargs.get('a_s2', None) - self.x12 = kwargs.get('x12', None) - self.edifact = kwargs.get('edifact', None) - - -class ApiDeploymentParameterMetadata(msrest.serialization.Model): - """The API deployment parameter metadata. - - :param type: The type. - :type type: str - :param is_required: Indicates whether its required. - :type is_required: bool - :param display_name: The display name. - :type display_name: str - :param description: The description. - :type description: str - :param visibility: The visibility. Possible values include: "NotSpecified", "Default", - "Internal". - :type visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'is_required': {'key': 'isRequired', 'type': 'bool'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'visibility': {'key': 'visibility', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiDeploymentParameterMetadata, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.is_required = kwargs.get('is_required', None) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.visibility = kwargs.get('visibility', None) - - -class ApiDeploymentParameterMetadataSet(msrest.serialization.Model): - """The API deployment parameters metadata. - - :param package_content_link: The package content link parameter. - :type package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata - :param redis_cache_connection_string: The package content link parameter. - :type redis_cache_connection_string: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata - """ - - _attribute_map = { - 'package_content_link': {'key': 'packageContentLink', 'type': 'ApiDeploymentParameterMetadata'}, - 'redis_cache_connection_string': {'key': 'redisCacheConnectionString', 'type': 'ApiDeploymentParameterMetadata'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiDeploymentParameterMetadataSet, self).__init__(**kwargs) - self.package_content_link = kwargs.get('package_content_link', None) - self.redis_cache_connection_string = kwargs.get('redis_cache_connection_string', None) - - -class Resource(msrest.serialization.Model): - """The base resource type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ApiOperation(Resource): - """The api operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The api operations properties. - :type properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'ApiOperationPropertiesDefinition'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiOperation, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ApiOperationAnnotation(msrest.serialization.Model): - """The Api Operation Annotation. - - :param status: The status annotation. Possible values include: "NotSpecified", "Preview", - "Production". - :type status: str or ~azure.mgmt.logic.models.StatusAnnotation - :param family: The family. - :type family: str - :param revision: The revision. - :type revision: int - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'revision': {'key': 'revision', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiOperationAnnotation, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.family = kwargs.get('family', None) - self.revision = kwargs.get('revision', None) - - -class ApiOperationListResult(msrest.serialization.Model): - """The list of managed API operations. - - :param value: The api operation definitions for an API. - :type value: list[~azure.mgmt.logic.models.ApiOperation] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApiOperation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiOperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ApiOperationPropertiesDefinition(msrest.serialization.Model): - """The api operations properties. - - :param summary: The summary of the api operation. - :type summary: str - :param description: The description of the api operation. - :type description: str - :param visibility: The visibility of the api operation. - :type visibility: str - :param trigger: The trigger type of api operation. - :type trigger: str - :param trigger_hint: The trigger hint for the api operation. - :type trigger_hint: str - :param pageable: Indicates whether the api operation is pageable. - :type pageable: bool - :param annotation: The annotation of api operation. - :type annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation - :param api: The api reference. - :type api: ~azure.mgmt.logic.models.ApiReference - :param inputs_definition: The operation inputs definition schema. - :type inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema - :param responses_definition: The operation responses definition schemas. - :type responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :param is_webhook: Indicates whether the API operation is webhook or not. - :type is_webhook: bool - :param is_notification: Indicates whether the API operation is notification or not. - :type is_notification: bool - """ - - _attribute_map = { - 'summary': {'key': 'summary', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'visibility': {'key': 'visibility', 'type': 'str'}, - 'trigger': {'key': 'trigger', 'type': 'str'}, - 'trigger_hint': {'key': 'triggerHint', 'type': 'str'}, - 'pageable': {'key': 'pageable', 'type': 'bool'}, - 'annotation': {'key': 'annotation', 'type': 'ApiOperationAnnotation'}, - 'api': {'key': 'api', 'type': 'ApiReference'}, - 'inputs_definition': {'key': 'inputsDefinition', 'type': 'SwaggerSchema'}, - 'responses_definition': {'key': 'responsesDefinition', 'type': '{SwaggerSchema}'}, - 'is_webhook': {'key': 'isWebhook', 'type': 'bool'}, - 'is_notification': {'key': 'isNotification', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiOperationPropertiesDefinition, self).__init__(**kwargs) - self.summary = kwargs.get('summary', None) - self.description = kwargs.get('description', None) - self.visibility = kwargs.get('visibility', None) - self.trigger = kwargs.get('trigger', None) - self.trigger_hint = kwargs.get('trigger_hint', None) - self.pageable = kwargs.get('pageable', None) - self.annotation = kwargs.get('annotation', None) - self.api = kwargs.get('api', None) - self.inputs_definition = kwargs.get('inputs_definition', None) - self.responses_definition = kwargs.get('responses_definition', None) - self.is_webhook = kwargs.get('is_webhook', None) - self.is_notification = kwargs.get('is_notification', None) - - -class ResourceReference(msrest.serialization.Model): - """The resource reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: The resource id. - :type id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceReference, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.type = None - - -class ApiReference(ResourceReference): - """The Api reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: The resource id. - :type id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param display_name: The display name of the api. - :type display_name: str - :param description: The description of the api. - :type description: str - :param icon_uri: The icon uri of the api. - :type icon_uri: str - :param swagger: The swagger of the api. - :type swagger: object - :param brand_color: The brand color of the api. - :type brand_color: str - :param category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", - "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier - :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'icon_uri': {'key': 'iconUri', 'type': 'str'}, - 'swagger': {'key': 'swagger', 'type': 'object'}, - 'brand_color': {'key': 'brandColor', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'integration_service_environment': {'key': 'integrationServiceEnvironment', 'type': 'ResourceReference'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiReference, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.icon_uri = kwargs.get('icon_uri', None) - self.swagger = kwargs.get('swagger', None) - self.brand_color = kwargs.get('brand_color', None) - self.category = kwargs.get('category', None) - self.integration_service_environment = kwargs.get('integration_service_environment', None) - - -class ApiResourceBackendService(msrest.serialization.Model): - """The API backend service. - - :param service_url: The service URL. - :type service_url: str - """ - - _attribute_map = { - 'service_url': {'key': 'serviceUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiResourceBackendService, self).__init__(**kwargs) - self.service_url = kwargs.get('service_url', None) - - -class ApiResourceDefinitions(msrest.serialization.Model): - """The Api resource definition. - - :param original_swagger_url: The original swagger url. - :type original_swagger_url: str - :param modified_swagger_url: The modified swagger url. - :type modified_swagger_url: str - """ - - _attribute_map = { - 'original_swagger_url': {'key': 'originalSwaggerUrl', 'type': 'str'}, - 'modified_swagger_url': {'key': 'modifiedSwaggerUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiResourceDefinitions, self).__init__(**kwargs) - self.original_swagger_url = kwargs.get('original_swagger_url', None) - self.modified_swagger_url = kwargs.get('modified_swagger_url', None) - - -class ApiResourceGeneralInformation(msrest.serialization.Model): - """The API general information. - - :param icon_url: The icon url. - :type icon_url: str - :param display_name: The display name. - :type display_name: str - :param description: The description. - :type description: str - :param terms_of_use_url: The terms of use url. - :type terms_of_use_url: str - :param release_tag: The release tag. - :type release_tag: str - :param tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", - "Premium". - :type tier: str or ~azure.mgmt.logic.models.ApiTier - """ - - _attribute_map = { - 'icon_url': {'key': 'iconUrl', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'terms_of_use_url': {'key': 'termsOfUseUrl', 'type': 'str'}, - 'release_tag': {'key': 'releaseTag', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiResourceGeneralInformation, self).__init__(**kwargs) - self.icon_url = kwargs.get('icon_url', None) - self.display_name = kwargs.get('display_name', None) - self.description = kwargs.get('description', None) - self.terms_of_use_url = kwargs.get('terms_of_use_url', None) - self.release_tag = kwargs.get('release_tag', None) - self.tier = kwargs.get('tier', None) - - -class ApiResourceMetadata(msrest.serialization.Model): - """The api resource metadata. - - :param source: The source. - :type source: str - :param brand_color: The brand color. - :type brand_color: str - :param hide_key: The hide key. - :type hide_key: str - :param tags: A set of tags. The tags. - :type tags: dict[str, str] - :param api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". - :type api_type: str or ~azure.mgmt.logic.models.ApiType - :param wsdl_service: The WSDL service. - :type wsdl_service: ~azure.mgmt.logic.models.WsdlService - :param wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", - "SoapToRest", "SoapPassThrough". - :type wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod - :param connection_type: The connection type. - :type connection_type: str - :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", - "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", - "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", - "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :param deployment_parameters: The connector deployment parameters metadata. - :type deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet - """ - - _attribute_map = { - 'source': {'key': 'source', 'type': 'str'}, - 'brand_color': {'key': 'brandColor', 'type': 'str'}, - 'hide_key': {'key': 'hideKey', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'api_type': {'key': 'ApiType', 'type': 'str'}, - 'wsdl_service': {'key': 'wsdlService', 'type': 'WsdlService'}, - 'wsdl_import_method': {'key': 'wsdlImportMethod', 'type': 'str'}, - 'connection_type': {'key': 'connectionType', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'deployment_parameters': {'key': 'deploymentParameters', 'type': 'ApiDeploymentParameterMetadataSet'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiResourceMetadata, self).__init__(**kwargs) - self.source = kwargs.get('source', None) - self.brand_color = kwargs.get('brand_color', None) - self.hide_key = kwargs.get('hide_key', None) - self.tags = kwargs.get('tags', None) - self.api_type = kwargs.get('api_type', None) - self.wsdl_service = kwargs.get('wsdl_service', None) - self.wsdl_import_method = kwargs.get('wsdl_import_method', None) - self.connection_type = kwargs.get('connection_type', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.deployment_parameters = kwargs.get('deployment_parameters', None) - - -class ApiResourcePolicies(msrest.serialization.Model): - """The API resource policies. - - :param content: The API level only policies XML as embedded content. - :type content: str - :param content_link: The content link to the policies. - :type content_link: str - """ - - _attribute_map = { - 'content': {'key': 'content', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiResourcePolicies, self).__init__(**kwargs) - self.content = kwargs.get('content', None) - self.content_link = kwargs.get('content_link', None) - - -class ApiResourceProperties(msrest.serialization.Model): - """The API resource properties. - - :param name: The name. - :type name: str - :param connection_parameters: The connection parameters. - :type connection_parameters: dict[str, object] - :param metadata: The metadata. - :type metadata: ~azure.mgmt.logic.models.ApiResourceMetadata - :param runtime_urls: The runtime urls. - :type runtime_urls: list[str] - :param general_information: The api general information. - :type general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation - :param capabilities: The capabilities. - :type capabilities: list[str] - :param backend_service: The backend service. - :type backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService - :param policies: The policies for the API. - :type policies: ~azure.mgmt.logic.models.ApiResourcePolicies - :param api_definition_url: The API definition. - :type api_definition_url: str - :param api_definitions: The api definitions. - :type api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions - :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", - "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", - "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", - "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :param category: The category. Possible values include: "NotSpecified", "Enterprise", - "Standard", "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'connection_parameters': {'key': 'connectionParameters', 'type': '{object}'}, - 'metadata': {'key': 'metadata', 'type': 'ApiResourceMetadata'}, - 'runtime_urls': {'key': 'runtimeUrls', 'type': '[str]'}, - 'general_information': {'key': 'generalInformation', 'type': 'ApiResourceGeneralInformation'}, - 'capabilities': {'key': 'capabilities', 'type': '[str]'}, - 'backend_service': {'key': 'backendService', 'type': 'ApiResourceBackendService'}, - 'policies': {'key': 'policies', 'type': 'ApiResourcePolicies'}, - 'api_definition_url': {'key': 'apiDefinitionUrl', 'type': 'str'}, - 'api_definitions': {'key': 'apiDefinitions', 'type': 'ApiResourceDefinitions'}, - 'integration_service_environment': {'key': 'integrationServiceEnvironment', 'type': 'ResourceReference'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApiResourceProperties, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.connection_parameters = kwargs.get('connection_parameters', None) - self.metadata = kwargs.get('metadata', None) - self.runtime_urls = kwargs.get('runtime_urls', None) - self.general_information = kwargs.get('general_information', None) - self.capabilities = kwargs.get('capabilities', None) - self.backend_service = kwargs.get('backend_service', None) - self.policies = kwargs.get('policies', None) - self.api_definition_url = kwargs.get('api_definition_url', None) - self.api_definitions = kwargs.get('api_definitions', None) - self.integration_service_environment = kwargs.get('integration_service_environment', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.category = kwargs.get('category', None) - - -class ArtifactProperties(msrest.serialization.Model): - """The artifact properties definition. - - :param created_time: The artifact creation time. - :type created_time: ~datetime.datetime - :param changed_time: The artifact changed time. - :type changed_time: ~datetime.datetime - :param metadata: Any object. - :type metadata: object - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(ArtifactProperties, self).__init__(**kwargs) - self.created_time = kwargs.get('created_time', None) - self.changed_time = kwargs.get('changed_time', None) - self.metadata = kwargs.get('metadata', None) - - -class ArtifactContentPropertiesDefinition(ArtifactProperties): - """The artifact content properties definition. - - :param created_time: The artifact creation time. - :type created_time: ~datetime.datetime - :param changed_time: The artifact changed time. - :type changed_time: ~datetime.datetime - :param metadata: Any object. - :type metadata: object - :param content: Any object. - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - } - - def __init__( - self, - **kwargs - ): - super(ArtifactContentPropertiesDefinition, self).__init__(**kwargs) - self.content = kwargs.get('content', None) - self.content_type = kwargs.get('content_type', None) - self.content_link = kwargs.get('content_link', None) - - -class As2AcknowledgementConnectionSettings(msrest.serialization.Model): - """The AS2 agreement acknowledgement connection settings. - - All required parameters must be populated in order to send to Azure. - - :param ignore_certificate_name_mismatch: Required. Indicates whether to ignore mismatch in - certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. Indicates whether to support HTTP status - code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. Indicates whether to keep the connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. Indicates whether to unfold the HTTP headers. - :type unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(As2AcknowledgementConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = kwargs['ignore_certificate_name_mismatch'] - self.support_http_status_code_continue = kwargs['support_http_status_code_continue'] - self.keep_http_connection_alive = kwargs['keep_http_connection_alive'] - self.unfold_http_headers = kwargs['unfold_http_headers'] - - -class As2AgreementContent(msrest.serialization.Model): - """The integration account AS2 agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The AS2 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement - :param send_agreement: Required. The AS2 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'As2OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'As2OneWayAgreement'}, - } - - def __init__( - self, - **kwargs - ): - super(As2AgreementContent, self).__init__(**kwargs) - self.receive_agreement = kwargs['receive_agreement'] - self.send_agreement = kwargs['send_agreement'] - - -class As2EnvelopeSettings(msrest.serialization.Model): - """The AS2 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param message_content_type: Required. The message content type. - :type message_content_type: str - :param transmit_file_name_in_mime_header: Required. The value indicating whether to transmit - file name in mime header. - :type transmit_file_name_in_mime_header: bool - :param file_name_template: Required. The template for file name. - :type file_name_template: str - :param suspend_message_on_file_name_generation_error: Required. The value indicating whether to - suspend message on file name generation error. - :type suspend_message_on_file_name_generation_error: bool - :param autogenerate_file_name: Required. The value indicating whether to auto generate file - name. - :type autogenerate_file_name: bool - """ - - _validation = { - 'message_content_type': {'required': True}, - 'transmit_file_name_in_mime_header': {'required': True}, - 'file_name_template': {'required': True}, - 'suspend_message_on_file_name_generation_error': {'required': True}, - 'autogenerate_file_name': {'required': True}, - } - - _attribute_map = { - 'message_content_type': {'key': 'messageContentType', 'type': 'str'}, - 'transmit_file_name_in_mime_header': {'key': 'transmitFileNameInMimeHeader', 'type': 'bool'}, - 'file_name_template': {'key': 'fileNameTemplate', 'type': 'str'}, - 'suspend_message_on_file_name_generation_error': {'key': 'suspendMessageOnFileNameGenerationError', 'type': 'bool'}, - 'autogenerate_file_name': {'key': 'autogenerateFileName', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(As2EnvelopeSettings, self).__init__(**kwargs) - self.message_content_type = kwargs['message_content_type'] - self.transmit_file_name_in_mime_header = kwargs['transmit_file_name_in_mime_header'] - self.file_name_template = kwargs['file_name_template'] - self.suspend_message_on_file_name_generation_error = kwargs['suspend_message_on_file_name_generation_error'] - self.autogenerate_file_name = kwargs['autogenerate_file_name'] - - -class As2ErrorSettings(msrest.serialization.Model): - """The AS2 agreement error settings. - - All required parameters must be populated in order to send to Azure. - - :param suspend_duplicate_message: Required. The value indicating whether to suspend duplicate - message. - :type suspend_duplicate_message: bool - :param resend_if_mdn_not_received: Required. The value indicating whether to resend message If - MDN is not received. - :type resend_if_mdn_not_received: bool - """ - - _validation = { - 'suspend_duplicate_message': {'required': True}, - 'resend_if_mdn_not_received': {'required': True}, - } - - _attribute_map = { - 'suspend_duplicate_message': {'key': 'suspendDuplicateMessage', 'type': 'bool'}, - 'resend_if_mdn_not_received': {'key': 'resendIfMDNNotReceived', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(As2ErrorSettings, self).__init__(**kwargs) - self.suspend_duplicate_message = kwargs['suspend_duplicate_message'] - self.resend_if_mdn_not_received = kwargs['resend_if_mdn_not_received'] - - -class As2MdnSettings(msrest.serialization.Model): - """The AS2 agreement mdn settings. - - All required parameters must be populated in order to send to Azure. - - :param need_mdn: Required. The value indicating whether to send or request a MDN. - :type need_mdn: bool - :param sign_mdn: Required. The value indicating whether the MDN needs to be signed or not. - :type sign_mdn: bool - :param send_mdn_asynchronously: Required. The value indicating whether to send the asynchronous - MDN. - :type send_mdn_asynchronously: bool - :param receipt_delivery_url: The receipt delivery URL. - :type receipt_delivery_url: str - :param disposition_notification_to: The disposition notification to header value. - :type disposition_notification_to: str - :param sign_outbound_mdn_if_optional: Required. The value indicating whether to sign the - outbound MDN if optional. - :type sign_outbound_mdn_if_optional: bool - :param mdn_text: The MDN text. - :type mdn_text: str - :param send_inbound_mdn_to_message_box: Required. The value indicating whether to send inbound - MDN to message box. - :type send_inbound_mdn_to_message_box: bool - :param mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values - include: "NotSpecified", "None", "MD5", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm - """ - - _validation = { - 'need_mdn': {'required': True}, - 'sign_mdn': {'required': True}, - 'send_mdn_asynchronously': {'required': True}, - 'sign_outbound_mdn_if_optional': {'required': True}, - 'send_inbound_mdn_to_message_box': {'required': True}, - 'mic_hashing_algorithm': {'required': True}, - } - - _attribute_map = { - 'need_mdn': {'key': 'needMDN', 'type': 'bool'}, - 'sign_mdn': {'key': 'signMDN', 'type': 'bool'}, - 'send_mdn_asynchronously': {'key': 'sendMDNAsynchronously', 'type': 'bool'}, - 'receipt_delivery_url': {'key': 'receiptDeliveryUrl', 'type': 'str'}, - 'disposition_notification_to': {'key': 'dispositionNotificationTo', 'type': 'str'}, - 'sign_outbound_mdn_if_optional': {'key': 'signOutboundMDNIfOptional', 'type': 'bool'}, - 'mdn_text': {'key': 'mdnText', 'type': 'str'}, - 'send_inbound_mdn_to_message_box': {'key': 'sendInboundMDNToMessageBox', 'type': 'bool'}, - 'mic_hashing_algorithm': {'key': 'micHashingAlgorithm', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(As2MdnSettings, self).__init__(**kwargs) - self.need_mdn = kwargs['need_mdn'] - self.sign_mdn = kwargs['sign_mdn'] - self.send_mdn_asynchronously = kwargs['send_mdn_asynchronously'] - self.receipt_delivery_url = kwargs.get('receipt_delivery_url', None) - self.disposition_notification_to = kwargs.get('disposition_notification_to', None) - self.sign_outbound_mdn_if_optional = kwargs['sign_outbound_mdn_if_optional'] - self.mdn_text = kwargs.get('mdn_text', None) - self.send_inbound_mdn_to_message_box = kwargs['send_inbound_mdn_to_message_box'] - self.mic_hashing_algorithm = kwargs['mic_hashing_algorithm'] - - -class As2MessageConnectionSettings(msrest.serialization.Model): - """The AS2 agreement message connection settings. - - All required parameters must be populated in order to send to Azure. - - :param ignore_certificate_name_mismatch: Required. The value indicating whether to ignore - mismatch in certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. The value indicating whether to support - HTTP status code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. The value indicating whether to keep the - connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. The value indicating whether to unfold the HTTP headers. - :type unfold_http_headers: bool - """ - - _validation = { - 'ignore_certificate_name_mismatch': {'required': True}, - 'support_http_status_code_continue': {'required': True}, - 'keep_http_connection_alive': {'required': True}, - 'unfold_http_headers': {'required': True}, - } - - _attribute_map = { - 'ignore_certificate_name_mismatch': {'key': 'ignoreCertificateNameMismatch', 'type': 'bool'}, - 'support_http_status_code_continue': {'key': 'supportHttpStatusCodeContinue', 'type': 'bool'}, - 'keep_http_connection_alive': {'key': 'keepHttpConnectionAlive', 'type': 'bool'}, - 'unfold_http_headers': {'key': 'unfoldHttpHeaders', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(As2MessageConnectionSettings, self).__init__(**kwargs) - self.ignore_certificate_name_mismatch = kwargs['ignore_certificate_name_mismatch'] - self.support_http_status_code_continue = kwargs['support_http_status_code_continue'] - self.keep_http_connection_alive = kwargs['keep_http_connection_alive'] - self.unfold_http_headers = kwargs['unfold_http_headers'] - - -class As2OneWayAgreement(msrest.serialization.Model): - """The integration account AS2 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The AS2 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.As2ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'As2ProtocolSettings'}, - } - - def __init__( - self, - **kwargs - ): - super(As2OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = kwargs['sender_business_identity'] - self.receiver_business_identity = kwargs['receiver_business_identity'] - self.protocol_settings = kwargs['protocol_settings'] - - -class As2ProtocolSettings(msrest.serialization.Model): - """The AS2 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param message_connection_settings: Required. The message connection settings. - :type message_connection_settings: ~azure.mgmt.logic.models.As2MessageConnectionSettings - :param acknowledgement_connection_settings: Required. The acknowledgement connection settings. - :type acknowledgement_connection_settings: - ~azure.mgmt.logic.models.As2AcknowledgementConnectionSettings - :param mdn_settings: Required. The MDN settings. - :type mdn_settings: ~azure.mgmt.logic.models.As2MdnSettings - :param security_settings: Required. The security settings. - :type security_settings: ~azure.mgmt.logic.models.As2SecuritySettings - :param validation_settings: Required. The validation settings. - :type validation_settings: ~azure.mgmt.logic.models.As2ValidationSettings - :param envelope_settings: Required. The envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.As2EnvelopeSettings - :param error_settings: Required. The error settings. - :type error_settings: ~azure.mgmt.logic.models.As2ErrorSettings - """ - - _validation = { - 'message_connection_settings': {'required': True}, - 'acknowledgement_connection_settings': {'required': True}, - 'mdn_settings': {'required': True}, - 'security_settings': {'required': True}, - 'validation_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'error_settings': {'required': True}, - } - - _attribute_map = { - 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'As2MessageConnectionSettings'}, - 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'As2AcknowledgementConnectionSettings'}, - 'mdn_settings': {'key': 'mdnSettings', 'type': 'As2MdnSettings'}, - 'security_settings': {'key': 'securitySettings', 'type': 'As2SecuritySettings'}, - 'validation_settings': {'key': 'validationSettings', 'type': 'As2ValidationSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'As2EnvelopeSettings'}, - 'error_settings': {'key': 'errorSettings', 'type': 'As2ErrorSettings'}, - } - - def __init__( - self, - **kwargs - ): - super(As2ProtocolSettings, self).__init__(**kwargs) - self.message_connection_settings = kwargs['message_connection_settings'] - self.acknowledgement_connection_settings = kwargs['acknowledgement_connection_settings'] - self.mdn_settings = kwargs['mdn_settings'] - self.security_settings = kwargs['security_settings'] - self.validation_settings = kwargs['validation_settings'] - self.envelope_settings = kwargs['envelope_settings'] - self.error_settings = kwargs['error_settings'] - - -class As2SecuritySettings(msrest.serialization.Model): - """The AS2 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :param override_group_signing_certificate: Required. The value indicating whether to send or - request a MDN. - :type override_group_signing_certificate: bool - :param signing_certificate_name: The name of the signing certificate. - :type signing_certificate_name: str - :param encryption_certificate_name: The name of the encryption certificate. - :type encryption_certificate_name: str - :param enable_nrr_for_inbound_encoded_messages: Required. The value indicating whether to - enable NRR for inbound encoded messages. - :type enable_nrr_for_inbound_encoded_messages: bool - :param enable_nrr_for_inbound_decoded_messages: Required. The value indicating whether to - enable NRR for inbound decoded messages. - :type enable_nrr_for_inbound_decoded_messages: bool - :param enable_nrr_for_outbound_mdn: Required. The value indicating whether to enable NRR for - outbound MDN. - :type enable_nrr_for_outbound_mdn: bool - :param enable_nrr_for_outbound_encoded_messages: Required. The value indicating whether to - enable NRR for outbound encoded messages. - :type enable_nrr_for_outbound_encoded_messages: bool - :param enable_nrr_for_outbound_decoded_messages: Required. The value indicating whether to - enable NRR for outbound decoded messages. - :type enable_nrr_for_outbound_decoded_messages: bool - :param enable_nrr_for_inbound_mdn: Required. The value indicating whether to enable NRR for - inbound MDN. - :type enable_nrr_for_inbound_mdn: bool - :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, - ShaHyphenHashSize, Sha2UnderscoreHashSize. - :type sha2_algorithm_format: str - """ - - _validation = { - 'override_group_signing_certificate': {'required': True}, - 'enable_nrr_for_inbound_encoded_messages': {'required': True}, - 'enable_nrr_for_inbound_decoded_messages': {'required': True}, - 'enable_nrr_for_outbound_mdn': {'required': True}, - 'enable_nrr_for_outbound_encoded_messages': {'required': True}, - 'enable_nrr_for_outbound_decoded_messages': {'required': True}, - 'enable_nrr_for_inbound_mdn': {'required': True}, - } - - _attribute_map = { - 'override_group_signing_certificate': {'key': 'overrideGroupSigningCertificate', 'type': 'bool'}, - 'signing_certificate_name': {'key': 'signingCertificateName', 'type': 'str'}, - 'encryption_certificate_name': {'key': 'encryptionCertificateName', 'type': 'str'}, - 'enable_nrr_for_inbound_encoded_messages': {'key': 'enableNRRForInboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_decoded_messages': {'key': 'enableNRRForInboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_mdn': {'key': 'enableNRRForOutboundMDN', 'type': 'bool'}, - 'enable_nrr_for_outbound_encoded_messages': {'key': 'enableNRRForOutboundEncodedMessages', 'type': 'bool'}, - 'enable_nrr_for_outbound_decoded_messages': {'key': 'enableNRRForOutboundDecodedMessages', 'type': 'bool'}, - 'enable_nrr_for_inbound_mdn': {'key': 'enableNRRForInboundMDN', 'type': 'bool'}, - 'sha2_algorithm_format': {'key': 'sha2AlgorithmFormat', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(As2SecuritySettings, self).__init__(**kwargs) - self.override_group_signing_certificate = kwargs['override_group_signing_certificate'] - self.signing_certificate_name = kwargs.get('signing_certificate_name', None) - self.encryption_certificate_name = kwargs.get('encryption_certificate_name', None) - self.enable_nrr_for_inbound_encoded_messages = kwargs['enable_nrr_for_inbound_encoded_messages'] - self.enable_nrr_for_inbound_decoded_messages = kwargs['enable_nrr_for_inbound_decoded_messages'] - self.enable_nrr_for_outbound_mdn = kwargs['enable_nrr_for_outbound_mdn'] - self.enable_nrr_for_outbound_encoded_messages = kwargs['enable_nrr_for_outbound_encoded_messages'] - self.enable_nrr_for_outbound_decoded_messages = kwargs['enable_nrr_for_outbound_decoded_messages'] - self.enable_nrr_for_inbound_mdn = kwargs['enable_nrr_for_inbound_mdn'] - self.sha2_algorithm_format = kwargs.get('sha2_algorithm_format', None) - - -class As2ValidationSettings(msrest.serialization.Model): - """The AS2 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param override_message_properties: Required. The value indicating whether to override incoming - message properties with those in agreement. - :type override_message_properties: bool - :param encrypt_message: Required. The value indicating whether the message has to be encrypted. - :type encrypt_message: bool - :param sign_message: Required. The value indicating whether the message has to be signed. - :type sign_message: bool - :param compress_message: Required. The value indicating whether the message has to be - compressed. - :type compress_message: bool - :param check_duplicate_message: Required. The value indicating whether to check for duplicate - message. - :type check_duplicate_message: bool - :param interchange_duplicates_validity_days: Required. The number of days to look back for - duplicate interchange. - :type interchange_duplicates_validity_days: int - :param check_certificate_revocation_list_on_send: Required. The value indicating whether to - check for certificate revocation list on send. - :type check_certificate_revocation_list_on_send: bool - :param check_certificate_revocation_list_on_receive: Required. The value indicating whether to - check for certificate revocation list on receive. - :type check_certificate_revocation_list_on_receive: bool - :param encryption_algorithm: Required. The encryption algorithm. Possible values include: - "NotSpecified", "None", "DES3", "RC2", "AES128", "AES192", "AES256". - :type encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm - :param signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", - "Default", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm - """ - - _validation = { - 'override_message_properties': {'required': True}, - 'encrypt_message': {'required': True}, - 'sign_message': {'required': True}, - 'compress_message': {'required': True}, - 'check_duplicate_message': {'required': True}, - 'interchange_duplicates_validity_days': {'required': True}, - 'check_certificate_revocation_list_on_send': {'required': True}, - 'check_certificate_revocation_list_on_receive': {'required': True}, - 'encryption_algorithm': {'required': True}, - } - - _attribute_map = { - 'override_message_properties': {'key': 'overrideMessageProperties', 'type': 'bool'}, - 'encrypt_message': {'key': 'encryptMessage', 'type': 'bool'}, - 'sign_message': {'key': 'signMessage', 'type': 'bool'}, - 'compress_message': {'key': 'compressMessage', 'type': 'bool'}, - 'check_duplicate_message': {'key': 'checkDuplicateMessage', 'type': 'bool'}, - 'interchange_duplicates_validity_days': {'key': 'interchangeDuplicatesValidityDays', 'type': 'int'}, - 'check_certificate_revocation_list_on_send': {'key': 'checkCertificateRevocationListOnSend', 'type': 'bool'}, - 'check_certificate_revocation_list_on_receive': {'key': 'checkCertificateRevocationListOnReceive', 'type': 'bool'}, - 'encryption_algorithm': {'key': 'encryptionAlgorithm', 'type': 'str'}, - 'signing_algorithm': {'key': 'signingAlgorithm', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(As2ValidationSettings, self).__init__(**kwargs) - self.override_message_properties = kwargs['override_message_properties'] - self.encrypt_message = kwargs['encrypt_message'] - self.sign_message = kwargs['sign_message'] - self.compress_message = kwargs['compress_message'] - self.check_duplicate_message = kwargs['check_duplicate_message'] - self.interchange_duplicates_validity_days = kwargs['interchange_duplicates_validity_days'] - self.check_certificate_revocation_list_on_send = kwargs['check_certificate_revocation_list_on_send'] - self.check_certificate_revocation_list_on_receive = kwargs['check_certificate_revocation_list_on_receive'] - self.encryption_algorithm = kwargs['encryption_algorithm'] - self.signing_algorithm = kwargs.get('signing_algorithm', None) - - -class AssemblyCollection(msrest.serialization.Model): - """A collection of assembly definitions. - - :param value: - :type value: list[~azure.mgmt.logic.models.AssemblyDefinition] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[AssemblyDefinition]'}, - } - - def __init__( - self, - **kwargs - ): - super(AssemblyCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class AssemblyDefinition(Resource): - """The assembly definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: Required. The assembly properties. - :type properties: ~azure.mgmt.logic.models.AssemblyProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'AssemblyProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(AssemblyDefinition, self).__init__(**kwargs) - self.properties = kwargs['properties'] - - -class AssemblyProperties(ArtifactContentPropertiesDefinition): - """The assembly properties definition. - - All required parameters must be populated in order to send to Azure. - - :param created_time: The artifact creation time. - :type created_time: ~datetime.datetime - :param changed_time: The artifact changed time. - :type changed_time: ~datetime.datetime - :param metadata: Any object. - :type metadata: object - :param content: Any object. - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink - :param assembly_name: Required. The assembly name. - :type assembly_name: str - :param assembly_version: The assembly version. - :type assembly_version: str - :param assembly_culture: The assembly culture. - :type assembly_culture: str - :param assembly_public_key_token: The assembly public key token. - :type assembly_public_key_token: str - """ - - _validation = { - 'assembly_name': {'required': True}, - } - - _attribute_map = { - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'content': {'key': 'content', 'type': 'object'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'content_link': {'key': 'contentLink', 'type': 'ContentLink'}, - 'assembly_name': {'key': 'assemblyName', 'type': 'str'}, - 'assembly_version': {'key': 'assemblyVersion', 'type': 'str'}, - 'assembly_culture': {'key': 'assemblyCulture', 'type': 'str'}, - 'assembly_public_key_token': {'key': 'assemblyPublicKeyToken', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AssemblyProperties, self).__init__(**kwargs) - self.assembly_name = kwargs['assembly_name'] - self.assembly_version = kwargs.get('assembly_version', None) - self.assembly_culture = kwargs.get('assembly_culture', None) - self.assembly_public_key_token = kwargs.get('assembly_public_key_token', None) - - -class ErrorInfo(msrest.serialization.Model): - """The error info. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. - :type code: str - """ - - _validation = { - 'code': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorInfo, self).__init__(**kwargs) - self.code = kwargs['code'] - - -class AzureResourceErrorInfo(ErrorInfo): - """The azure resource error info. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. - :type code: str - :param message: Required. The error message. - :type message: str - :param details: The error details. - :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[AzureResourceErrorInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureResourceErrorInfo, self).__init__(**kwargs) - self.message = kwargs['message'] - self.details = kwargs.get('details', None) - - -class B2BPartnerContent(msrest.serialization.Model): - """The B2B partner content. - - :param business_identities: The list of partner business identities. - :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] - """ - - _attribute_map = { - 'business_identities': {'key': 'businessIdentities', 'type': '[BusinessIdentity]'}, - } - - def __init__( - self, - **kwargs - ): - super(B2BPartnerContent, self).__init__(**kwargs) - self.business_identities = kwargs.get('business_identities', None) - - -class BatchConfiguration(Resource): - """The batch configuration resource definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: Required. The batch configuration properties. - :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'properties': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'BatchConfigurationProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(BatchConfiguration, self).__init__(**kwargs) - self.properties = kwargs['properties'] - - -class BatchConfigurationCollection(msrest.serialization.Model): - """A collection of batch configurations. - - :param value: - :type value: list[~azure.mgmt.logic.models.BatchConfiguration] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BatchConfiguration]'}, - } - - def __init__( - self, - **kwargs - ): - super(BatchConfigurationCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class BatchConfigurationProperties(ArtifactProperties): - """The batch configuration properties definition. - - All required parameters must be populated in order to send to Azure. - - :param metadata: Any object. - :type metadata: object - :param batch_group_name: Required. The name of the batch group. - :type batch_group_name: str - :param release_criteria: Required. The batch release criteria. - :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - :param created_time: The created time. - :type created_time: ~datetime.datetime - :param changed_time: The changed time. - :type changed_time: ~datetime.datetime - """ - - _validation = { - 'batch_group_name': {'required': True}, - 'release_criteria': {'required': True}, - } - - _attribute_map = { - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, - 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(BatchConfigurationProperties, self).__init__(**kwargs) - self.batch_group_name = kwargs['batch_group_name'] - self.release_criteria = kwargs['release_criteria'] - self.created_time = kwargs.get('created_time', None) - self.changed_time = kwargs.get('changed_time', None) - - -class BatchReleaseCriteria(msrest.serialization.Model): - """The batch release criteria. - - :param message_count: The message count. - :type message_count: int - :param batch_size: The batch size in bytes. - :type batch_size: int - :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - """ - - _attribute_map = { - 'message_count': {'key': 'messageCount', 'type': 'int'}, - 'batch_size': {'key': 'batchSize', 'type': 'int'}, - 'recurrence': {'key': 'recurrence', 'type': 'WorkflowTriggerRecurrence'}, - } - - def __init__( - self, - **kwargs - ): - super(BatchReleaseCriteria, self).__init__(**kwargs) - self.message_count = kwargs.get('message_count', None) - self.batch_size = kwargs.get('batch_size', None) - self.recurrence = kwargs.get('recurrence', None) - - -class BusinessIdentity(msrest.serialization.Model): - """The integration account partner's business identity. - - All required parameters must be populated in order to send to Azure. - - :param qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32. - :type qualifier: str - :param value: Required. The user defined business identity value. - :type value: str - """ - - _validation = { - 'qualifier': {'required': True}, - 'value': {'required': True}, - } - - _attribute_map = { - 'qualifier': {'key': 'qualifier', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BusinessIdentity, self).__init__(**kwargs) - self.qualifier = kwargs['qualifier'] - self.value = kwargs['value'] - - -class CallbackUrl(msrest.serialization.Model): - """The callback url. - - :param value: The URL value. - :type value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CallbackUrl, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ContentHash(msrest.serialization.Model): - """The content hash. - - :param algorithm: The algorithm of the content hash. - :type algorithm: str - :param value: The value of the content hash. - :type value: str - """ - - _attribute_map = { - 'algorithm': {'key': 'algorithm', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ContentHash, self).__init__(**kwargs) - self.algorithm = kwargs.get('algorithm', None) - self.value = kwargs.get('value', None) - - -class ContentLink(msrest.serialization.Model): - """The content link. - - :param uri: The content link URI. - :type uri: str - :param content_version: The content version. - :type content_version: str - :param content_size: The content size. - :type content_size: long - :param content_hash: The content hash. - :type content_hash: ~azure.mgmt.logic.models.ContentHash - :param metadata: The metadata. - :type metadata: object - """ - - _attribute_map = { - 'uri': {'key': 'uri', 'type': 'str'}, - 'content_version': {'key': 'contentVersion', 'type': 'str'}, - 'content_size': {'key': 'contentSize', 'type': 'long'}, - 'content_hash': {'key': 'contentHash', 'type': 'ContentHash'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(ContentLink, self).__init__(**kwargs) - self.uri = kwargs.get('uri', None) - self.content_version = kwargs.get('content_version', None) - self.content_size = kwargs.get('content_size', None) - self.content_hash = kwargs.get('content_hash', None) - self.metadata = kwargs.get('metadata', None) - - -class Correlation(msrest.serialization.Model): - """The correlation property. - - :param client_tracking_id: The client tracking id. - :type client_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Correlation, self).__init__(**kwargs) - self.client_tracking_id = kwargs.get('client_tracking_id', None) - - -class EdifactAcknowledgementSettings(msrest.serialization.Model): - """The Edifact agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :param need_technical_acknowledgement: Required. The value indicating whether technical - acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating whether to batch the - technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating whether functional - acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param batch_functional_acknowledgements: Required. The value indicating whether to batch - functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating whether a loop is needed - for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating whether to send - synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The acknowledgement control number - lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The acknowledgement control number - upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value indicating whether to - rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactAcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = kwargs['need_technical_acknowledgement'] - self.batch_technical_acknowledgements = kwargs['batch_technical_acknowledgements'] - self.need_functional_acknowledgement = kwargs['need_functional_acknowledgement'] - self.batch_functional_acknowledgements = kwargs['batch_functional_acknowledgements'] - self.need_loop_for_valid_messages = kwargs['need_loop_for_valid_messages'] - self.send_synchronous_acknowledgement = kwargs['send_synchronous_acknowledgement'] - self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) - self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) - self.acknowledgement_control_number_lower_bound = kwargs['acknowledgement_control_number_lower_bound'] - self.acknowledgement_control_number_upper_bound = kwargs['acknowledgement_control_number_upper_bound'] - self.rollover_acknowledgement_control_number = kwargs['rollover_acknowledgement_control_number'] - - -class EdifactAgreementContent(msrest.serialization.Model): - """The Edifact agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The EDIFACT one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - :param send_agreement: Required. The EDIFACT one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'EdifactOneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'EdifactOneWayAgreement'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactAgreementContent, self).__init__(**kwargs) - self.receive_agreement = kwargs['receive_agreement'] - self.send_agreement = kwargs['send_agreement'] - - -class EdifactDelimiterOverride(msrest.serialization.Model): - """The Edifact delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: The message id. - :type message_id: str - :param message_version: The message version. - :type message_version: str - :param message_release: The message release. - :type message_release: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param decimal_point_indicator: Required. The decimal point indicator. Possible values include: - "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param message_association_assigned_code: The message association assigned code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this delimiter settings has to be - applied. - :type target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'repetition_separator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'release_indicator': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'str'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactDelimiterOverride, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.message_version = kwargs.get('message_version', None) - self.message_release = kwargs.get('message_release', None) - self.data_element_separator = kwargs['data_element_separator'] - self.component_separator = kwargs['component_separator'] - self.segment_terminator = kwargs['segment_terminator'] - self.repetition_separator = kwargs['repetition_separator'] - self.segment_terminator_suffix = kwargs['segment_terminator_suffix'] - self.decimal_point_indicator = kwargs['decimal_point_indicator'] - self.release_indicator = kwargs['release_indicator'] - self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) - self.target_namespace = kwargs.get('target_namespace', None) - - -class EdifactEnvelopeOverride(msrest.serialization.Model): - """The Edifact envelope override settings. - - :param message_id: The message id on which this envelope settings has to be applied. - :type message_id: str - :param message_version: The message version on which this envelope settings has to be applied. - :type message_version: str - :param message_release: The message release version on which this envelope settings has to be - applied. - :type message_release: str - :param message_association_assigned_code: The message association assigned code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this envelope settings has to be - applied. - :type target_namespace: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param receiver_application_qualifier: The receiver application qualifier. - :type receiver_application_qualifier: str - :param receiver_application_id: The receiver application id. - :type receiver_application_id: str - :param controlling_agency_code: The controlling agency code. - :type controlling_agency_code: str - :param group_header_message_version: The group header message version. - :type group_header_message_version: str - :param group_header_message_release: The group header message release. - :type group_header_message_release: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param application_password: The application password. - :type application_password: str - """ - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'message_association_assigned_code': {'key': 'messageAssociationAssignedCode', 'type': 'str'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_qualifier': {'key': 'receiverApplicationQualifier', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'controlling_agency_code': {'key': 'controllingAgencyCode', 'type': 'str'}, - 'group_header_message_version': {'key': 'groupHeaderMessageVersion', 'type': 'str'}, - 'group_header_message_release': {'key': 'groupHeaderMessageRelease', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'application_password': {'key': 'applicationPassword', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactEnvelopeOverride, self).__init__(**kwargs) - self.message_id = kwargs.get('message_id', None) - self.message_version = kwargs.get('message_version', None) - self.message_release = kwargs.get('message_release', None) - self.message_association_assigned_code = kwargs.get('message_association_assigned_code', None) - self.target_namespace = kwargs.get('target_namespace', None) - self.functional_group_id = kwargs.get('functional_group_id', None) - self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) - self.sender_application_id = kwargs.get('sender_application_id', None) - self.receiver_application_qualifier = kwargs.get('receiver_application_qualifier', None) - self.receiver_application_id = kwargs.get('receiver_application_id', None) - self.controlling_agency_code = kwargs.get('controlling_agency_code', None) - self.group_header_message_version = kwargs.get('group_header_message_version', None) - self.group_header_message_release = kwargs.get('group_header_message_release', None) - self.association_assigned_code = kwargs.get('association_assigned_code', None) - self.application_password = kwargs.get('application_password', None) - - -class EdifactEnvelopeSettings(msrest.serialization.Model): - """The Edifact agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param group_association_assigned_code: The group association assigned code. - :type group_association_assigned_code: str - :param communication_agreement_id: The communication agreement id. - :type communication_agreement_id: str - :param apply_delimiter_string_advice: Required. The value indicating whether to apply delimiter - string advice. - :type apply_delimiter_string_advice: bool - :param create_grouping_segments: Required. The value indicating whether to create grouping - segments. - :type create_grouping_segments: bool - :param enable_default_group_headers: Required. The value indicating whether to enable default - group headers. - :type enable_default_group_headers: bool - :param recipient_reference_password_value: The recipient reference password value. - :type recipient_reference_password_value: str - :param recipient_reference_password_qualifier: The recipient reference password qualifier. - :type recipient_reference_password_qualifier: str - :param application_reference_id: The application reference id. - :type application_reference_id: str - :param processing_priority_code: The processing priority code. - :type processing_priority_code: str - :param interchange_control_number_lower_bound: Required. The interchange control number lower - bound. - :type interchange_control_number_lower_bound: long - :param interchange_control_number_upper_bound: Required. The interchange control number upper - bound. - :type interchange_control_number_upper_bound: long - :param rollover_interchange_control_number: Required. The value indicating whether to rollover - interchange control number. - :type rollover_interchange_control_number: bool - :param interchange_control_number_prefix: The interchange control number prefix. - :type interchange_control_number_prefix: str - :param interchange_control_number_suffix: The interchange control number suffix. - :type interchange_control_number_suffix: str - :param sender_reverse_routing_address: The sender reverse routing address. - :type sender_reverse_routing_address: str - :param receiver_reverse_routing_address: The receiver reverse routing address. - :type receiver_reverse_routing_address: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_controlling_agency_code: The group controlling agency code. - :type group_controlling_agency_code: str - :param group_message_version: The group message version. - :type group_message_version: str - :param group_message_release: The group message release. - :type group_message_release: str - :param group_control_number_lower_bound: Required. The group control number lower bound. - :type group_control_number_lower_bound: long - :param group_control_number_upper_bound: Required. The group control number upper bound. - :type group_control_number_upper_bound: long - :param rollover_group_control_number: Required. The value indicating whether to rollover group - control number. - :type rollover_group_control_number: bool - :param group_control_number_prefix: The group control number prefix. - :type group_control_number_prefix: str - :param group_control_number_suffix: The group control number suffix. - :type group_control_number_suffix: str - :param group_application_receiver_qualifier: The group application receiver qualifier. - :type group_application_receiver_qualifier: str - :param group_application_receiver_id: The group application receiver id. - :type group_application_receiver_id: str - :param group_application_sender_qualifier: The group application sender qualifier. - :type group_application_sender_qualifier: str - :param group_application_sender_id: The group application sender id. - :type group_application_sender_id: str - :param group_application_password: The group application password. - :type group_application_password: str - :param overwrite_existing_transaction_set_control_number: Required. The value indicating - whether to overwrite existing transaction set control number. - :type overwrite_existing_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control number suffix. - :type transaction_set_control_number_suffix: str - :param transaction_set_control_number_lower_bound: Required. The transaction set control number - lower bound. - :type transaction_set_control_number_lower_bound: long - :param transaction_set_control_number_upper_bound: Required. The transaction set control number - upper bound. - :type transaction_set_control_number_upper_bound: long - :param rollover_transaction_set_control_number: Required. The value indicating whether to - rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param is_test_interchange: Required. The value indicating whether the message is a test - interchange. - :type is_test_interchange: bool - :param sender_internal_identification: The sender internal identification. - :type sender_internal_identification: str - :param sender_internal_sub_identification: The sender internal sub identification. - :type sender_internal_sub_identification: str - :param receiver_internal_identification: The receiver internal identification. - :type receiver_internal_identification: str - :param receiver_internal_sub_identification: The receiver internal sub identification. - :type receiver_internal_sub_identification: str - """ - - _validation = { - 'apply_delimiter_string_advice': {'required': True}, - 'create_grouping_segments': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'is_test_interchange': {'required': True}, - } - - _attribute_map = { - 'group_association_assigned_code': {'key': 'groupAssociationAssignedCode', 'type': 'str'}, - 'communication_agreement_id': {'key': 'communicationAgreementId', 'type': 'str'}, - 'apply_delimiter_string_advice': {'key': 'applyDelimiterStringAdvice', 'type': 'bool'}, - 'create_grouping_segments': {'key': 'createGroupingSegments', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'recipient_reference_password_value': {'key': 'recipientReferencePasswordValue', 'type': 'str'}, - 'recipient_reference_password_qualifier': {'key': 'recipientReferencePasswordQualifier', 'type': 'str'}, - 'application_reference_id': {'key': 'applicationReferenceId', 'type': 'str'}, - 'processing_priority_code': {'key': 'processingPriorityCode', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'long'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'long'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_prefix': {'key': 'interchangeControlNumberPrefix', 'type': 'str'}, - 'interchange_control_number_suffix': {'key': 'interchangeControlNumberSuffix', 'type': 'str'}, - 'sender_reverse_routing_address': {'key': 'senderReverseRoutingAddress', 'type': 'str'}, - 'receiver_reverse_routing_address': {'key': 'receiverReverseRoutingAddress', 'type': 'str'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_controlling_agency_code': {'key': 'groupControllingAgencyCode', 'type': 'str'}, - 'group_message_version': {'key': 'groupMessageVersion', 'type': 'str'}, - 'group_message_release': {'key': 'groupMessageRelease', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'long'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'long'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_control_number_prefix': {'key': 'groupControlNumberPrefix', 'type': 'str'}, - 'group_control_number_suffix': {'key': 'groupControlNumberSuffix', 'type': 'str'}, - 'group_application_receiver_qualifier': {'key': 'groupApplicationReceiverQualifier', 'type': 'str'}, - 'group_application_receiver_id': {'key': 'groupApplicationReceiverId', 'type': 'str'}, - 'group_application_sender_qualifier': {'key': 'groupApplicationSenderQualifier', 'type': 'str'}, - 'group_application_sender_id': {'key': 'groupApplicationSenderId', 'type': 'str'}, - 'group_application_password': {'key': 'groupApplicationPassword', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'long'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'long'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'is_test_interchange': {'key': 'isTestInterchange', 'type': 'bool'}, - 'sender_internal_identification': {'key': 'senderInternalIdentification', 'type': 'str'}, - 'sender_internal_sub_identification': {'key': 'senderInternalSubIdentification', 'type': 'str'}, - 'receiver_internal_identification': {'key': 'receiverInternalIdentification', 'type': 'str'}, - 'receiver_internal_sub_identification': {'key': 'receiverInternalSubIdentification', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactEnvelopeSettings, self).__init__(**kwargs) - self.group_association_assigned_code = kwargs.get('group_association_assigned_code', None) - self.communication_agreement_id = kwargs.get('communication_agreement_id', None) - self.apply_delimiter_string_advice = kwargs['apply_delimiter_string_advice'] - self.create_grouping_segments = kwargs['create_grouping_segments'] - self.enable_default_group_headers = kwargs['enable_default_group_headers'] - self.recipient_reference_password_value = kwargs.get('recipient_reference_password_value', None) - self.recipient_reference_password_qualifier = kwargs.get('recipient_reference_password_qualifier', None) - self.application_reference_id = kwargs.get('application_reference_id', None) - self.processing_priority_code = kwargs.get('processing_priority_code', None) - self.interchange_control_number_lower_bound = kwargs['interchange_control_number_lower_bound'] - self.interchange_control_number_upper_bound = kwargs['interchange_control_number_upper_bound'] - self.rollover_interchange_control_number = kwargs['rollover_interchange_control_number'] - self.interchange_control_number_prefix = kwargs.get('interchange_control_number_prefix', None) - self.interchange_control_number_suffix = kwargs.get('interchange_control_number_suffix', None) - self.sender_reverse_routing_address = kwargs.get('sender_reverse_routing_address', None) - self.receiver_reverse_routing_address = kwargs.get('receiver_reverse_routing_address', None) - self.functional_group_id = kwargs.get('functional_group_id', None) - self.group_controlling_agency_code = kwargs.get('group_controlling_agency_code', None) - self.group_message_version = kwargs.get('group_message_version', None) - self.group_message_release = kwargs.get('group_message_release', None) - self.group_control_number_lower_bound = kwargs['group_control_number_lower_bound'] - self.group_control_number_upper_bound = kwargs['group_control_number_upper_bound'] - self.rollover_group_control_number = kwargs['rollover_group_control_number'] - self.group_control_number_prefix = kwargs.get('group_control_number_prefix', None) - self.group_control_number_suffix = kwargs.get('group_control_number_suffix', None) - self.group_application_receiver_qualifier = kwargs.get('group_application_receiver_qualifier', None) - self.group_application_receiver_id = kwargs.get('group_application_receiver_id', None) - self.group_application_sender_qualifier = kwargs.get('group_application_sender_qualifier', None) - self.group_application_sender_id = kwargs.get('group_application_sender_id', None) - self.group_application_password = kwargs.get('group_application_password', None) - self.overwrite_existing_transaction_set_control_number = kwargs['overwrite_existing_transaction_set_control_number'] - self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) - self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) - self.transaction_set_control_number_lower_bound = kwargs['transaction_set_control_number_lower_bound'] - self.transaction_set_control_number_upper_bound = kwargs['transaction_set_control_number_upper_bound'] - self.rollover_transaction_set_control_number = kwargs['rollover_transaction_set_control_number'] - self.is_test_interchange = kwargs['is_test_interchange'] - self.sender_internal_identification = kwargs.get('sender_internal_identification', None) - self.sender_internal_sub_identification = kwargs.get('sender_internal_sub_identification', None) - self.receiver_internal_identification = kwargs.get('receiver_internal_identification', None) - self.receiver_internal_sub_identification = kwargs.get('receiver_internal_sub_identification', None) - - -class EdifactFramingSettings(msrest.serialization.Model): - """The Edifact agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :param service_code_list_directory_version: The service code list directory version. - :type service_code_list_directory_version: str - :param character_encoding: The character encoding. - :type character_encoding: str - :param protocol_version: Required. The protocol version. - :type protocol_version: int - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param character_set: Required. The EDIFACT frame setting characterSet. Possible values - include: "NotSpecified", "UNOB", "UNOA", "UNOC", "UNOD", "UNOE", "UNOF", "UNOG", "UNOH", - "UNOI", "UNOJ", "UNOK", "UNOX", "UNOY", "KECA". - :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet - :param decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. Possible - values include: "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator - suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'protocol_version': {'required': True}, - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'release_indicator': {'required': True}, - 'repetition_separator': {'required': True}, - 'character_set': {'required': True}, - 'decimal_point_indicator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'service_code_list_directory_version': {'key': 'serviceCodeListDirectoryVersion', 'type': 'str'}, - 'character_encoding': {'key': 'characterEncoding', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'int'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'release_indicator': {'key': 'releaseIndicator', 'type': 'int'}, - 'repetition_separator': {'key': 'repetitionSeparator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'decimal_point_indicator': {'key': 'decimalPointIndicator', 'type': 'str'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactFramingSettings, self).__init__(**kwargs) - self.service_code_list_directory_version = kwargs.get('service_code_list_directory_version', None) - self.character_encoding = kwargs.get('character_encoding', None) - self.protocol_version = kwargs['protocol_version'] - self.data_element_separator = kwargs['data_element_separator'] - self.component_separator = kwargs['component_separator'] - self.segment_terminator = kwargs['segment_terminator'] - self.release_indicator = kwargs['release_indicator'] - self.repetition_separator = kwargs['repetition_separator'] - self.character_set = kwargs['character_set'] - self.decimal_point_indicator = kwargs['decimal_point_indicator'] - self.segment_terminator_suffix = kwargs['segment_terminator_suffix'] - - -class EdifactMessageFilter(msrest.serialization.Model): - """The Edifact message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param message_filter_type: Required. The message filter type. Possible values include: - "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactMessageFilter, self).__init__(**kwargs) - self.message_filter_type = kwargs['message_filter_type'] - - -class EdifactMessageIdentifier(msrest.serialization.Model): - """The Edifact message identifier. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which this envelope settings has to be applied. - :type message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactMessageIdentifier, self).__init__(**kwargs) - self.message_id = kwargs['message_id'] - - -class EdifactOneWayAgreement(msrest.serialization.Model): - """The Edifact one way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The EDIFACT protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'EdifactProtocolSettings'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactOneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = kwargs['sender_business_identity'] - self.receiver_business_identity = kwargs['receiver_business_identity'] - self.protocol_settings = kwargs['protocol_settings'] - - -class EdifactProcessingSettings(msrest.serialization.Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param mask_security_info: Required. The value indicating whether to mask security information. - :type mask_security_info: bool - :param preserve_interchange: Required. The value indicating whether to preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating whether to suspend - interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to - create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating whether to use dot as - decimal separator. - :type use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = kwargs['mask_security_info'] - self.preserve_interchange = kwargs['preserve_interchange'] - self.suspend_interchange_on_error = kwargs['suspend_interchange_on_error'] - self.create_empty_xml_tags_for_trailing_separators = kwargs['create_empty_xml_tags_for_trailing_separators'] - self.use_dot_as_decimal_separator = kwargs['use_dot_as_decimal_separator'] - - -class EdifactProtocolSettings(msrest.serialization.Model): - """The Edifact agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param validation_settings: Required. The EDIFACT validation settings. - :type validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings - :param framing_settings: Required. The EDIFACT framing settings. - :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings - :param envelope_settings: Required. The EDIFACT envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings - :param acknowledgement_settings: Required. The EDIFACT acknowledgement settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings - :param message_filter: Required. The EDIFACT message filter. - :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter - :param processing_settings: Required. The EDIFACT processing Settings. - :type processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings - :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] - :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] - :param schema_references: Required. The EDIFACT schema references. - :type schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] - :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] - :param edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :type edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'EdifactValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'EdifactFramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'EdifactEnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'EdifactAcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'EdifactMessageFilter'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'EdifactProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[EdifactEnvelopeOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[EdifactMessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[EdifactSchemaReference]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[EdifactValidationOverride]'}, - 'edifact_delimiter_overrides': {'key': 'edifactDelimiterOverrides', 'type': '[EdifactDelimiterOverride]'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactProtocolSettings, self).__init__(**kwargs) - self.validation_settings = kwargs['validation_settings'] - self.framing_settings = kwargs['framing_settings'] - self.envelope_settings = kwargs['envelope_settings'] - self.acknowledgement_settings = kwargs['acknowledgement_settings'] - self.message_filter = kwargs['message_filter'] - self.processing_settings = kwargs['processing_settings'] - self.envelope_overrides = kwargs.get('envelope_overrides', None) - self.message_filter_list = kwargs.get('message_filter_list', None) - self.schema_references = kwargs['schema_references'] - self.validation_overrides = kwargs.get('validation_overrides', None) - self.edifact_delimiter_overrides = kwargs.get('edifact_delimiter_overrides', None) - - -class EdifactSchemaReference(msrest.serialization.Model): - """The Edifact schema reference. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - :param message_version: Required. The message version. - :type message_version: str - :param message_release: Required. The message release version. - :type message_release: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param schema_name: Required. The schema name. - :type schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'message_version': {'required': True}, - 'message_release': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'message_version': {'key': 'messageVersion', 'type': 'str'}, - 'message_release': {'key': 'messageRelease', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'sender_application_qualifier': {'key': 'senderApplicationQualifier', 'type': 'str'}, - 'association_assigned_code': {'key': 'associationAssignedCode', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactSchemaReference, self).__init__(**kwargs) - self.message_id = kwargs['message_id'] - self.message_version = kwargs['message_version'] - self.message_release = kwargs['message_release'] - self.sender_application_id = kwargs.get('sender_application_id', None) - self.sender_application_qualifier = kwargs.get('sender_application_qualifier', None) - self.association_assigned_code = kwargs.get('association_assigned_code', None) - self.schema_name = kwargs['schema_name'] - - -class EdifactValidationOverride(msrest.serialization.Model): - """The Edifact validation override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which the validation settings has to be applied. - :type message_id: str - :param enforce_character_set: Required. The value indicating whether to validate character Set. - :type enforce_character_set: bool - :param validate_edi_types: Required. The value indicating whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - """ - - _validation = { - 'message_id': {'required': True}, - 'enforce_character_set': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'enforce_character_set': {'key': 'enforceCharacterSet', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactValidationOverride, self).__init__(**kwargs) - self.message_id = kwargs['message_id'] - self.enforce_character_set = kwargs['enforce_character_set'] - self.validate_edi_types = kwargs['validate_edi_types'] - self.validate_xsd_types = kwargs['validate_xsd_types'] - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs['allow_leading_and_trailing_spaces_and_zeroes'] - self.trailing_separator_policy = kwargs['trailing_separator_policy'] - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs['trim_leading_and_trailing_spaces_and_zeroes'] - - -class EdifactValidationSettings(msrest.serialization.Model): - """The Edifact agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param validate_character_set: Required. The value indicating whether to validate character set - in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value indicating whether to - check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity period of interchange - control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value indicating whether to check - for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value indicating whether - to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to Whether to validate EDI - types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to Whether to validate XSD - types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EdifactValidationSettings, self).__init__(**kwargs) - self.validate_character_set = kwargs['validate_character_set'] - self.check_duplicate_interchange_control_number = kwargs['check_duplicate_interchange_control_number'] - self.interchange_control_number_validity_days = kwargs['interchange_control_number_validity_days'] - self.check_duplicate_group_control_number = kwargs['check_duplicate_group_control_number'] - self.check_duplicate_transaction_set_control_number = kwargs['check_duplicate_transaction_set_control_number'] - self.validate_edi_types = kwargs['validate_edi_types'] - self.validate_xsd_types = kwargs['validate_xsd_types'] - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs['allow_leading_and_trailing_spaces_and_zeroes'] - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs['trim_leading_and_trailing_spaces_and_zeroes'] - self.trailing_separator_policy = kwargs['trailing_separator_policy'] - - -class ErrorProperties(msrest.serialization.Model): - """Error properties indicate why the Logic service was not able to process the incoming request. The reason is provided in the error message. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorProperties, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponse(msrest.serialization.Model): - """Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. - - :param error: The error properties. - :type error: ~azure.mgmt.logic.models.ErrorProperties - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class Expression(msrest.serialization.Model): - """The expression. - - :param text: The text. - :type text: str - :param value: Any object. - :type value: object - :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(Expression, self).__init__(**kwargs) - self.text = kwargs.get('text', None) - self.value = kwargs.get('value', None) - self.subexpressions = kwargs.get('subexpressions', None) - self.error = kwargs.get('error', None) - - -class ExpressionRoot(Expression): - """The expression root. - - :param text: The text. - :type text: str - :param value: Any object. - :type value: object - :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - :param path: The path. - :type path: str - """ - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'subexpressions': {'key': 'subexpressions', 'type': '[Expression]'}, - 'error': {'key': 'error', 'type': 'AzureResourceErrorInfo'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressionRoot, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - - -class ExpressionTraces(msrest.serialization.Model): - """The expression traces. - - :param inputs: - :type inputs: list[~azure.mgmt.logic.models.ExpressionRoot] - """ - - _attribute_map = { - 'inputs': {'key': 'inputs', 'type': '[ExpressionRoot]'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressionTraces, self).__init__(**kwargs) - self.inputs = kwargs.get('inputs', None) - - -class ExtendedErrorInfo(msrest.serialization.Model): - """The extended error info. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error code. Possible values include: "NotSpecified", - "IntegrationServiceEnvironmentNotFound", "InternalServerError", "InvalidOperationId". - :type code: str or ~azure.mgmt.logic.models.ErrorResponseCode - :param message: Required. The error message. - :type message: str - :param details: The error message details. - :type details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] - :param inner_error: The inner error. - :type inner_error: object - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ExtendedErrorInfo]'}, - 'inner_error': {'key': 'innerError', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtendedErrorInfo, self).__init__(**kwargs) - self.code = kwargs['code'] - self.message = kwargs['message'] - self.details = kwargs.get('details', None) - self.inner_error = kwargs.get('inner_error', None) - - -class FlowAccessControlConfiguration(msrest.serialization.Model): - """The access control configuration. - - :param triggers: The access control configuration for invoking workflow triggers. - :type triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :param contents: The access control configuration for accessing workflow run contents. - :type contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :param actions: The access control configuration for workflow actions. - :type actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :param workflow_management: The access control configuration for workflow management. - :type workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - """ - - _attribute_map = { - 'triggers': {'key': 'triggers', 'type': 'FlowAccessControlConfigurationPolicy'}, - 'contents': {'key': 'contents', 'type': 'FlowAccessControlConfigurationPolicy'}, - 'actions': {'key': 'actions', 'type': 'FlowAccessControlConfigurationPolicy'}, - 'workflow_management': {'key': 'workflowManagement', 'type': 'FlowAccessControlConfigurationPolicy'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowAccessControlConfiguration, self).__init__(**kwargs) - self.triggers = kwargs.get('triggers', None) - self.contents = kwargs.get('contents', None) - self.actions = kwargs.get('actions', None) - self.workflow_management = kwargs.get('workflow_management', None) - - -class FlowAccessControlConfigurationPolicy(msrest.serialization.Model): - """The access control configuration policy. - - :param allowed_caller_ip_addresses: The allowed caller IP address ranges. - :type allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] - :param open_authentication_policies: The authentication policies for workflow. - :type open_authentication_policies: ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies - """ - - _attribute_map = { - 'allowed_caller_ip_addresses': {'key': 'allowedCallerIpAddresses', 'type': '[IpAddressRange]'}, - 'open_authentication_policies': {'key': 'openAuthenticationPolicies', 'type': 'OpenAuthenticationAccessPolicies'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowAccessControlConfigurationPolicy, self).__init__(**kwargs) - self.allowed_caller_ip_addresses = kwargs.get('allowed_caller_ip_addresses', None) - self.open_authentication_policies = kwargs.get('open_authentication_policies', None) - - -class FlowEndpoints(msrest.serialization.Model): - """The flow endpoints configuration. - - :param outgoing_ip_addresses: The outgoing ip address. - :type outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] - :param access_endpoint_ip_addresses: The access endpoint ip address. - :type access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] - """ - - _attribute_map = { - 'outgoing_ip_addresses': {'key': 'outgoingIpAddresses', 'type': '[IpAddress]'}, - 'access_endpoint_ip_addresses': {'key': 'accessEndpointIpAddresses', 'type': '[IpAddress]'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowEndpoints, self).__init__(**kwargs) - self.outgoing_ip_addresses = kwargs.get('outgoing_ip_addresses', None) - self.access_endpoint_ip_addresses = kwargs.get('access_endpoint_ip_addresses', None) - - -class FlowEndpointsConfiguration(msrest.serialization.Model): - """The endpoints configuration. - - :param workflow: The workflow endpoints. - :type workflow: ~azure.mgmt.logic.models.FlowEndpoints - :param connector: The connector endpoints. - :type connector: ~azure.mgmt.logic.models.FlowEndpoints - """ - - _attribute_map = { - 'workflow': {'key': 'workflow', 'type': 'FlowEndpoints'}, - 'connector': {'key': 'connector', 'type': 'FlowEndpoints'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowEndpointsConfiguration, self).__init__(**kwargs) - self.workflow = kwargs.get('workflow', None) - self.connector = kwargs.get('connector', None) - - -class GenerateUpgradedDefinitionParameters(msrest.serialization.Model): - """The parameters to generate upgraded definition. - - :param target_schema_version: The target schema version. - :type target_schema_version: str - """ - - _attribute_map = { - 'target_schema_version': {'key': 'targetSchemaVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) - self.target_schema_version = kwargs.get('target_schema_version', None) - - -class GetCallbackUrlParameters(msrest.serialization.Model): - """The callback url parameters. - - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'not_after': {'key': 'notAfter', 'type': 'iso-8601'}, - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(GetCallbackUrlParameters, self).__init__(**kwargs) - self.not_after = kwargs.get('not_after', None) - self.key_type = kwargs.get('key_type', None) - - -class IntegrationAccount(Resource): - """The integration account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment - :param state: The workflow state. Possible values include: "NotSpecified", "Completed", - "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'IntegrationServiceEnvironment'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccount, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.integration_service_environment = kwargs.get('integration_service_environment', None) - self.state = kwargs.get('state', None) - - -class IntegrationAccountAgreement(Resource): - """The integration account agreement. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param agreement_type: Required. The agreement type. Possible values include: "NotSpecified", - "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType - :param host_partner: Required. The integration account partner that is set as host partner for - this agreement. - :type host_partner: str - :param guest_partner: Required. The integration account partner that is set as guest partner - for this agreement. - :type guest_partner: str - :param host_identity: Required. The business identity of the host partner. - :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param guest_identity: Required. The business identity of the guest partner. - :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param content: Required. The agreement content. - :type content: ~azure.mgmt.logic.models.AgreementContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'agreement_type': {'required': True}, - 'host_partner': {'required': True}, - 'guest_partner': {'required': True}, - 'host_identity': {'required': True}, - 'guest_identity': {'required': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'agreement_type': {'key': 'properties.agreementType', 'type': 'str'}, - 'host_partner': {'key': 'properties.hostPartner', 'type': 'str'}, - 'guest_partner': {'key': 'properties.guestPartner', 'type': 'str'}, - 'host_identity': {'key': 'properties.hostIdentity', 'type': 'BusinessIdentity'}, - 'guest_identity': {'key': 'properties.guestIdentity', 'type': 'BusinessIdentity'}, - 'content': {'key': 'properties.content', 'type': 'AgreementContent'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountAgreement, self).__init__(**kwargs) - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.agreement_type = kwargs['agreement_type'] - self.host_partner = kwargs['host_partner'] - self.guest_partner = kwargs['guest_partner'] - self.host_identity = kwargs['host_identity'] - self.guest_identity = kwargs['guest_identity'] - self.content = kwargs['content'] - - -class IntegrationAccountAgreementFilter(msrest.serialization.Model): - """The integration account agreement filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param agreement_type: Required. The agreement type of integration account agreement. Possible - values include: "NotSpecified", "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType - """ - - _validation = { - 'agreement_type': {'required': True}, - } - - _attribute_map = { - 'agreement_type': {'key': 'agreementType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) - self.agreement_type = kwargs['agreement_type'] - - -class IntegrationAccountAgreementListResult(msrest.serialization.Model): - """The list of integration account agreements. - - :param value: The list of integration account agreements. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountAgreement]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountAgreementListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationAccountCertificate(Resource): - """The integration account certificate. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'key': {'key': 'properties.key', 'type': 'KeyVaultKeyReference'}, - 'public_certificate': {'key': 'properties.publicCertificate', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountCertificate, self).__init__(**kwargs) - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.key = kwargs.get('key', None) - self.public_certificate = kwargs.get('public_certificate', None) - - -class IntegrationAccountCertificateListResult(msrest.serialization.Model): - """The list of integration account certificates. - - :param value: The list of integration account certificates. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountCertificate]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountCertificateListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationAccountListResult(msrest.serialization.Model): - """The list of integration accounts. - - :param value: The list of integration accounts. - :type value: list[~azure.mgmt.logic.models.IntegrationAccount] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccount]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationAccountMap(Resource): - """The integration account map. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", - "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: - ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - :param metadata: The metadata. - :type metadata: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'map_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'map_type': {'key': 'properties.mapType', 'type': 'str'}, - 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'IntegrationAccountMapPropertiesParametersSchema'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountMap, self).__init__(**kwargs) - self.map_type = kwargs['map_type'] - self.parameters_schema = kwargs.get('parameters_schema', None) - self.created_time = None - self.changed_time = None - self.content = kwargs.get('content', None) - self.content_type = kwargs.get('content_type', None) - self.content_link = None - self.metadata = kwargs.get('metadata', None) - - -class IntegrationAccountMapFilter(msrest.serialization.Model): - """The integration account map filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param map_type: Required. The map type of integration account map. Possible values include: - "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType - """ - - _validation = { - 'map_type': {'required': True}, - } - - _attribute_map = { - 'map_type': {'key': 'mapType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountMapFilter, self).__init__(**kwargs) - self.map_type = kwargs['map_type'] - - -class IntegrationAccountMapListResult(msrest.serialization.Model): - """The list of integration account maps. - - :param value: The list of integration account maps. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountMap] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountMap]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountMapListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationAccountMapPropertiesParametersSchema(msrest.serialization.Model): - """The parameters schema of integration account map. - - :param ref: The reference name. - :type ref: str - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) - self.ref = kwargs.get('ref', None) - - -class IntegrationAccountPartner(Resource): - """The integration account partner. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param partner_type: Required. The partner type. Possible values include: "NotSpecified", - "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'partner_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'partner_type': {'key': 'properties.partnerType', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'PartnerContent'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountPartner, self).__init__(**kwargs) - self.partner_type = kwargs['partner_type'] - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.content = kwargs['content'] - - -class IntegrationAccountPartnerFilter(msrest.serialization.Model): - """The integration account partner filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param partner_type: Required. The partner type of integration account partner. Possible values - include: "NotSpecified", "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType - """ - - _validation = { - 'partner_type': {'required': True}, - } - - _attribute_map = { - 'partner_type': {'key': 'partnerType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) - self.partner_type = kwargs['partner_type'] - - -class IntegrationAccountPartnerListResult(msrest.serialization.Model): - """The list of integration account partners. - - :param value: The list of integration account partners. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountPartner]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountPartnerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationAccountSchema(Resource): - """The integration account schema. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param schema_type: Required. The schema type. Possible values include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str - :ivar content_link: The content link. - :vartype content_link: ~azure.mgmt.logic.models.ContentLink - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'schema_type': {'required': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'content_link': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, - 'target_namespace': {'key': 'properties.targetNamespace', 'type': 'str'}, - 'document_name': {'key': 'properties.documentName', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'metadata': {'key': 'properties.metadata', 'type': 'object'}, - 'content': {'key': 'properties.content', 'type': 'str'}, - 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'content_link': {'key': 'properties.contentLink', 'type': 'ContentLink'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountSchema, self).__init__(**kwargs) - self.schema_type = kwargs['schema_type'] - self.target_namespace = kwargs.get('target_namespace', None) - self.document_name = kwargs.get('document_name', None) - self.file_name = kwargs.get('file_name', None) - self.created_time = None - self.changed_time = None - self.metadata = kwargs.get('metadata', None) - self.content = kwargs.get('content', None) - self.content_type = kwargs.get('content_type', None) - self.content_link = None - - -class IntegrationAccountSchemaFilter(msrest.serialization.Model): - """The integration account schema filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param schema_type: Required. The schema type of integration account schema. Possible values - include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType - """ - - _validation = { - 'schema_type': {'required': True}, - } - - _attribute_map = { - 'schema_type': {'key': 'schemaType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) - self.schema_type = kwargs['schema_type'] - - -class IntegrationAccountSchemaListResult(msrest.serialization.Model): - """The list of integration account schemas. - - :param value: The list of integration account schemas. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountSchema]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountSchemaListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationAccountSession(Resource): - """The integration account session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :ivar created_time: The created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: The changed time. - :vartype changed_time: ~datetime.datetime - :param content: The session content. - :type content: object - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'content': {'key': 'properties.content', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountSession, self).__init__(**kwargs) - self.created_time = None - self.changed_time = None - self.content = kwargs.get('content', None) - - -class IntegrationAccountSessionFilter(msrest.serialization.Model): - """The integration account session filter. - - All required parameters must be populated in order to send to Azure. - - :param changed_time: Required. The changed time of integration account sessions. - :type changed_time: ~datetime.datetime - """ - - _validation = { - 'changed_time': {'required': True}, - } - - _attribute_map = { - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountSessionFilter, self).__init__(**kwargs) - self.changed_time = kwargs['changed_time'] - - -class IntegrationAccountSessionListResult(msrest.serialization.Model): - """The list of integration account sessions. - - :param value: The list of integration account sessions. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSession] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationAccountSession]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountSessionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationAccountSku(msrest.serialization.Model): - """The integration account sku. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", - "Standard". - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationAccountSku, self).__init__(**kwargs) - self.name = kwargs['name'] - - -class IntegrationServiceEnvironment(Resource): - """The integration service environment. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'IntegrationServiceEnvironmentProperties'}, - 'sku': {'key': 'sku', 'type': 'IntegrationServiceEnvironmentSku'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironment, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - self.sku = kwargs.get('sku', None) - - -class IntegrationServiceEnvironmentAccessEndpoint(msrest.serialization.Model): - """The integration service environment access endpoint. - - :param type: The access endpoint type. Possible values include: "NotSpecified", "External", - "Internal". - :type type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentAccessEndpoint, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - - -class IntegrationServiceEnvironmentListResult(msrest.serialization.Model): - """The list of integration service environments. - - :param value: - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationServiceEnvironment]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationServiceEnvironmentNetworkDependency(msrest.serialization.Model): - """The azure async operation resource. - - :param category: The network dependency category type. Possible values include: "NotSpecified", - "AzureStorage", "AzureManagement", "AzureActiveDirectory", "SSLCertificateVerification", - "DiagnosticLogsAndMetrics", "IntegrationServiceEnvironmentConnectors", "RedisCache", - "AccessEndpoints", "RecoveryService", "SQL", "RegionalService". - :type category: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType - :param display_name: The display name. - :type display_name: str - :param endpoints: The endpoints. - :type endpoints: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] - """ - - _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'endpoints': {'key': 'endpoints', 'type': '[IntegrationServiceEnvironmentNetworkEndpoint]'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentNetworkDependency, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.display_name = kwargs.get('display_name', None) - self.endpoints = kwargs.get('endpoints', None) - - -class IntegrationServiceEnvironmentNetworkDependencyHealth(msrest.serialization.Model): - """The integration service environment subnet network health. - - :param error: The error if any occurred during the operation. - :type error: ~azure.mgmt.logic.models.ExtendedErrorInfo - :param state: The network dependency health state. Possible values include: "NotSpecified", - "Healthy", "Unhealthy", "Unknown". - :type state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealthState - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ExtendedErrorInfo'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentNetworkDependencyHealth, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - self.state = kwargs.get('state', None) - - -class IntegrationServiceEnvironmentNetworkEndpoint(msrest.serialization.Model): - """The network endpoint. - - :param accessibility: The accessibility state. Possible values include: "NotSpecified", - "Unknown", "Available", "NotAvailable". - :type accessibility: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState - :param domain_name: The domain name. - :type domain_name: str - :param ports: The ports. - :type ports: list[str] - """ - - _attribute_map = { - 'accessibility': {'key': 'accessibility', 'type': 'str'}, - 'domain_name': {'key': 'domainName', 'type': 'str'}, - 'ports': {'key': 'ports', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentNetworkEndpoint, self).__init__(**kwargs) - self.accessibility = kwargs.get('accessibility', None) - self.domain_name = kwargs.get('domain_name', None) - self.ports = kwargs.get('ports', None) - - -class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): - """The integration service environment properties. - - :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", - "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", - "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", - "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :param state: The integration service environment state. Possible values include: - "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :param integration_service_environment_id: Gets the tracking id. - :type integration_service_environment_id: str - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :param network_configuration: The network configuration. - :type network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration - """ - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'integration_service_environment_id': {'key': 'integrationServiceEnvironmentId', 'type': 'str'}, - 'endpoints_configuration': {'key': 'endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, - 'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.state = kwargs.get('state', None) - self.integration_service_environment_id = kwargs.get('integration_service_environment_id', None) - self.endpoints_configuration = kwargs.get('endpoints_configuration', None) - self.network_configuration = kwargs.get('network_configuration', None) - - -class IntegrationServiceEnvironmentSku(msrest.serialization.Model): - """The integration service environment sku. - - :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :param capacity: The sku capacity. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.capacity = kwargs.get('capacity', None) - - -class IntegrationServiceEnvironmentSkuCapacity(msrest.serialization.Model): - """The integration service environment sku capacity. - - :param minimum: The minimum capacity. - :type minimum: int - :param maximum: The maximum capacity. - :type maximum: int - :param default: The default capacity. - :type default: int - :param scale_type: The sku scale type. Possible values include: "Manual", "Automatic", "None". - :type scale_type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType - """ - - _attribute_map = { - 'minimum': {'key': 'minimum', 'type': 'int'}, - 'maximum': {'key': 'maximum', 'type': 'int'}, - 'default': {'key': 'default', 'type': 'int'}, - 'scale_type': {'key': 'scaleType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentSkuCapacity, self).__init__(**kwargs) - self.minimum = kwargs.get('minimum', None) - self.maximum = kwargs.get('maximum', None) - self.default = kwargs.get('default', None) - self.scale_type = kwargs.get('scale_type', None) - - -class IntegrationServiceEnvironmentSkuDefinition(msrest.serialization.Model): - """The integration service environment sku definition. - - :param resource_type: The resource type. - :type resource_type: str - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku - :param capacity: The sku capacity. - :type capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity - """ - - _attribute_map = { - 'resource_type': {'key': 'resourceType', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'IntegrationServiceEnvironmentSkuDefinitionSku'}, - 'capacity': {'key': 'capacity', 'type': 'IntegrationServiceEnvironmentSkuCapacity'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentSkuDefinition, self).__init__(**kwargs) - self.resource_type = kwargs.get('resource_type', None) - self.sku = kwargs.get('sku', None) - self.capacity = kwargs.get('capacity', None) - - -class IntegrationServiceEnvironmentSkuDefinitionSku(msrest.serialization.Model): - """The sku. - - :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :param tier: The sku tier. - :type tier: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentSkuDefinitionSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - - -class IntegrationServiceEnvironmentSkuList(msrest.serialization.Model): - """The list of integration service environment skus. - - :param value: The list of integration service environment skus. - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[IntegrationServiceEnvironmentSkuDefinition]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentSkuList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class IntegrationServiceEnvironmentSubnetNetworkHealth(msrest.serialization.Model): - """The integration service environment subnet network health. - - All required parameters must be populated in order to send to Azure. - - :param outbound_network_dependencies: The outbound network dependencies. - :type outbound_network_dependencies: - list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependency] - :param outbound_network_health: The integration service environment network health. - :type outbound_network_health: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth - :param network_dependency_health_state: Required. The integration service environment network - health state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". - :type network_dependency_health_state: str or - ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState - """ - - _validation = { - 'network_dependency_health_state': {'required': True}, - } - - _attribute_map = { - 'outbound_network_dependencies': {'key': 'outboundNetworkDependencies', 'type': '[IntegrationServiceEnvironmentNetworkDependency]'}, - 'outbound_network_health': {'key': 'outboundNetworkHealth', 'type': 'IntegrationServiceEnvironmentNetworkDependencyHealth'}, - 'network_dependency_health_state': {'key': 'networkDependencyHealthState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmentSubnetNetworkHealth, self).__init__(**kwargs) - self.outbound_network_dependencies = kwargs.get('outbound_network_dependencies', None) - self.outbound_network_health = kwargs.get('outbound_network_health', None) - self.network_dependency_health_state = kwargs['network_dependency_health_state'] - - -class IpAddress(msrest.serialization.Model): - """The ip address. - - :param address: The address. - :type address: str - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IpAddress, self).__init__(**kwargs) - self.address = kwargs.get('address', None) - - -class IpAddressRange(msrest.serialization.Model): - """The ip address range. - - :param address_range: The IP address range. - :type address_range: str - """ - - _attribute_map = { - 'address_range': {'key': 'addressRange', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IpAddressRange, self).__init__(**kwargs) - self.address_range = kwargs.get('address_range', None) - - -class JsonSchema(msrest.serialization.Model): - """The JSON schema. - - :param title: The JSON title. - :type title: str - :param content: The JSON content. - :type content: str - """ - - _attribute_map = { - 'title': {'key': 'title', 'type': 'str'}, - 'content': {'key': 'content', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(JsonSchema, self).__init__(**kwargs) - self.title = kwargs.get('title', None) - self.content = kwargs.get('content', None) - - -class KeyVaultKey(msrest.serialization.Model): - """The key vault key. - - :param kid: The key id. - :type kid: str - :param attributes: The key attributes. - :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes - """ - - _attribute_map = { - 'kid': {'key': 'kid', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'KeyVaultKeyAttributes'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyVaultKey, self).__init__(**kwargs) - self.kid = kwargs.get('kid', None) - self.attributes = kwargs.get('attributes', None) - - -class KeyVaultKeyAttributes(msrest.serialization.Model): - """The key attributes. - - :param enabled: Whether the key is enabled or not. - :type enabled: bool - :param created: When the key was created. - :type created: long - :param updated: When the key was updated. - :type updated: long - """ - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'created': {'key': 'created', 'type': 'long'}, - 'updated': {'key': 'updated', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyVaultKeyAttributes, self).__init__(**kwargs) - self.enabled = kwargs.get('enabled', None) - self.created = kwargs.get('created', None) - self.updated = kwargs.get('updated', None) - - -class KeyVaultKeyCollection(msrest.serialization.Model): - """Collection of key vault keys. - - :param value: The key vault keys. - :type value: list[~azure.mgmt.logic.models.KeyVaultKey] - :param skip_token: The skip token. - :type skip_token: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[KeyVaultKey]'}, - 'skip_token': {'key': 'skipToken', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyVaultKeyCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.skip_token = kwargs.get('skip_token', None) - - -class KeyVaultKeyReference(msrest.serialization.Model): - """The reference to the key vault key. - - All required parameters must be populated in order to send to Azure. - - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault - :param key_name: Required. The private key name in key vault. - :type key_name: str - :param key_version: The private key version in key vault. - :type key_version: str - """ - - _validation = { - 'key_vault': {'required': True}, - 'key_name': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultKeyReferenceKeyVault'}, - 'key_name': {'key': 'keyName', 'type': 'str'}, - 'key_version': {'key': 'keyVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyVaultKeyReference, self).__init__(**kwargs) - self.key_vault = kwargs['key_vault'] - self.key_name = kwargs['key_name'] - self.key_version = kwargs.get('key_version', None) - - -class KeyVaultKeyReferenceKeyVault(msrest.serialization.Model): - """The key vault reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: The resource id. - :type id: str - :ivar name: The resource name. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.type = None - - -class KeyVaultReference(ResourceReference): - """The key vault reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: The resource id. - :type id: str - :ivar type: Gets the resource type. - :vartype type: str - :param name: The key vault name. - :type name: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyVaultReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class ListKeyVaultKeysDefinition(msrest.serialization.Model): - """The list key vault keys definition. - - All required parameters must be populated in order to send to Azure. - - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str - """ - - _validation = { - 'key_vault': {'required': True}, - } - - _attribute_map = { - 'key_vault': {'key': 'keyVault', 'type': 'KeyVaultReference'}, - 'skip_token': {'key': 'skipToken', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) - self.key_vault = kwargs['key_vault'] - self.skip_token = kwargs.get('skip_token', None) - - -class ManagedApi(Resource): - """The managed api definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The api resource properties. - :type properties: ~azure.mgmt.logic.models.ApiResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'ApiResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(ManagedApi, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ManagedApiListResult(msrest.serialization.Model): - """The list of managed APIs. - - :param value: The managed APIs. - :type value: list[~azure.mgmt.logic.models.ManagedApi] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ManagedApi]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ManagedApiListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class NetworkConfiguration(msrest.serialization.Model): - """The network configuration. - - :param virtual_network_address_space: Gets the virtual network address space. - :type virtual_network_address_space: str - :param access_endpoint: The access endpoint. - :type access_endpoint: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint - :param subnets: The subnets. - :type subnets: list[~azure.mgmt.logic.models.ResourceReference] - """ - - _attribute_map = { - 'virtual_network_address_space': {'key': 'virtualNetworkAddressSpace', 'type': 'str'}, - 'access_endpoint': {'key': 'accessEndpoint', 'type': 'IntegrationServiceEnvironmentAccessEndpoint'}, - 'subnets': {'key': 'subnets', 'type': '[ResourceReference]'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkConfiguration, self).__init__(**kwargs) - self.virtual_network_address_space = kwargs.get('virtual_network_address_space', None) - self.access_endpoint = kwargs.get('access_endpoint', None) - self.subnets = kwargs.get('subnets', None) - - -class OpenAuthenticationAccessPolicies(msrest.serialization.Model): - """AuthenticationPolicy of type Open. - - :param policies: Open authentication policies. - :type policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] - """ - - _attribute_map = { - 'policies': {'key': 'policies', 'type': '{OpenAuthenticationAccessPolicy}'}, - } - - def __init__( - self, - **kwargs - ): - super(OpenAuthenticationAccessPolicies, self).__init__(**kwargs) - self.policies = kwargs.get('policies', None) - - -class OpenAuthenticationAccessPolicy(msrest.serialization.Model): - """Open authentication access policy defined by user. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: Type of provider for OAuth. Default value: "AAD". - :vartype type: str - :param claims: The access policy claims. - :type claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] - """ - - _validation = { - 'type': {'readonly': True, 'constant': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, - } - - type = "AAD" - - def __init__( - self, - **kwargs - ): - super(OpenAuthenticationAccessPolicy, self).__init__(**kwargs) - self.type = None - self.claims = kwargs.get('claims', None) - - -class OpenAuthenticationPolicyClaim(msrest.serialization.Model): - """Open authentication policy claim. - - :param name: The name of the claim. - :type name: str - :param value: The value of the claim. - :type value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OpenAuthenticationPolicyClaim, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - - -class Operation(msrest.serialization.Model): - """Logic REST API operation. - - :param origin: Operation: origin. - :type origin: str - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.logic.models.OperationDisplay - :param properties: The properties. - :type properties: object - """ - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'properties': {'key': 'properties', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.origin = kwargs.get('origin', None) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.properties = kwargs.get('properties', None) - - -class OperationDisplay(msrest.serialization.Model): - """The object that represents the operation. - - :param provider: Service provider: Microsoft.Logic. - :type provider: str - :param resource: Resource on which the operation is performed: Profile, endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Operation: description. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) - - -class OperationListResult(msrest.serialization.Model): - """Result of the request to list Logic operations. It contains a list of operations and a URL link to get the next set of results. - - :param value: List of Logic operations supported by the Logic resource provider. - :type value: list[~azure.mgmt.logic.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class OperationResultProperties(msrest.serialization.Model): - """The run operation result properties. - - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationResultProperties, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.correlation = kwargs.get('correlation', None) - self.status = kwargs.get('status', None) - self.code = kwargs.get('code', None) - self.error = kwargs.get('error', None) - - -class OperationResult(OperationResultProperties): - """The operation result definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - """ - - _validation = { - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationResult, self).__init__(**kwargs) - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = kwargs.get('retry_history', None) - self.iteration_count = kwargs.get('iteration_count', None) - - -class PartnerContent(msrest.serialization.Model): - """The integration account partner content. - - :param b2_b: The B2B partner content. - :type b2_b: ~azure.mgmt.logic.models.B2BPartnerContent - """ - - _attribute_map = { - 'b2_b': {'key': 'b2b', 'type': 'B2BPartnerContent'}, - } - - def __init__( - self, - **kwargs - ): - super(PartnerContent, self).__init__(**kwargs) - self.b2_b = kwargs.get('b2_b', None) - - -class RecurrenceSchedule(msrest.serialization.Model): - """The recurrence schedule. - - :param minutes: The minutes. - :type minutes: list[int] - :param hours: The hours. - :type hours: list[int] - :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] - :param month_days: The month days. - :type month_days: list[int] - :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] - """ - - _attribute_map = { - 'minutes': {'key': 'minutes', 'type': '[int]'}, - 'hours': {'key': 'hours', 'type': '[int]'}, - 'week_days': {'key': 'weekDays', 'type': '[str]'}, - 'month_days': {'key': 'monthDays', 'type': '[int]'}, - 'monthly_occurrences': {'key': 'monthlyOccurrences', 'type': '[RecurrenceScheduleOccurrence]'}, - } - - def __init__( - self, - **kwargs - ): - super(RecurrenceSchedule, self).__init__(**kwargs) - self.minutes = kwargs.get('minutes', None) - self.hours = kwargs.get('hours', None) - self.week_days = kwargs.get('week_days', None) - self.month_days = kwargs.get('month_days', None) - self.monthly_occurrences = kwargs.get('monthly_occurrences', None) - - -class RecurrenceScheduleOccurrence(msrest.serialization.Model): - """The recurrence schedule occurrence. - - :param day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", - "Wednesday", "Thursday", "Friday", "Saturday". - :type day: str or ~azure.mgmt.logic.models.DayOfWeek - :param occurrence: The occurrence. - :type occurrence: int - """ - - _attribute_map = { - 'day': {'key': 'day', 'type': 'str'}, - 'occurrence': {'key': 'occurrence', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) - self.day = kwargs.get('day', None) - self.occurrence = kwargs.get('occurrence', None) - - -class RegenerateActionParameter(msrest.serialization.Model): - """The access key regenerate action content. - - :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType - """ - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RegenerateActionParameter, self).__init__(**kwargs) - self.key_type = kwargs.get('key_type', None) - - -class RepetitionIndex(msrest.serialization.Model): - """The workflow run action repetition index. - - All required parameters must be populated in order to send to Azure. - - :param scope_name: The scope. - :type scope_name: str - :param item_index: Required. The index. - :type item_index: int - """ - - _validation = { - 'item_index': {'required': True}, - } - - _attribute_map = { - 'scope_name': {'key': 'scopeName', 'type': 'str'}, - 'item_index': {'key': 'itemIndex', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(RepetitionIndex, self).__init__(**kwargs) - self.scope_name = kwargs.get('scope_name', None) - self.item_index = kwargs['item_index'] - - -class Request(msrest.serialization.Model): - """A request. - - :param headers: A list of all the headers attached to the request. - :type headers: object - :param uri: The destination for the request. - :type uri: str - :param method: The HTTP method used for the request. - :type method: str - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Request, self).__init__(**kwargs) - self.headers = kwargs.get('headers', None) - self.uri = kwargs.get('uri', None) - self.method = kwargs.get('method', None) - - -class RequestHistory(Resource): - """The request history. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The request history properties. - :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'RequestHistoryProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(RequestHistory, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class RequestHistoryListResult(msrest.serialization.Model): - """The list of workflow request histories. - - :param value: A list of workflow request histories. - :type value: list[~azure.mgmt.logic.models.RequestHistory] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RequestHistory]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RequestHistoryListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RequestHistoryProperties(msrest.serialization.Model): - """The request history. - - :param start_time: The time the request started. - :type start_time: ~datetime.datetime - :param end_time: The time the request ended. - :type end_time: ~datetime.datetime - :param request: The request. - :type request: ~azure.mgmt.logic.models.Request - :param response: The response. - :type response: ~azure.mgmt.logic.models.Response - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'request': {'key': 'request', 'type': 'Request'}, - 'response': {'key': 'response', 'type': 'Response'}, - } - - def __init__( - self, - **kwargs - ): - super(RequestHistoryProperties, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.request = kwargs.get('request', None) - self.response = kwargs.get('response', None) - - -class Response(msrest.serialization.Model): - """A response. - - :param headers: A list of all the headers attached to the response. - :type headers: object - :param status_code: The status code of the response. - :type status_code: int - :param body_link: Details on the location of the body content. - :type body_link: ~azure.mgmt.logic.models.ContentLink - """ - - _attribute_map = { - 'headers': {'key': 'headers', 'type': 'object'}, - 'status_code': {'key': 'statusCode', 'type': 'int'}, - 'body_link': {'key': 'bodyLink', 'type': 'ContentLink'}, - } - - def __init__( - self, - **kwargs - ): - super(Response, self).__init__(**kwargs) - self.headers = kwargs.get('headers', None) - self.status_code = kwargs.get('status_code', None) - self.body_link = kwargs.get('body_link', None) - - -class RetryHistory(msrest.serialization.Model): - """The retry history. - - :param start_time: Gets the start time. - :type start_time: ~datetime.datetime - :param end_time: Gets the end time. - :type end_time: ~datetime.datetime - :param code: Gets the status code. - :type code: str - :param client_request_id: Gets the client request Id. - :type client_request_id: str - :param service_request_id: Gets the service request Id. - :type service_request_id: str - :param error: Gets the error response. - :type error: ~azure.mgmt.logic.models.ErrorResponse - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'client_request_id': {'key': 'clientRequestId', 'type': 'str'}, - 'service_request_id': {'key': 'serviceRequestId', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponse'}, - } - - def __init__( - self, - **kwargs - ): - super(RetryHistory, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.code = kwargs.get('code', None) - self.client_request_id = kwargs.get('client_request_id', None) - self.service_request_id = kwargs.get('service_request_id', None) - self.error = kwargs.get('error', None) - - -class RunCorrelation(msrest.serialization.Model): - """The correlation properties. - - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(RunCorrelation, self).__init__(**kwargs) - self.client_tracking_id = kwargs.get('client_tracking_id', None) - self.client_keywords = kwargs.get('client_keywords', None) - - -class RunActionCorrelation(RunCorrelation): - """The workflow run action correlation properties. - - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] - :param action_tracking_id: The action tracking identifier. - :type action_tracking_id: str - """ - - _attribute_map = { - 'client_tracking_id': {'key': 'clientTrackingId', 'type': 'str'}, - 'client_keywords': {'key': 'clientKeywords', 'type': '[str]'}, - 'action_tracking_id': {'key': 'actionTrackingId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RunActionCorrelation, self).__init__(**kwargs) - self.action_tracking_id = kwargs.get('action_tracking_id', None) - - -class SetTriggerStateActionDefinition(msrest.serialization.Model): - """The set trigger state action definition. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. The source. - :type source: ~azure.mgmt.logic.models.WorkflowTriggerReference - """ - - _validation = { - 'source': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'WorkflowTriggerReference'}, - } - - def __init__( - self, - **kwargs - ): - super(SetTriggerStateActionDefinition, self).__init__(**kwargs) - self.source = kwargs['source'] - - -class Sku(msrest.serialization.Model): - """The sku type. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", - "Basic", "Standard", "Premium". - :type name: str or ~azure.mgmt.logic.models.SkuName - :param plan: The reference to plan. - :type plan: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'plan': {'key': 'plan', 'type': 'ResourceReference'}, - } - - def __init__( - self, - **kwargs - ): - super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] - self.plan = kwargs.get('plan', None) - - -class SubResource(msrest.serialization.Model): - """The sub resource type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubResource, self).__init__(**kwargs) - self.id = None - - -class SwaggerCustomDynamicList(msrest.serialization.Model): - """The swagger custom dynamic list. - - :param operation_id: The operation id to fetch dynamic schema. - :type operation_id: str - :param built_in_operation: The built in operation. - :type built_in_operation: str - :param items_path: The path to a response property (relative to the response object, not the - response body) which contains an array of dynamic value items. - :type items_path: str - :param item_value_path: The path to a property which defines the value which should be used. - :type item_value_path: str - :param item_title_path: The path to an item property which defines the display name of the - item. - :type item_title_path: str - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'built_in_operation': {'key': 'builtInOperation', 'type': 'str'}, - 'items_path': {'key': 'itemsPath', 'type': 'str'}, - 'item_value_path': {'key': 'itemValuePath', 'type': 'str'}, - 'item_title_path': {'key': 'itemTitlePath', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{SwaggerCustomDynamicProperties}'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerCustomDynamicList, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.built_in_operation = kwargs.get('built_in_operation', None) - self.items_path = kwargs.get('items_path', None) - self.item_value_path = kwargs.get('item_value_path', None) - self.item_title_path = kwargs.get('item_title_path', None) - self.parameters = kwargs.get('parameters', None) - - -class SwaggerCustomDynamicProperties(msrest.serialization.Model): - """The swagger custom dynamic properties. - - :param operation_id: The operation id to fetch dynamic schema. - :type operation_id: str - :param value_path: Json pointer to the dynamic schema on the response body. - :type value_path: str - :param parameters: The operation parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'value_path': {'key': 'valuePath', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{SwaggerCustomDynamicProperties}'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerCustomDynamicProperties, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.value_path = kwargs.get('value_path', None) - self.parameters = kwargs.get('parameters', None) - - -class SwaggerCustomDynamicSchema(msrest.serialization.Model): - """The swagger custom dynamic schema. - - :param operation_id: The operation id to fetch dynamic schema. - :type operation_id: str - :param value_path: Json pointer to the dynamic schema on the response body. - :type value_path: str - :param parameters: The operation parameters. - :type parameters: dict[str, object] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'value_path': {'key': 'valuePath', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{object}'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerCustomDynamicSchema, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.value_path = kwargs.get('value_path', None) - self.parameters = kwargs.get('parameters', None) - - -class SwaggerCustomDynamicTree(msrest.serialization.Model): - """The swagger custom dynamic tree. - - :param settings: The tree settings. - :type settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings - :param open: The tree on-open configuration. - :type open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand - :param browse: The tree on-browse configuration. - :type browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand - """ - - _attribute_map = { - 'settings': {'key': 'settings', 'type': 'SwaggerCustomDynamicTreeSettings'}, - 'open': {'key': 'open', 'type': 'SwaggerCustomDynamicTreeCommand'}, - 'browse': {'key': 'browse', 'type': 'SwaggerCustomDynamicTreeCommand'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerCustomDynamicTree, self).__init__(**kwargs) - self.settings = kwargs.get('settings', None) - self.open = kwargs.get('open', None) - self.browse = kwargs.get('browse', None) - - -class SwaggerCustomDynamicTreeCommand(msrest.serialization.Model): - """The swagger tree command. - - :param operation_id: The path to an item property which defines the display name of the item. - :type operation_id: str - :param items_path: The path to an item property which defines the display name of the item. - :type items_path: str - :param item_value_path: The path to an item property which defines the display name of the - item. - :type item_value_path: str - :param item_title_path: The path to an item property which defines the display name of the - item. - :type item_title_path: str - :param item_full_title_path: The path to an item property which defines the display name of the - item. - :type item_full_title_path: str - :param item_is_parent: The path to an item property which defines the display name of the item. - :type item_is_parent: str - :param selectable_filter: The path to an item property which defines the display name of the - item. - :type selectable_filter: str - :param parameters: Dictionary of :code:``. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] - """ - - _attribute_map = { - 'operation_id': {'key': 'operationId', 'type': 'str'}, - 'items_path': {'key': 'itemsPath', 'type': 'str'}, - 'item_value_path': {'key': 'itemValuePath', 'type': 'str'}, - 'item_title_path': {'key': 'itemTitlePath', 'type': 'str'}, - 'item_full_title_path': {'key': 'itemFullTitlePath', 'type': 'str'}, - 'item_is_parent': {'key': 'itemIsParent', 'type': 'str'}, - 'selectable_filter': {'key': 'selectableFilter', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': '{SwaggerCustomDynamicTreeParameter}'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerCustomDynamicTreeCommand, self).__init__(**kwargs) - self.operation_id = kwargs.get('operation_id', None) - self.items_path = kwargs.get('items_path', None) - self.item_value_path = kwargs.get('item_value_path', None) - self.item_title_path = kwargs.get('item_title_path', None) - self.item_full_title_path = kwargs.get('item_full_title_path', None) - self.item_is_parent = kwargs.get('item_is_parent', None) - self.selectable_filter = kwargs.get('selectable_filter', None) - self.parameters = kwargs.get('parameters', None) - - -class SwaggerCustomDynamicTreeParameter(msrest.serialization.Model): - """The swagger custom dynamic tree parameter. - - :param selected_item_value_path: Gets or sets a path to a property in the currently selected - item to pass as a value to a parameter for the given operation. - :type selected_item_value_path: str - :param value: The parameter value. - :type value: object - :param parameter_reference: The parameter reference. - :type parameter_reference: str - :param required: Indicates whether the parameter is required. - :type required: bool - """ - - _attribute_map = { - 'selected_item_value_path': {'key': 'selectedItemValuePath', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'parameter_reference': {'key': 'parameterReference', 'type': 'str'}, - 'required': {'key': 'required', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerCustomDynamicTreeParameter, self).__init__(**kwargs) - self.selected_item_value_path = kwargs.get('selected_item_value_path', None) - self.value = kwargs.get('value', None) - self.parameter_reference = kwargs.get('parameter_reference', None) - self.required = kwargs.get('required', None) - - -class SwaggerCustomDynamicTreeSettings(msrest.serialization.Model): - """The swagger custom dynamic tree settings. - - :param can_select_parent_nodes: Indicates whether parent nodes can be selected. - :type can_select_parent_nodes: bool - :param can_select_leaf_nodes: Indicates whether leaf nodes can be selected. - :type can_select_leaf_nodes: bool - """ - - _attribute_map = { - 'can_select_parent_nodes': {'key': 'CanSelectParentNodes', 'type': 'bool'}, - 'can_select_leaf_nodes': {'key': 'CanSelectLeafNodes', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerCustomDynamicTreeSettings, self).__init__(**kwargs) - self.can_select_parent_nodes = kwargs.get('can_select_parent_nodes', None) - self.can_select_leaf_nodes = kwargs.get('can_select_leaf_nodes', None) - - -class SwaggerExternalDocumentation(msrest.serialization.Model): - """The swagger external documentation. - - :param description: The document description. - :type description: str - :param uri: The documentation Uri. - :type uri: str - :param extensions: The vendor extensions. - :type extensions: dict[str, object] - """ - - _attribute_map = { - 'description': {'key': 'description', 'type': 'str'}, - 'uri': {'key': 'uri', 'type': 'str'}, - 'extensions': {'key': 'extensions', 'type': '{object}'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerExternalDocumentation, self).__init__(**kwargs) - self.description = kwargs.get('description', None) - self.uri = kwargs.get('uri', None) - self.extensions = kwargs.get('extensions', None) - - -class SwaggerSchema(msrest.serialization.Model): - """The swagger schema. - - :param ref: The reference. - :type ref: str - :param type: The type. Possible values include: "String", "Number", "Integer", "Boolean", - "Array", "File", "Object", "Null". - :type type: str or ~azure.mgmt.logic.models.SwaggerSchemaType - :param title: The title. - :type title: str - :param items: The items schema. - :type items: ~azure.mgmt.logic.models.SwaggerSchema - :param properties: The object properties. - :type properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :param additional_properties: The additional properties. - :type additional_properties: object - :param required: The object required properties. - :type required: list[str] - :param max_properties: The maximum number of allowed properties. - :type max_properties: int - :param min_properties: The minimum number of allowed properties. - :type min_properties: int - :param all_of: The schemas which must pass validation when this schema is used. - :type all_of: list[~azure.mgmt.logic.models.SwaggerSchema] - :param discriminator: The discriminator. - :type discriminator: str - :param read_only: Indicates whether this property must be present in the a request. - :type read_only: bool - :param xml: The xml representation format for a property. - :type xml: ~azure.mgmt.logic.models.SwaggerXml - :param external_docs: The external documentation. - :type external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation - :param example: The example value. - :type example: object - :param notification_url_extension: Indicates the notification url extension. If this is set, - the property's value should be a callback url for a webhook. - :type notification_url_extension: bool - :param dynamic_schema_old: The dynamic schema configuration. - :type dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema - :param dynamic_schema_new: The dynamic schema configuration. - :type dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties - :param dynamic_list_new: The dynamic list. - :type dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList - :param dynamic_tree: The dynamic values tree configuration. - :type dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree - """ - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'title': {'key': 'title', 'type': 'str'}, - 'items': {'key': 'items', 'type': 'SwaggerSchema'}, - 'properties': {'key': 'properties', 'type': '{SwaggerSchema}'}, - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - 'required': {'key': 'required', 'type': '[str]'}, - 'max_properties': {'key': 'maxProperties', 'type': 'int'}, - 'min_properties': {'key': 'minProperties', 'type': 'int'}, - 'all_of': {'key': 'allOf', 'type': '[SwaggerSchema]'}, - 'discriminator': {'key': 'discriminator', 'type': 'str'}, - 'read_only': {'key': 'readOnly', 'type': 'bool'}, - 'xml': {'key': 'xml', 'type': 'SwaggerXml'}, - 'external_docs': {'key': 'externalDocs', 'type': 'SwaggerExternalDocumentation'}, - 'example': {'key': 'example', 'type': 'object'}, - 'notification_url_extension': {'key': 'notificationUrlExtension', 'type': 'bool'}, - 'dynamic_schema_old': {'key': 'dynamicSchemaOld', 'type': 'SwaggerCustomDynamicSchema'}, - 'dynamic_schema_new': {'key': 'dynamicSchemaNew', 'type': 'SwaggerCustomDynamicProperties'}, - 'dynamic_list_new': {'key': 'dynamicListNew', 'type': 'SwaggerCustomDynamicList'}, - 'dynamic_tree': {'key': 'dynamicTree', 'type': 'SwaggerCustomDynamicTree'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerSchema, self).__init__(**kwargs) - self.ref = kwargs.get('ref', None) - self.type = kwargs.get('type', None) - self.title = kwargs.get('title', None) - self.items = kwargs.get('items', None) - self.properties = kwargs.get('properties', None) - self.additional_properties = kwargs.get('additional_properties', None) - self.required = kwargs.get('required', None) - self.max_properties = kwargs.get('max_properties', None) - self.min_properties = kwargs.get('min_properties', None) - self.all_of = kwargs.get('all_of', None) - self.discriminator = kwargs.get('discriminator', None) - self.read_only = kwargs.get('read_only', None) - self.xml = kwargs.get('xml', None) - self.external_docs = kwargs.get('external_docs', None) - self.example = kwargs.get('example', None) - self.notification_url_extension = kwargs.get('notification_url_extension', None) - self.dynamic_schema_old = kwargs.get('dynamic_schema_old', None) - self.dynamic_schema_new = kwargs.get('dynamic_schema_new', None) - self.dynamic_list_new = kwargs.get('dynamic_list_new', None) - self.dynamic_tree = kwargs.get('dynamic_tree', None) - - -class SwaggerXml(msrest.serialization.Model): - """The Swagger XML. - - :param name: The xml element or attribute name. - :type name: str - :param namespace: The xml namespace. - :type namespace: str - :param prefix: The name prefix. - :type prefix: str - :param attribute: Indicates whether the property should be an attribute instead of an element. - :type attribute: bool - :param wrapped: Indicates whether the array elements are wrapped in a container element. - :type wrapped: bool - :param extensions: The vendor extensions. - :type extensions: dict[str, object] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'namespace': {'key': 'namespace', 'type': 'str'}, - 'prefix': {'key': 'prefix', 'type': 'str'}, - 'attribute': {'key': 'attribute', 'type': 'bool'}, - 'wrapped': {'key': 'wrapped', 'type': 'bool'}, - 'extensions': {'key': 'extensions', 'type': '{object}'}, - } - - def __init__( - self, - **kwargs - ): - super(SwaggerXml, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.namespace = kwargs.get('namespace', None) - self.prefix = kwargs.get('prefix', None) - self.attribute = kwargs.get('attribute', None) - self.wrapped = kwargs.get('wrapped', None) - self.extensions = kwargs.get('extensions', None) - - -class TrackingEvent(msrest.serialization.Model): - """The tracking event. - - All required parameters must be populated in order to send to Azure. - - :param event_level: Required. The event level. Possible values include: "LogAlways", - "Critical", "Error", "Warning", "Informational", "Verbose". - :type event_level: str or ~azure.mgmt.logic.models.EventLevel - :param event_time: Required. The event time. - :type event_time: ~datetime.datetime - :param record_type: Required. The record type. Possible values include: "NotSpecified", - "Custom", "AS2Message", "AS2MDN", "X12Interchange", "X12FunctionalGroup", "X12TransactionSet", - "X12InterchangeAcknowledgment", "X12FunctionalGroupAcknowledgment", - "X12TransactionSetAcknowledgment", "EdifactInterchange", "EdifactFunctionalGroup", - "EdifactTransactionSet", "EdifactInterchangeAcknowledgment", - "EdifactFunctionalGroupAcknowledgment", "EdifactTransactionSetAcknowledgment". - :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType - :param record: The record. - :type record: object - :param error: The error. - :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo - """ - - _validation = { - 'event_level': {'required': True}, - 'event_time': {'required': True}, - 'record_type': {'required': True}, - } - - _attribute_map = { - 'event_level': {'key': 'eventLevel', 'type': 'str'}, - 'event_time': {'key': 'eventTime', 'type': 'iso-8601'}, - 'record_type': {'key': 'recordType', 'type': 'str'}, - 'record': {'key': 'record', 'type': 'object'}, - 'error': {'key': 'error', 'type': 'TrackingEventErrorInfo'}, - } - - def __init__( - self, - **kwargs - ): - super(TrackingEvent, self).__init__(**kwargs) - self.event_level = kwargs['event_level'] - self.event_time = kwargs['event_time'] - self.record_type = kwargs['record_type'] - self.record = kwargs.get('record', None) - self.error = kwargs.get('error', None) - - -class TrackingEventErrorInfo(msrest.serialization.Model): - """The tracking event error info. - - :param message: The message. - :type message: str - :param code: The code. - :type code: str - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TrackingEventErrorInfo, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.code = kwargs.get('code', None) - - -class TrackingEventsDefinition(msrest.serialization.Model): - """The tracking events definition. - - All required parameters must be populated in order to send to Azure. - - :param source_type: Required. The source type. - :type source_type: str - :param track_events_options: The track events options. Possible values include: "None", - "DisableSourceInfoEnrich". - :type track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions - :param events: Required. The events. - :type events: list[~azure.mgmt.logic.models.TrackingEvent] - """ - - _validation = { - 'source_type': {'required': True}, - 'events': {'required': True}, - } - - _attribute_map = { - 'source_type': {'key': 'sourceType', 'type': 'str'}, - 'track_events_options': {'key': 'trackEventsOptions', 'type': 'str'}, - 'events': {'key': 'events', 'type': '[TrackingEvent]'}, - } - - def __init__( - self, - **kwargs - ): - super(TrackingEventsDefinition, self).__init__(**kwargs) - self.source_type = kwargs['source_type'] - self.track_events_options = kwargs.get('track_events_options', None) - self.events = kwargs['events'] - - -class Workflow(Resource): - """The workflow type. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :ivar provisioning_state: Gets the provisioning state. Possible values include: "NotSpecified", - "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", - "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", - "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar created_time: Gets the created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: ~datetime.datetime - :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", - "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'endpoints_configuration': {'key': 'properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, - 'access_control': {'key': 'properties.accessControl', 'type': 'FlowAccessControlConfiguration'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'ResourceReference'}, - 'definition': {'key': 'properties.definition', 'type': 'object'}, - 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, - } - - def __init__( - self, - **kwargs - ): - super(Workflow, self).__init__(**kwargs) - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = kwargs.get('state', None) - self.version = None - self.access_endpoint = None - self.endpoints_configuration = kwargs.get('endpoints_configuration', None) - self.access_control = kwargs.get('access_control', None) - self.sku = None - self.integration_account = kwargs.get('integration_account', None) - self.integration_service_environment = kwargs.get('integration_service_environment', None) - self.definition = kwargs.get('definition', None) - self.parameters = kwargs.get('parameters', None) - - -class WorkflowFilter(msrest.serialization.Model): - """The workflow filter. - - :param state: The state of workflows. Possible values include: "NotSpecified", "Completed", - "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowFilter, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - - -class WorkflowListResult(msrest.serialization.Model): - """The list of workflows. - - :param value: The list of workflows. - :type value: list[~azure.mgmt.logic.models.Workflow] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Workflow]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class WorkflowParameter(msrest.serialization.Model): - """The workflow parameters. - - :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", - "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str - """ - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowParameter, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.value = kwargs.get('value', None) - self.metadata = kwargs.get('metadata', None) - self.description = kwargs.get('description', None) - - -class WorkflowOutputParameter(WorkflowParameter): - """The workflow output parameter. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", - "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str - :ivar error: Gets the error. - :vartype error: object - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'object'}, - 'metadata': {'key': 'metadata', 'type': 'object'}, - 'description': {'key': 'description', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowOutputParameter, self).__init__(**kwargs) - self.error = None - - -class WorkflowReference(ResourceReference): - """The workflow reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: The resource id. - :type id: str - :ivar type: Gets the resource type. - :vartype type: str - :param name: The workflow name. - :type name: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class WorkflowRun(SubResource): - """The workflow run. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow run name. - :vartype name: str - :ivar type: Gets the workflow run type. - :vartype type: str - :ivar wait_end_time: Gets the wait end time. - :vartype wait_end_time: ~datetime.datetime - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", - "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", - "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar correlation_id: Gets the correlation id. - :vartype correlation_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar workflow: Gets the reference to workflow version. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - :ivar trigger: Gets the fired trigger. - :vartype trigger: ~azure.mgmt.logic.models.WorkflowRunTrigger - :ivar outputs: Gets the outputs. - :vartype outputs: dict[str, ~azure.mgmt.logic.models.WorkflowOutputParameter] - :ivar response: Gets the response of the flow run. - :vartype response: ~azure.mgmt.logic.models.WorkflowRunTrigger - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'wait_end_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'correlation_id': {'readonly': True}, - 'workflow': {'readonly': True}, - 'trigger': {'readonly': True}, - 'outputs': {'readonly': True}, - 'response': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'wait_end_time': {'key': 'properties.waitEndTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'correlation_id': {'key': 'properties.correlationId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - 'trigger': {'key': 'properties.trigger', 'type': 'WorkflowRunTrigger'}, - 'outputs': {'key': 'properties.outputs', 'type': '{WorkflowOutputParameter}'}, - 'response': {'key': 'properties.response', 'type': 'WorkflowRunTrigger'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRun, self).__init__(**kwargs) - self.name = None - self.type = None - self.wait_end_time = None - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.correlation_id = None - self.correlation = kwargs.get('correlation', None) - self.workflow = None - self.trigger = None - self.outputs = None - self.response = None - - -class WorkflowRunAction(SubResource): - """The workflow run action. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow run action name. - :vartype name: str - :ivar type: Gets the workflow run action type. - :vartype type: str - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", - "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", - "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunAction, self).__init__(**kwargs) - self.name = None - self.type = None - self.start_time = None - self.end_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = kwargs.get('correlation', None) - self.inputs_link = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = kwargs.get('retry_history', None) - - -class WorkflowRunActionFilter(msrest.serialization.Model): - """The workflow run action filter. - - :param status: The status of workflow run action. Possible values include: "NotSpecified", - "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", - "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunActionFilter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - - -class WorkflowRunActionListResult(msrest.serialization.Model): - """The list of workflow run actions. - - :param value: A list of workflow run actions. - :type value: list[~azure.mgmt.logic.models.WorkflowRunAction] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowRunAction]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunActionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class WorkflowRunActionRepetitionDefinition(Resource): - """The workflow run action repetition definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'properties.correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'inputs': {'key': 'properties.inputs', 'type': 'object'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'properties.outputs', 'type': 'object'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'properties.trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'properties.retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'properties.iterationCount', 'type': 'int'}, - 'repetition_indexes': {'key': 'properties.repetitionIndexes', 'type': '[RepetitionIndex]'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunActionRepetitionDefinition, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.correlation = kwargs.get('correlation', None) - self.status = kwargs.get('status', None) - self.code = kwargs.get('code', None) - self.error = kwargs.get('error', None) - self.tracking_id = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.tracked_properties = None - self.retry_history = kwargs.get('retry_history', None) - self.iteration_count = kwargs.get('iteration_count', None) - self.repetition_indexes = kwargs.get('repetition_indexes', None) - - -class WorkflowRunActionRepetitionDefinitionCollection(msrest.serialization.Model): - """A collection of workflow run action repetitions. - - :param next_link: The link used to get the next page of recommendations. - :type next_link: str - :param value: - :type value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'value': {'key': 'value', 'type': '[WorkflowRunActionRepetitionDefinition]'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.value = kwargs.get('value', None) - - -class WorkflowRunActionRepetitionProperties(OperationResult): - """The workflow run action repetition properties definition. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: - "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", - "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] - """ - - _validation = { - 'tracking_id': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'correlation': {'key': 'correlation', 'type': 'RunActionCorrelation'}, - 'status': {'key': 'status', 'type': 'str'}, - 'code': {'key': 'code', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - 'retry_history': {'key': 'retryHistory', 'type': '[RetryHistory]'}, - 'iteration_count': {'key': 'iterationCount', 'type': 'int'}, - 'repetition_indexes': {'key': 'repetitionIndexes', 'type': '[RepetitionIndex]'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunActionRepetitionProperties, self).__init__(**kwargs) - self.repetition_indexes = kwargs.get('repetition_indexes', None) - - -class WorkflowRunFilter(msrest.serialization.Model): - """The workflow run filter. - - :param status: The status of workflow run. Possible values include: "NotSpecified", "Paused", - "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", - "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunFilter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - - -class WorkflowRunListResult(msrest.serialization.Model): - """The list of workflow runs. - - :param value: A list of workflow runs. - :type value: list[~azure.mgmt.logic.models.WorkflowRun] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowRun]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class WorkflowRunTrigger(msrest.serialization.Model): - """The workflow run trigger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Gets the name. - :vartype name: str - :ivar inputs: Gets the inputs. - :vartype inputs: object - :ivar inputs_link: Gets the link to inputs. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs: Gets the outputs. - :vartype outputs: object - :ivar outputs_link: Gets the link to outputs. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar scheduled_time: Gets the scheduled time. - :vartype scheduled_time: ~datetime.datetime - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar code: Gets the code. - :vartype code: str - :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", - "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", - "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar error: Gets the error. - :vartype error: object - :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - """ - - _validation = { - 'name': {'readonly': True}, - 'inputs': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'scheduled_time': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'code': {'readonly': True}, - 'status': {'readonly': True}, - 'error': {'readonly': True}, - 'tracked_properties': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'inputs': {'key': 'inputs', 'type': 'object'}, - 'inputs_link': {'key': 'inputsLink', 'type': 'ContentLink'}, - 'outputs': {'key': 'outputs', 'type': 'object'}, - 'outputs_link': {'key': 'outputsLink', 'type': 'ContentLink'}, - 'scheduled_time': {'key': 'scheduledTime', 'type': 'iso-8601'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'correlation': {'key': 'correlation', 'type': 'Correlation'}, - 'code': {'key': 'code', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'object'}, - 'tracked_properties': {'key': 'trackedProperties', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowRunTrigger, self).__init__(**kwargs) - self.name = None - self.inputs = None - self.inputs_link = None - self.outputs = None - self.outputs_link = None - self.scheduled_time = None - self.start_time = None - self.end_time = None - self.tracking_id = None - self.correlation = kwargs.get('correlation', None) - self.code = None - self.status = None - self.error = None - self.tracked_properties = None - - -class WorkflowTrigger(SubResource): - """The workflow trigger. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow trigger name. - :vartype name: str - :ivar type: Gets the workflow trigger type. - :vartype type: str - :ivar provisioning_state: Gets the provisioning state. Possible values include: "NotSpecified", - "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", - "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", - "Unregistered", "Completed". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowTriggerProvisioningState - :ivar created_time: Gets the created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: ~datetime.datetime - :ivar state: Gets the state. Possible values include: "NotSpecified", "Completed", "Enabled", - "Disabled", "Deleted", "Suspended". - :vartype state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", - "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", - "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar last_execution_time: Gets the last execution time. - :vartype last_execution_time: ~datetime.datetime - :ivar next_execution_time: Gets the next execution time. - :vartype next_execution_time: ~datetime.datetime - :ivar recurrence: Gets the workflow trigger recurrence. - :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence - :ivar workflow: Gets the reference to workflow. - :vartype workflow: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'state': {'readonly': True}, - 'status': {'readonly': True}, - 'last_execution_time': {'readonly': True}, - 'next_execution_time': {'readonly': True}, - 'recurrence': {'readonly': True}, - 'workflow': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'last_execution_time': {'key': 'properties.lastExecutionTime', 'type': 'iso-8601'}, - 'next_execution_time': {'key': 'properties.nextExecutionTime', 'type': 'iso-8601'}, - 'recurrence': {'key': 'properties.recurrence', 'type': 'WorkflowTriggerRecurrence'}, - 'workflow': {'key': 'properties.workflow', 'type': 'ResourceReference'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTrigger, self).__init__(**kwargs) - self.name = None - self.type = None - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = None - self.status = None - self.last_execution_time = None - self.next_execution_time = None - self.recurrence = None - self.workflow = None - - -class WorkflowTriggerCallbackUrl(msrest.serialization.Model): - """The workflow trigger callback URL. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Gets the workflow trigger callback URL. - :vartype value: str - :ivar method: Gets the workflow trigger callback URL HTTP method. - :vartype method: str - :ivar base_path: Gets the workflow trigger callback URL base path. - :vartype base_path: str - :ivar relative_path: Gets the workflow trigger callback URL relative path. - :vartype relative_path: str - :param relative_path_parameters: Gets the workflow trigger callback URL relative path - parameters. - :type relative_path_parameters: list[str] - :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries - """ - - _validation = { - 'value': {'readonly': True}, - 'method': {'readonly': True}, - 'base_path': {'readonly': True}, - 'relative_path': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'base_path': {'key': 'basePath', 'type': 'str'}, - 'relative_path': {'key': 'relativePath', 'type': 'str'}, - 'relative_path_parameters': {'key': 'relativePathParameters', 'type': '[str]'}, - 'queries': {'key': 'queries', 'type': 'WorkflowTriggerListCallbackUrlQueries'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) - self.value = None - self.method = None - self.base_path = None - self.relative_path = None - self.relative_path_parameters = kwargs.get('relative_path_parameters', None) - self.queries = kwargs.get('queries', None) - - -class WorkflowTriggerFilter(msrest.serialization.Model): - """The workflow trigger filter. - - :param state: The state of workflow trigger. Possible values include: "NotSpecified", - "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState - """ - - _attribute_map = { - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerFilter, self).__init__(**kwargs) - self.state = kwargs.get('state', None) - - -class WorkflowTriggerHistory(SubResource): - """The workflow trigger history. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the workflow trigger history name. - :vartype name: str - :ivar type: Gets the workflow trigger history type. - :vartype type: str - :ivar start_time: Gets the start time. - :vartype start_time: ~datetime.datetime - :ivar end_time: Gets the end time. - :vartype end_time: ~datetime.datetime - :ivar scheduled_time: The scheduled time. - :vartype scheduled_time: ~datetime.datetime - :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", - "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", - "Aborted", "Ignored". - :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus - :ivar code: Gets the code. - :vartype code: str - :ivar error: Gets the error. - :vartype error: object - :ivar tracking_id: Gets the tracking id. - :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation - :ivar inputs_link: Gets the link to input parameters. - :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar outputs_link: Gets the link to output parameters. - :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink - :ivar fired: The value indicating whether trigger was fired. - :vartype fired: bool - :ivar run: Gets the reference to workflow run. - :vartype run: ~azure.mgmt.logic.models.ResourceReference - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_time': {'readonly': True}, - 'end_time': {'readonly': True}, - 'scheduled_time': {'readonly': True}, - 'status': {'readonly': True}, - 'code': {'readonly': True}, - 'error': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'inputs_link': {'readonly': True}, - 'outputs_link': {'readonly': True}, - 'fired': {'readonly': True}, - 'run': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, - 'scheduled_time': {'key': 'properties.scheduledTime', 'type': 'iso-8601'}, - 'status': {'key': 'properties.status', 'type': 'str'}, - 'code': {'key': 'properties.code', 'type': 'str'}, - 'error': {'key': 'properties.error', 'type': 'object'}, - 'tracking_id': {'key': 'properties.trackingId', 'type': 'str'}, - 'correlation': {'key': 'properties.correlation', 'type': 'Correlation'}, - 'inputs_link': {'key': 'properties.inputsLink', 'type': 'ContentLink'}, - 'outputs_link': {'key': 'properties.outputsLink', 'type': 'ContentLink'}, - 'fired': {'key': 'properties.fired', 'type': 'bool'}, - 'run': {'key': 'properties.run', 'type': 'ResourceReference'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerHistory, self).__init__(**kwargs) - self.name = None - self.type = None - self.start_time = None - self.end_time = None - self.scheduled_time = None - self.status = None - self.code = None - self.error = None - self.tracking_id = None - self.correlation = kwargs.get('correlation', None) - self.inputs_link = None - self.outputs_link = None - self.fired = None - self.run = None - - -class WorkflowTriggerHistoryFilter(msrest.serialization.Model): - """The workflow trigger history filter. - - :param status: The status of workflow trigger history. Possible values include: "NotSpecified", - "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", - "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - - -class WorkflowTriggerHistoryListResult(msrest.serialization.Model): - """The list of workflow trigger histories. - - :param value: A list of workflow trigger histories. - :type value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowTriggerHistory]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerHistoryListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class WorkflowTriggerListCallbackUrlQueries(msrest.serialization.Model): - """Gets the workflow trigger callback URL query parameters. - - :param api_version: The api version. - :type api_version: str - :param sp: The SAS permissions. - :type sp: str - :param sv: The SAS version. - :type sv: str - :param sig: The SAS signature. - :type sig: str - :param se: The SAS timestamp. - :type se: str - """ - - _attribute_map = { - 'api_version': {'key': 'api-version', 'type': 'str'}, - 'sp': {'key': 'sp', 'type': 'str'}, - 'sv': {'key': 'sv', 'type': 'str'}, - 'sig': {'key': 'sig', 'type': 'str'}, - 'se': {'key': 'se', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) - self.api_version = kwargs.get('api_version', None) - self.sp = kwargs.get('sp', None) - self.sv = kwargs.get('sv', None) - self.sig = kwargs.get('sig', None) - self.se = kwargs.get('se', None) - - -class WorkflowTriggerListResult(msrest.serialization.Model): - """The list of workflow triggers. - - :param value: A list of workflow triggers. - :type value: list[~azure.mgmt.logic.models.WorkflowTrigger] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowTrigger]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class WorkflowTriggerRecurrence(msrest.serialization.Model): - """The workflow trigger recurrence. - - :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", - "Hour", "Day", "Week", "Month", "Year". - :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency - :param interval: The interval. - :type interval: int - :param start_time: The start time. - :type start_time: str - :param end_time: The end time. - :type end_time: str - :param time_zone: The time zone. - :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule - """ - - _attribute_map = { - 'frequency': {'key': 'frequency', 'type': 'str'}, - 'interval': {'key': 'interval', 'type': 'int'}, - 'start_time': {'key': 'startTime', 'type': 'str'}, - 'end_time': {'key': 'endTime', 'type': 'str'}, - 'time_zone': {'key': 'timeZone', 'type': 'str'}, - 'schedule': {'key': 'schedule', 'type': 'RecurrenceSchedule'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerRecurrence, self).__init__(**kwargs) - self.frequency = kwargs.get('frequency', None) - self.interval = kwargs.get('interval', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.time_zone = kwargs.get('time_zone', None) - self.schedule = kwargs.get('schedule', None) - - -class WorkflowTriggerReference(ResourceReference): - """The workflow trigger reference. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: The resource id. - :type id: str - :ivar type: Gets the resource type. - :vartype type: str - :param name: The workflow trigger resource reference name. - :type name: str - :param flow_name: The workflow name. - :type flow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'flow_name': {'key': 'flowName', 'type': 'str'}, - 'trigger_name': {'key': 'triggerName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerReference, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.flow_name = kwargs.get('flow_name', None) - self.trigger_name = kwargs.get('trigger_name', None) - - -class WorkflowVersion(Resource): - """The workflow version. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The resource id. - :vartype id: str - :ivar name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :ivar provisioning_state: The provisioning state. Possible values include: "NotSpecified", - "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", - "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", - "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :ivar created_time: Gets the created time. - :vartype created_time: ~datetime.datetime - :ivar changed_time: Gets the changed time. - :vartype changed_time: ~datetime.datetime - :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", - "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :ivar version: Gets the version. - :vartype version: str - :ivar access_endpoint: Gets the access endpoint. - :vartype access_endpoint: str - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration - :ivar sku: The sku. - :vartype sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'created_time': {'readonly': True}, - 'changed_time': {'readonly': True}, - 'version': {'readonly': True}, - 'access_endpoint': {'readonly': True}, - 'sku': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'version': {'key': 'properties.version', 'type': 'str'}, - 'access_endpoint': {'key': 'properties.accessEndpoint', 'type': 'str'}, - 'endpoints_configuration': {'key': 'properties.endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, - 'access_control': {'key': 'properties.accessControl', 'type': 'FlowAccessControlConfiguration'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'integration_account': {'key': 'properties.integrationAccount', 'type': 'ResourceReference'}, - 'definition': {'key': 'properties.definition', 'type': 'object'}, - 'parameters': {'key': 'properties.parameters', 'type': '{WorkflowParameter}'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowVersion, self).__init__(**kwargs) - self.provisioning_state = None - self.created_time = None - self.changed_time = None - self.state = kwargs.get('state', None) - self.version = None - self.access_endpoint = None - self.endpoints_configuration = kwargs.get('endpoints_configuration', None) - self.access_control = kwargs.get('access_control', None) - self.sku = None - self.integration_account = kwargs.get('integration_account', None) - self.definition = kwargs.get('definition', None) - self.parameters = kwargs.get('parameters', None) - - -class WorkflowVersionListResult(msrest.serialization.Model): - """The list of workflow versions. - - :param value: A list of workflow versions. - :type value: list[~azure.mgmt.logic.models.WorkflowVersion] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[WorkflowVersion]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowVersionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class WsdlService(msrest.serialization.Model): - """The WSDL service. - - :param qualified_name: The qualified name. - :type qualified_name: str - :param endpoint_qualified_names: The list of endpoints' qualified names. - :type endpoint_qualified_names: list[str] - """ - - _attribute_map = { - 'qualified_name': {'key': 'qualifiedName', 'type': 'str'}, - 'endpoint_qualified_names': {'key': 'EndpointQualifiedNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(WsdlService, self).__init__(**kwargs) - self.qualified_name = kwargs.get('qualified_name', None) - self.endpoint_qualified_names = kwargs.get('endpoint_qualified_names', None) - - -class X12AcknowledgementSettings(msrest.serialization.Model): - """The X12 agreement acknowledgement settings. - - All required parameters must be populated in order to send to Azure. - - :param need_technical_acknowledgement: Required. The value indicating whether technical - acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating whether to batch the - technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating whether functional - acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param functional_acknowledgement_version: The functional acknowledgement version. - :type functional_acknowledgement_version: str - :param batch_functional_acknowledgements: Required. The value indicating whether to batch - functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_implementation_acknowledgement: Required. The value indicating whether - implementation acknowledgement is needed. - :type need_implementation_acknowledgement: bool - :param implementation_acknowledgement_version: The implementation acknowledgement version. - :type implementation_acknowledgement_version: str - :param batch_implementation_acknowledgements: Required. The value indicating whether to batch - implementation acknowledgements. - :type batch_implementation_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating whether a loop is needed - for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating whether to send - synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The acknowledgement control number - lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The acknowledgement control number - upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value indicating whether to - rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool - """ - - _validation = { - 'need_technical_acknowledgement': {'required': True}, - 'batch_technical_acknowledgements': {'required': True}, - 'need_functional_acknowledgement': {'required': True}, - 'batch_functional_acknowledgements': {'required': True}, - 'need_implementation_acknowledgement': {'required': True}, - 'batch_implementation_acknowledgements': {'required': True}, - 'need_loop_for_valid_messages': {'required': True}, - 'send_synchronous_acknowledgement': {'required': True}, - 'acknowledgement_control_number_lower_bound': {'required': True}, - 'acknowledgement_control_number_upper_bound': {'required': True}, - 'rollover_acknowledgement_control_number': {'required': True}, - } - - _attribute_map = { - 'need_technical_acknowledgement': {'key': 'needTechnicalAcknowledgement', 'type': 'bool'}, - 'batch_technical_acknowledgements': {'key': 'batchTechnicalAcknowledgements', 'type': 'bool'}, - 'need_functional_acknowledgement': {'key': 'needFunctionalAcknowledgement', 'type': 'bool'}, - 'functional_acknowledgement_version': {'key': 'functionalAcknowledgementVersion', 'type': 'str'}, - 'batch_functional_acknowledgements': {'key': 'batchFunctionalAcknowledgements', 'type': 'bool'}, - 'need_implementation_acknowledgement': {'key': 'needImplementationAcknowledgement', 'type': 'bool'}, - 'implementation_acknowledgement_version': {'key': 'implementationAcknowledgementVersion', 'type': 'str'}, - 'batch_implementation_acknowledgements': {'key': 'batchImplementationAcknowledgements', 'type': 'bool'}, - 'need_loop_for_valid_messages': {'key': 'needLoopForValidMessages', 'type': 'bool'}, - 'send_synchronous_acknowledgement': {'key': 'sendSynchronousAcknowledgement', 'type': 'bool'}, - 'acknowledgement_control_number_prefix': {'key': 'acknowledgementControlNumberPrefix', 'type': 'str'}, - 'acknowledgement_control_number_suffix': {'key': 'acknowledgementControlNumberSuffix', 'type': 'str'}, - 'acknowledgement_control_number_lower_bound': {'key': 'acknowledgementControlNumberLowerBound', 'type': 'int'}, - 'acknowledgement_control_number_upper_bound': {'key': 'acknowledgementControlNumberUpperBound', 'type': 'int'}, - 'rollover_acknowledgement_control_number': {'key': 'rolloverAcknowledgementControlNumber', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(X12AcknowledgementSettings, self).__init__(**kwargs) - self.need_technical_acknowledgement = kwargs['need_technical_acknowledgement'] - self.batch_technical_acknowledgements = kwargs['batch_technical_acknowledgements'] - self.need_functional_acknowledgement = kwargs['need_functional_acknowledgement'] - self.functional_acknowledgement_version = kwargs.get('functional_acknowledgement_version', None) - self.batch_functional_acknowledgements = kwargs['batch_functional_acknowledgements'] - self.need_implementation_acknowledgement = kwargs['need_implementation_acknowledgement'] - self.implementation_acknowledgement_version = kwargs.get('implementation_acknowledgement_version', None) - self.batch_implementation_acknowledgements = kwargs['batch_implementation_acknowledgements'] - self.need_loop_for_valid_messages = kwargs['need_loop_for_valid_messages'] - self.send_synchronous_acknowledgement = kwargs['send_synchronous_acknowledgement'] - self.acknowledgement_control_number_prefix = kwargs.get('acknowledgement_control_number_prefix', None) - self.acknowledgement_control_number_suffix = kwargs.get('acknowledgement_control_number_suffix', None) - self.acknowledgement_control_number_lower_bound = kwargs['acknowledgement_control_number_lower_bound'] - self.acknowledgement_control_number_upper_bound = kwargs['acknowledgement_control_number_upper_bound'] - self.rollover_acknowledgement_control_number = kwargs['rollover_acknowledgement_control_number'] - - -class X12AgreementContent(msrest.serialization.Model): - """The X12 agreement content. - - All required parameters must be populated in order to send to Azure. - - :param receive_agreement: Required. The X12 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - :param send_agreement: Required. The X12 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - """ - - _validation = { - 'receive_agreement': {'required': True}, - 'send_agreement': {'required': True}, - } - - _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'X12OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'X12OneWayAgreement'}, - } - - def __init__( - self, - **kwargs - ): - super(X12AgreementContent, self).__init__(**kwargs) - self.receive_agreement = kwargs['receive_agreement'] - self.send_agreement = kwargs['send_agreement'] - - -class X12DelimiterOverrides(msrest.serialization.Model): - """The X12 delimiter override settings. - - All required parameters must be populated in order to send to Azure. - - :param protocol_version: The protocol version. - :type protocol_version: str - :param message_id: The message id. - :type message_id: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param replace_character: Required. The replacement character. - :type replace_character: int - :param replace_separators_in_payload: Required. The value indicating whether to replace - separators in payload. - :type replace_separators_in_payload: bool - :param target_namespace: The target namespace on which this delimiter settings has to be - applied. - :type target_namespace: str - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'segment_terminator': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - 'replace_character': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - } - - _attribute_map = { - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12DelimiterOverrides, self).__init__(**kwargs) - self.protocol_version = kwargs.get('protocol_version', None) - self.message_id = kwargs.get('message_id', None) - self.data_element_separator = kwargs['data_element_separator'] - self.component_separator = kwargs['component_separator'] - self.segment_terminator = kwargs['segment_terminator'] - self.segment_terminator_suffix = kwargs['segment_terminator_suffix'] - self.replace_character = kwargs['replace_character'] - self.replace_separators_in_payload = kwargs['replace_separators_in_payload'] - self.target_namespace = kwargs.get('target_namespace', None) - - -class X12EnvelopeOverride(msrest.serialization.Model): - """The X12 envelope override settings. - - All required parameters must be populated in order to send to Azure. - - :param target_namespace: Required. The target namespace on which this envelope settings has to - be applied. - :type target_namespace: str - :param protocol_version: Required. The protocol version on which this envelope settings has to - be applied. - :type protocol_version: str - :param message_id: Required. The message id on which this envelope settings has to be applied. - :type message_id: str - :param responsible_agency_code: Required. The responsible agency code. - :type responsible_agency_code: str - :param header_version: Required. The header version. - :type header_version: str - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param functional_identifier_code: The functional identifier code. - :type functional_identifier_code: str - :param date_format: Required. The date format. Possible values include: "NotSpecified", - "CCYYMMDD", "YYMMDD". - :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :param time_format: Required. The time format. Possible values include: "NotSpecified", "HHMM", - "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - """ - - _validation = { - 'target_namespace': {'required': True}, - 'protocol_version': {'required': True}, - 'message_id': {'required': True}, - 'responsible_agency_code': {'required': True}, - 'header_version': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'date_format': {'required': True}, - 'time_format': {'required': True}, - } - - _attribute_map = { - 'target_namespace': {'key': 'targetNamespace', 'type': 'str'}, - 'protocol_version': {'key': 'protocolVersion', 'type': 'str'}, - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'responsible_agency_code': {'key': 'responsibleAgencyCode', 'type': 'str'}, - 'header_version': {'key': 'headerVersion', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'functional_identifier_code': {'key': 'functionalIdentifierCode', 'type': 'str'}, - 'date_format': {'key': 'dateFormat', 'type': 'str'}, - 'time_format': {'key': 'timeFormat', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12EnvelopeOverride, self).__init__(**kwargs) - self.target_namespace = kwargs['target_namespace'] - self.protocol_version = kwargs['protocol_version'] - self.message_id = kwargs['message_id'] - self.responsible_agency_code = kwargs['responsible_agency_code'] - self.header_version = kwargs['header_version'] - self.sender_application_id = kwargs['sender_application_id'] - self.receiver_application_id = kwargs['receiver_application_id'] - self.functional_identifier_code = kwargs.get('functional_identifier_code', None) - self.date_format = kwargs['date_format'] - self.time_format = kwargs['time_format'] - - -class X12EnvelopeSettings(msrest.serialization.Model): - """The X12 agreement envelope settings. - - All required parameters must be populated in order to send to Azure. - - :param control_standards_id: Required. The controls standards id. - :type control_standards_id: int - :param use_control_standards_id_as_repetition_character: Required. The value indicating whether - to use control standards id as repetition character. - :type use_control_standards_id_as_repetition_character: bool - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param control_version_number: Required. The control version number. - :type control_version_number: str - :param interchange_control_number_lower_bound: Required. The interchange control number lower - bound. - :type interchange_control_number_lower_bound: int - :param interchange_control_number_upper_bound: Required. The interchange control number upper - bound. - :type interchange_control_number_upper_bound: int - :param rollover_interchange_control_number: Required. The value indicating whether to rollover - interchange control number. - :type rollover_interchange_control_number: bool - :param enable_default_group_headers: Required. The value indicating whether to enable default - group headers. - :type enable_default_group_headers: bool - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_control_number_lower_bound: Required. The group control number lower bound. - :type group_control_number_lower_bound: int - :param group_control_number_upper_bound: Required. The group control number upper bound. - :type group_control_number_upper_bound: int - :param rollover_group_control_number: Required. The value indicating whether to rollover group - control number. - :type rollover_group_control_number: bool - :param group_header_agency_code: Required. The group header agency code. - :type group_header_agency_code: str - :param group_header_version: Required. The group header version. - :type group_header_version: str - :param transaction_set_control_number_lower_bound: Required. The transaction set control number - lower bound. - :type transaction_set_control_number_lower_bound: int - :param transaction_set_control_number_upper_bound: Required. The transaction set control number - upper bound. - :type transaction_set_control_number_upper_bound: int - :param rollover_transaction_set_control_number: Required. The value indicating whether to - rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control number suffix. - :type transaction_set_control_number_suffix: str - :param overwrite_existing_transaction_set_control_number: Required. The value indicating - whether to overwrite existing transaction set control number. - :type overwrite_existing_transaction_set_control_number: bool - :param group_header_date_format: Required. The group header date format. Possible values - include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :type group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :param group_header_time_format: Required. The group header time format. Possible values - include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - :param usage_indicator: Required. The usage indicator. Possible values include: "NotSpecified", - "Test", "Information", "Production". - :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator - """ - - _validation = { - 'control_standards_id': {'required': True}, - 'use_control_standards_id_as_repetition_character': {'required': True}, - 'sender_application_id': {'required': True}, - 'receiver_application_id': {'required': True}, - 'control_version_number': {'required': True}, - 'interchange_control_number_lower_bound': {'required': True}, - 'interchange_control_number_upper_bound': {'required': True}, - 'rollover_interchange_control_number': {'required': True}, - 'enable_default_group_headers': {'required': True}, - 'group_control_number_lower_bound': {'required': True}, - 'group_control_number_upper_bound': {'required': True}, - 'rollover_group_control_number': {'required': True}, - 'group_header_agency_code': {'required': True}, - 'group_header_version': {'required': True}, - 'transaction_set_control_number_lower_bound': {'required': True}, - 'transaction_set_control_number_upper_bound': {'required': True}, - 'rollover_transaction_set_control_number': {'required': True}, - 'overwrite_existing_transaction_set_control_number': {'required': True}, - 'group_header_date_format': {'required': True}, - 'group_header_time_format': {'required': True}, - 'usage_indicator': {'required': True}, - } - - _attribute_map = { - 'control_standards_id': {'key': 'controlStandardsId', 'type': 'int'}, - 'use_control_standards_id_as_repetition_character': {'key': 'useControlStandardsIdAsRepetitionCharacter', 'type': 'bool'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'receiver_application_id': {'key': 'receiverApplicationId', 'type': 'str'}, - 'control_version_number': {'key': 'controlVersionNumber', 'type': 'str'}, - 'interchange_control_number_lower_bound': {'key': 'interchangeControlNumberLowerBound', 'type': 'int'}, - 'interchange_control_number_upper_bound': {'key': 'interchangeControlNumberUpperBound', 'type': 'int'}, - 'rollover_interchange_control_number': {'key': 'rolloverInterchangeControlNumber', 'type': 'bool'}, - 'enable_default_group_headers': {'key': 'enableDefaultGroupHeaders', 'type': 'bool'}, - 'functional_group_id': {'key': 'functionalGroupId', 'type': 'str'}, - 'group_control_number_lower_bound': {'key': 'groupControlNumberLowerBound', 'type': 'int'}, - 'group_control_number_upper_bound': {'key': 'groupControlNumberUpperBound', 'type': 'int'}, - 'rollover_group_control_number': {'key': 'rolloverGroupControlNumber', 'type': 'bool'}, - 'group_header_agency_code': {'key': 'groupHeaderAgencyCode', 'type': 'str'}, - 'group_header_version': {'key': 'groupHeaderVersion', 'type': 'str'}, - 'transaction_set_control_number_lower_bound': {'key': 'transactionSetControlNumberLowerBound', 'type': 'int'}, - 'transaction_set_control_number_upper_bound': {'key': 'transactionSetControlNumberUpperBound', 'type': 'int'}, - 'rollover_transaction_set_control_number': {'key': 'rolloverTransactionSetControlNumber', 'type': 'bool'}, - 'transaction_set_control_number_prefix': {'key': 'transactionSetControlNumberPrefix', 'type': 'str'}, - 'transaction_set_control_number_suffix': {'key': 'transactionSetControlNumberSuffix', 'type': 'str'}, - 'overwrite_existing_transaction_set_control_number': {'key': 'overwriteExistingTransactionSetControlNumber', 'type': 'bool'}, - 'group_header_date_format': {'key': 'groupHeaderDateFormat', 'type': 'str'}, - 'group_header_time_format': {'key': 'groupHeaderTimeFormat', 'type': 'str'}, - 'usage_indicator': {'key': 'usageIndicator', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12EnvelopeSettings, self).__init__(**kwargs) - self.control_standards_id = kwargs['control_standards_id'] - self.use_control_standards_id_as_repetition_character = kwargs['use_control_standards_id_as_repetition_character'] - self.sender_application_id = kwargs['sender_application_id'] - self.receiver_application_id = kwargs['receiver_application_id'] - self.control_version_number = kwargs['control_version_number'] - self.interchange_control_number_lower_bound = kwargs['interchange_control_number_lower_bound'] - self.interchange_control_number_upper_bound = kwargs['interchange_control_number_upper_bound'] - self.rollover_interchange_control_number = kwargs['rollover_interchange_control_number'] - self.enable_default_group_headers = kwargs['enable_default_group_headers'] - self.functional_group_id = kwargs.get('functional_group_id', None) - self.group_control_number_lower_bound = kwargs['group_control_number_lower_bound'] - self.group_control_number_upper_bound = kwargs['group_control_number_upper_bound'] - self.rollover_group_control_number = kwargs['rollover_group_control_number'] - self.group_header_agency_code = kwargs['group_header_agency_code'] - self.group_header_version = kwargs['group_header_version'] - self.transaction_set_control_number_lower_bound = kwargs['transaction_set_control_number_lower_bound'] - self.transaction_set_control_number_upper_bound = kwargs['transaction_set_control_number_upper_bound'] - self.rollover_transaction_set_control_number = kwargs['rollover_transaction_set_control_number'] - self.transaction_set_control_number_prefix = kwargs.get('transaction_set_control_number_prefix', None) - self.transaction_set_control_number_suffix = kwargs.get('transaction_set_control_number_suffix', None) - self.overwrite_existing_transaction_set_control_number = kwargs['overwrite_existing_transaction_set_control_number'] - self.group_header_date_format = kwargs['group_header_date_format'] - self.group_header_time_format = kwargs['group_header_time_format'] - self.usage_indicator = kwargs['usage_indicator'] - - -class X12FramingSettings(msrest.serialization.Model): - """The X12 agreement framing settings. - - All required parameters must be populated in order to send to Azure. - - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param replace_separators_in_payload: Required. The value indicating whether to replace - separators in payload. - :type replace_separators_in_payload: bool - :param replace_character: Required. The replacement character. - :type replace_character: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param character_set: Required. The X12 character set. Possible values include: "NotSpecified", - "Basic", "Extended", "UTF8". - :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet - :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values - include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - """ - - _validation = { - 'data_element_separator': {'required': True}, - 'component_separator': {'required': True}, - 'replace_separators_in_payload': {'required': True}, - 'replace_character': {'required': True}, - 'segment_terminator': {'required': True}, - 'character_set': {'required': True}, - 'segment_terminator_suffix': {'required': True}, - } - - _attribute_map = { - 'data_element_separator': {'key': 'dataElementSeparator', 'type': 'int'}, - 'component_separator': {'key': 'componentSeparator', 'type': 'int'}, - 'replace_separators_in_payload': {'key': 'replaceSeparatorsInPayload', 'type': 'bool'}, - 'replace_character': {'key': 'replaceCharacter', 'type': 'int'}, - 'segment_terminator': {'key': 'segmentTerminator', 'type': 'int'}, - 'character_set': {'key': 'characterSet', 'type': 'str'}, - 'segment_terminator_suffix': {'key': 'segmentTerminatorSuffix', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12FramingSettings, self).__init__(**kwargs) - self.data_element_separator = kwargs['data_element_separator'] - self.component_separator = kwargs['component_separator'] - self.replace_separators_in_payload = kwargs['replace_separators_in_payload'] - self.replace_character = kwargs['replace_character'] - self.segment_terminator = kwargs['segment_terminator'] - self.character_set = kwargs['character_set'] - self.segment_terminator_suffix = kwargs['segment_terminator_suffix'] - - -class X12MessageFilter(msrest.serialization.Model): - """The X12 message filter for odata query. - - All required parameters must be populated in order to send to Azure. - - :param message_filter_type: Required. The message filter type. Possible values include: - "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType - """ - - _validation = { - 'message_filter_type': {'required': True}, - } - - _attribute_map = { - 'message_filter_type': {'key': 'messageFilterType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12MessageFilter, self).__init__(**kwargs) - self.message_filter_type = kwargs['message_filter_type'] - - -class X12MessageIdentifier(msrest.serialization.Model): - """The X12 message identifier. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - """ - - _validation = { - 'message_id': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12MessageIdentifier, self).__init__(**kwargs) - self.message_id = kwargs['message_id'] - - -class X12OneWayAgreement(msrest.serialization.Model): - """The X12 one-way agreement. - - All required parameters must be populated in order to send to Azure. - - :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The X12 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings - """ - - _validation = { - 'sender_business_identity': {'required': True}, - 'receiver_business_identity': {'required': True}, - 'protocol_settings': {'required': True}, - } - - _attribute_map = { - 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, - 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'X12ProtocolSettings'}, - } - - def __init__( - self, - **kwargs - ): - super(X12OneWayAgreement, self).__init__(**kwargs) - self.sender_business_identity = kwargs['sender_business_identity'] - self.receiver_business_identity = kwargs['receiver_business_identity'] - self.protocol_settings = kwargs['protocol_settings'] - - -class X12ProcessingSettings(msrest.serialization.Model): - """The X12 processing settings. - - All required parameters must be populated in order to send to Azure. - - :param mask_security_info: Required. The value indicating whether to mask security information. - :type mask_security_info: bool - :param convert_implied_decimal: Required. The value indicating whether to convert numerical - type to implied decimal. - :type convert_implied_decimal: bool - :param preserve_interchange: Required. The value indicating whether to preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating whether to suspend - interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to - create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating whether to use dot as - decimal separator. - :type use_dot_as_decimal_separator: bool - """ - - _validation = { - 'mask_security_info': {'required': True}, - 'convert_implied_decimal': {'required': True}, - 'preserve_interchange': {'required': True}, - 'suspend_interchange_on_error': {'required': True}, - 'create_empty_xml_tags_for_trailing_separators': {'required': True}, - 'use_dot_as_decimal_separator': {'required': True}, - } - - _attribute_map = { - 'mask_security_info': {'key': 'maskSecurityInfo', 'type': 'bool'}, - 'convert_implied_decimal': {'key': 'convertImpliedDecimal', 'type': 'bool'}, - 'preserve_interchange': {'key': 'preserveInterchange', 'type': 'bool'}, - 'suspend_interchange_on_error': {'key': 'suspendInterchangeOnError', 'type': 'bool'}, - 'create_empty_xml_tags_for_trailing_separators': {'key': 'createEmptyXmlTagsForTrailingSeparators', 'type': 'bool'}, - 'use_dot_as_decimal_separator': {'key': 'useDotAsDecimalSeparator', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(X12ProcessingSettings, self).__init__(**kwargs) - self.mask_security_info = kwargs['mask_security_info'] - self.convert_implied_decimal = kwargs['convert_implied_decimal'] - self.preserve_interchange = kwargs['preserve_interchange'] - self.suspend_interchange_on_error = kwargs['suspend_interchange_on_error'] - self.create_empty_xml_tags_for_trailing_separators = kwargs['create_empty_xml_tags_for_trailing_separators'] - self.use_dot_as_decimal_separator = kwargs['use_dot_as_decimal_separator'] - - -class X12ProtocolSettings(msrest.serialization.Model): - """The X12 agreement protocol settings. - - All required parameters must be populated in order to send to Azure. - - :param validation_settings: Required. The X12 validation settings. - :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings - :param framing_settings: Required. The X12 framing settings. - :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings - :param envelope_settings: Required. The X12 envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings - :param acknowledgement_settings: Required. The X12 acknowledgment settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings - :param message_filter: Required. The X12 message filter. - :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter - :param security_settings: Required. The X12 security settings. - :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings - :param processing_settings: Required. The X12 processing settings. - :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings - :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] - :param validation_overrides: The X12 validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] - :param message_filter_list: The X12 message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] - :param schema_references: Required. The X12 schema references. - :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] - :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] - """ - - _validation = { - 'validation_settings': {'required': True}, - 'framing_settings': {'required': True}, - 'envelope_settings': {'required': True}, - 'acknowledgement_settings': {'required': True}, - 'message_filter': {'required': True}, - 'security_settings': {'required': True}, - 'processing_settings': {'required': True}, - 'schema_references': {'required': True}, - } - - _attribute_map = { - 'validation_settings': {'key': 'validationSettings', 'type': 'X12ValidationSettings'}, - 'framing_settings': {'key': 'framingSettings', 'type': 'X12FramingSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'X12EnvelopeSettings'}, - 'acknowledgement_settings': {'key': 'acknowledgementSettings', 'type': 'X12AcknowledgementSettings'}, - 'message_filter': {'key': 'messageFilter', 'type': 'X12MessageFilter'}, - 'security_settings': {'key': 'securitySettings', 'type': 'X12SecuritySettings'}, - 'processing_settings': {'key': 'processingSettings', 'type': 'X12ProcessingSettings'}, - 'envelope_overrides': {'key': 'envelopeOverrides', 'type': '[X12EnvelopeOverride]'}, - 'validation_overrides': {'key': 'validationOverrides', 'type': '[X12ValidationOverride]'}, - 'message_filter_list': {'key': 'messageFilterList', 'type': '[X12MessageIdentifier]'}, - 'schema_references': {'key': 'schemaReferences', 'type': '[X12SchemaReference]'}, - 'x12_delimiter_overrides': {'key': 'x12DelimiterOverrides', 'type': '[X12DelimiterOverrides]'}, - } - - def __init__( - self, - **kwargs - ): - super(X12ProtocolSettings, self).__init__(**kwargs) - self.validation_settings = kwargs['validation_settings'] - self.framing_settings = kwargs['framing_settings'] - self.envelope_settings = kwargs['envelope_settings'] - self.acknowledgement_settings = kwargs['acknowledgement_settings'] - self.message_filter = kwargs['message_filter'] - self.security_settings = kwargs['security_settings'] - self.processing_settings = kwargs['processing_settings'] - self.envelope_overrides = kwargs.get('envelope_overrides', None) - self.validation_overrides = kwargs.get('validation_overrides', None) - self.message_filter_list = kwargs.get('message_filter_list', None) - self.schema_references = kwargs['schema_references'] - self.x12_delimiter_overrides = kwargs.get('x12_delimiter_overrides', None) - - -class X12SchemaReference(msrest.serialization.Model): - """The X12 schema reference. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id. - :type message_id: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param schema_version: Required. The schema version. - :type schema_version: str - :param schema_name: Required. The schema name. - :type schema_name: str - """ - - _validation = { - 'message_id': {'required': True}, - 'schema_version': {'required': True}, - 'schema_name': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'sender_application_id': {'key': 'senderApplicationId', 'type': 'str'}, - 'schema_version': {'key': 'schemaVersion', 'type': 'str'}, - 'schema_name': {'key': 'schemaName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12SchemaReference, self).__init__(**kwargs) - self.message_id = kwargs['message_id'] - self.sender_application_id = kwargs.get('sender_application_id', None) - self.schema_version = kwargs['schema_version'] - self.schema_name = kwargs['schema_name'] - - -class X12SecuritySettings(msrest.serialization.Model): - """The X12 agreement security settings. - - All required parameters must be populated in order to send to Azure. - - :param authorization_qualifier: Required. The authorization qualifier. - :type authorization_qualifier: str - :param authorization_value: The authorization value. - :type authorization_value: str - :param security_qualifier: Required. The security qualifier. - :type security_qualifier: str - :param password_value: The password value. - :type password_value: str - """ - - _validation = { - 'authorization_qualifier': {'required': True}, - 'security_qualifier': {'required': True}, - } - - _attribute_map = { - 'authorization_qualifier': {'key': 'authorizationQualifier', 'type': 'str'}, - 'authorization_value': {'key': 'authorizationValue', 'type': 'str'}, - 'security_qualifier': {'key': 'securityQualifier', 'type': 'str'}, - 'password_value': {'key': 'passwordValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12SecuritySettings, self).__init__(**kwargs) - self.authorization_qualifier = kwargs['authorization_qualifier'] - self.authorization_value = kwargs.get('authorization_value', None) - self.security_qualifier = kwargs['security_qualifier'] - self.password_value = kwargs.get('password_value', None) - - -class X12ValidationOverride(msrest.serialization.Model): - """The X12 validation override settings. - - All required parameters must be populated in order to send to Azure. - - :param message_id: Required. The message id on which the validation settings has to be applied. - :type message_id: str - :param validate_edi_types: Required. The value indicating whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param validate_character_set: Required. The value indicating whether to validate character - Set. - :type validate_character_set: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'message_id': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'validate_character_set': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'message_id': {'key': 'messageId', 'type': 'str'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12ValidationOverride, self).__init__(**kwargs) - self.message_id = kwargs['message_id'] - self.validate_edi_types = kwargs['validate_edi_types'] - self.validate_xsd_types = kwargs['validate_xsd_types'] - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs['allow_leading_and_trailing_spaces_and_zeroes'] - self.validate_character_set = kwargs['validate_character_set'] - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs['trim_leading_and_trailing_spaces_and_zeroes'] - self.trailing_separator_policy = kwargs['trailing_separator_policy'] - - -class X12ValidationSettings(msrest.serialization.Model): - """The X12 agreement validation settings. - - All required parameters must be populated in order to send to Azure. - - :param validate_character_set: Required. The value indicating whether to validate character set - in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value indicating whether to - check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity period of interchange - control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value indicating whether to check - for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value indicating whether - to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to Whether to validate EDI - types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to Whether to validate XSD - types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to - trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values - include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - """ - - _validation = { - 'validate_character_set': {'required': True}, - 'check_duplicate_interchange_control_number': {'required': True}, - 'interchange_control_number_validity_days': {'required': True}, - 'check_duplicate_group_control_number': {'required': True}, - 'check_duplicate_transaction_set_control_number': {'required': True}, - 'validate_edi_types': {'required': True}, - 'validate_xsd_types': {'required': True}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'required': True}, - 'trailing_separator_policy': {'required': True}, - } - - _attribute_map = { - 'validate_character_set': {'key': 'validateCharacterSet', 'type': 'bool'}, - 'check_duplicate_interchange_control_number': {'key': 'checkDuplicateInterchangeControlNumber', 'type': 'bool'}, - 'interchange_control_number_validity_days': {'key': 'interchangeControlNumberValidityDays', 'type': 'int'}, - 'check_duplicate_group_control_number': {'key': 'checkDuplicateGroupControlNumber', 'type': 'bool'}, - 'check_duplicate_transaction_set_control_number': {'key': 'checkDuplicateTransactionSetControlNumber', 'type': 'bool'}, - 'validate_edi_types': {'key': 'validateEDITypes', 'type': 'bool'}, - 'validate_xsd_types': {'key': 'validateXSDTypes', 'type': 'bool'}, - 'allow_leading_and_trailing_spaces_and_zeroes': {'key': 'allowLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trim_leading_and_trailing_spaces_and_zeroes': {'key': 'trimLeadingAndTrailingSpacesAndZeroes', 'type': 'bool'}, - 'trailing_separator_policy': {'key': 'trailingSeparatorPolicy', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(X12ValidationSettings, self).__init__(**kwargs) - self.validate_character_set = kwargs['validate_character_set'] - self.check_duplicate_interchange_control_number = kwargs['check_duplicate_interchange_control_number'] - self.interchange_control_number_validity_days = kwargs['interchange_control_number_validity_days'] - self.check_duplicate_group_control_number = kwargs['check_duplicate_group_control_number'] - self.check_duplicate_transaction_set_control_number = kwargs['check_duplicate_transaction_set_control_number'] - self.validate_edi_types = kwargs['validate_edi_types'] - self.validate_xsd_types = kwargs['validate_xsd_types'] - self.allow_leading_and_trailing_spaces_and_zeroes = kwargs['allow_leading_and_trailing_spaces_and_zeroes'] - self.trim_leading_and_trailing_spaces_and_zeroes = kwargs['trim_leading_and_trailing_spaces_and_zeroes'] - self.trailing_separator_policy = kwargs['trailing_separator_policy'] diff --git a/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py b/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py index 7ccdd61abf5..05491a1ea3d 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py +++ b/src/logic/azext_logic/vendored_sdks/logic/models/_models_py3.py @@ -7,25 +7,27 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._logic_management_client_enums import * + class AgreementContent(msrest.serialization.Model): """The integration account agreement content. - :param a_s2: The AS2 agreement content. - :type a_s2: ~azure.mgmt.logic.models.As2AgreementContent - :param x12: The X12 agreement content. - :type x12: ~azure.mgmt.logic.models.X12AgreementContent - :param edifact: The EDIFACT agreement content. - :type edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + :ivar a_s2: The AS2 agreement content. + :vartype a_s2: ~azure.mgmt.logic.models.AS2AgreementContent + :ivar x12: The X12 agreement content. + :vartype x12: ~azure.mgmt.logic.models.X12AgreementContent + :ivar edifact: The EDIFACT agreement content. + :vartype edifact: ~azure.mgmt.logic.models.EdifactAgreementContent """ _attribute_map = { - 'a_s2': {'key': 'aS2', 'type': 'As2AgreementContent'}, + 'a_s2': {'key': 'aS2', 'type': 'AS2AgreementContent'}, 'x12': {'key': 'x12', 'type': 'X12AgreementContent'}, 'edifact': {'key': 'edifact', 'type': 'EdifactAgreementContent'}, } @@ -33,11 +35,19 @@ class AgreementContent(msrest.serialization.Model): def __init__( self, *, - a_s2: Optional["As2AgreementContent"] = None, + a_s2: Optional["AS2AgreementContent"] = None, x12: Optional["X12AgreementContent"] = None, edifact: Optional["EdifactAgreementContent"] = None, **kwargs ): + """ + :keyword a_s2: The AS2 agreement content. + :paramtype a_s2: ~azure.mgmt.logic.models.AS2AgreementContent + :keyword x12: The X12 agreement content. + :paramtype x12: ~azure.mgmt.logic.models.X12AgreementContent + :keyword edifact: The EDIFACT agreement content. + :paramtype edifact: ~azure.mgmt.logic.models.EdifactAgreementContent + """ super(AgreementContent, self).__init__(**kwargs) self.a_s2 = a_s2 self.x12 = x12 @@ -47,17 +57,17 @@ def __init__( class ApiDeploymentParameterMetadata(msrest.serialization.Model): """The API deployment parameter metadata. - :param type: The type. - :type type: str - :param is_required: Indicates whether its required. - :type is_required: bool - :param display_name: The display name. - :type display_name: str - :param description: The description. - :type description: str - :param visibility: The visibility. Possible values include: "NotSpecified", "Default", + :ivar type: The type. + :vartype type: str + :ivar is_required: Indicates whether its required. + :vartype is_required: bool + :ivar display_name: The display name. + :vartype display_name: str + :ivar description: The description. + :vartype description: str + :ivar visibility: The visibility. Possible values include: "NotSpecified", "Default", "Internal". - :type visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility + :vartype visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility """ _attribute_map = { @@ -78,6 +88,19 @@ def __init__( visibility: Optional[Union[str, "ApiDeploymentParameterVisibility"]] = None, **kwargs ): + """ + :keyword type: The type. + :paramtype type: str + :keyword is_required: Indicates whether its required. + :paramtype is_required: bool + :keyword display_name: The display name. + :paramtype display_name: str + :keyword description: The description. + :paramtype description: str + :keyword visibility: The visibility. Possible values include: "NotSpecified", "Default", + "Internal". + :paramtype visibility: str or ~azure.mgmt.logic.models.ApiDeploymentParameterVisibility + """ super(ApiDeploymentParameterMetadata, self).__init__(**kwargs) self.type = type self.is_required = is_required @@ -89,10 +112,10 @@ def __init__( class ApiDeploymentParameterMetadataSet(msrest.serialization.Model): """The API deployment parameters metadata. - :param package_content_link: The package content link parameter. - :type package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata - :param redis_cache_connection_string: The package content link parameter. - :type redis_cache_connection_string: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + :ivar package_content_link: The package content link parameter. + :vartype package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + :ivar redis_cache_connection_string: The package content link parameter. + :vartype redis_cache_connection_string: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata """ _attribute_map = { @@ -107,6 +130,13 @@ def __init__( redis_cache_connection_string: Optional["ApiDeploymentParameterMetadata"] = None, **kwargs ): + """ + :keyword package_content_link: The package content link parameter. + :paramtype package_content_link: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + :keyword redis_cache_connection_string: The package content link parameter. + :paramtype redis_cache_connection_string: + ~azure.mgmt.logic.models.ApiDeploymentParameterMetadata + """ super(ApiDeploymentParameterMetadataSet, self).__init__(**kwargs) self.package_content_link = package_content_link self.redis_cache_connection_string = redis_cache_connection_string @@ -123,10 +153,10 @@ class Resource(msrest.serialization.Model): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] """ _validation = { @@ -150,6 +180,12 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + """ super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -169,12 +205,12 @@ class ApiOperation(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The api operations properties. - :type properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar properties: The api operations properties. + :vartype properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition """ _validation = { @@ -200,6 +236,14 @@ def __init__( properties: Optional["ApiOperationPropertiesDefinition"] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword properties: The api operations properties. + :paramtype properties: ~azure.mgmt.logic.models.ApiOperationPropertiesDefinition + """ super(ApiOperation, self).__init__(location=location, tags=tags, **kwargs) self.properties = properties @@ -207,13 +251,13 @@ def __init__( class ApiOperationAnnotation(msrest.serialization.Model): """The Api Operation Annotation. - :param status: The status annotation. Possible values include: "NotSpecified", "Preview", + :ivar status: The status annotation. Possible values include: "NotSpecified", "Preview", "Production". - :type status: str or ~azure.mgmt.logic.models.StatusAnnotation - :param family: The family. - :type family: str - :param revision: The revision. - :type revision: int + :vartype status: str or ~azure.mgmt.logic.models.StatusAnnotation + :ivar family: The family. + :vartype family: str + :ivar revision: The revision. + :vartype revision: int """ _attribute_map = { @@ -230,6 +274,15 @@ def __init__( revision: Optional[int] = None, **kwargs ): + """ + :keyword status: The status annotation. Possible values include: "NotSpecified", "Preview", + "Production". + :paramtype status: str or ~azure.mgmt.logic.models.StatusAnnotation + :keyword family: The family. + :paramtype family: str + :keyword revision: The revision. + :paramtype revision: int + """ super(ApiOperationAnnotation, self).__init__(**kwargs) self.status = status self.family = family @@ -239,10 +292,10 @@ def __init__( class ApiOperationListResult(msrest.serialization.Model): """The list of managed API operations. - :param value: The api operation definitions for an API. - :type value: list[~azure.mgmt.logic.models.ApiOperation] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The api operation definitions for an API. + :vartype value: list[~azure.mgmt.logic.models.ApiOperation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -257,6 +310,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The api operation definitions for an API. + :paramtype value: list[~azure.mgmt.logic.models.ApiOperation] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(ApiOperationListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -265,30 +324,30 @@ def __init__( class ApiOperationPropertiesDefinition(msrest.serialization.Model): """The api operations properties. - :param summary: The summary of the api operation. - :type summary: str - :param description: The description of the api operation. - :type description: str - :param visibility: The visibility of the api operation. - :type visibility: str - :param trigger: The trigger type of api operation. - :type trigger: str - :param trigger_hint: The trigger hint for the api operation. - :type trigger_hint: str - :param pageable: Indicates whether the api operation is pageable. - :type pageable: bool - :param annotation: The annotation of api operation. - :type annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation - :param api: The api reference. - :type api: ~azure.mgmt.logic.models.ApiReference - :param inputs_definition: The operation inputs definition schema. - :type inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema - :param responses_definition: The operation responses definition schemas. - :type responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :param is_webhook: Indicates whether the API operation is webhook or not. - :type is_webhook: bool - :param is_notification: Indicates whether the API operation is notification or not. - :type is_notification: bool + :ivar summary: The summary of the api operation. + :vartype summary: str + :ivar description: The description of the api operation. + :vartype description: str + :ivar visibility: The visibility of the api operation. + :vartype visibility: str + :ivar trigger: The trigger type of api operation. + :vartype trigger: str + :ivar trigger_hint: The trigger hint for the api operation. + :vartype trigger_hint: str + :ivar pageable: Indicates whether the api operation is pageable. + :vartype pageable: bool + :ivar annotation: The annotation of api operation. + :vartype annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation + :ivar api: The api reference. + :vartype api: ~azure.mgmt.logic.models.ApiReference + :ivar inputs_definition: The operation inputs definition schema. + :vartype inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema + :ivar responses_definition: The operation responses definition schemas. + :vartype responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :ivar is_webhook: Indicates whether the API operation is webhook or not. + :vartype is_webhook: bool + :ivar is_notification: Indicates whether the API operation is notification or not. + :vartype is_notification: bool """ _attribute_map = { @@ -323,6 +382,32 @@ def __init__( is_notification: Optional[bool] = None, **kwargs ): + """ + :keyword summary: The summary of the api operation. + :paramtype summary: str + :keyword description: The description of the api operation. + :paramtype description: str + :keyword visibility: The visibility of the api operation. + :paramtype visibility: str + :keyword trigger: The trigger type of api operation. + :paramtype trigger: str + :keyword trigger_hint: The trigger hint for the api operation. + :paramtype trigger_hint: str + :keyword pageable: Indicates whether the api operation is pageable. + :paramtype pageable: bool + :keyword annotation: The annotation of api operation. + :paramtype annotation: ~azure.mgmt.logic.models.ApiOperationAnnotation + :keyword api: The api reference. + :paramtype api: ~azure.mgmt.logic.models.ApiReference + :keyword inputs_definition: The operation inputs definition schema. + :paramtype inputs_definition: ~azure.mgmt.logic.models.SwaggerSchema + :keyword responses_definition: The operation responses definition schemas. + :paramtype responses_definition: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :keyword is_webhook: Indicates whether the API operation is webhook or not. + :paramtype is_webhook: bool + :keyword is_notification: Indicates whether the API operation is notification or not. + :paramtype is_notification: bool + """ super(ApiOperationPropertiesDefinition, self).__init__(**kwargs) self.summary = summary self.description = description @@ -343,8 +428,8 @@ class ResourceReference(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param id: The resource id. - :type id: str + :ivar id: The resource id. + :vartype id: str :ivar name: Gets the resource name. :vartype name: str :ivar type: Gets the resource type. @@ -368,6 +453,10 @@ def __init__( id: Optional[str] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + """ super(ResourceReference, self).__init__(**kwargs) self.id = id self.name = None @@ -379,27 +468,27 @@ class ApiReference(ResourceReference): Variables are only populated by the server, and will be ignored when sending a request. - :param id: The resource id. - :type id: str + :ivar id: The resource id. + :vartype id: str :ivar name: Gets the resource name. :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param display_name: The display name of the api. - :type display_name: str - :param description: The description of the api. - :type description: str - :param icon_uri: The icon uri of the api. - :type icon_uri: str - :param swagger: The swagger of the api. - :type swagger: object - :param brand_color: The brand color of the api. - :type brand_color: str - :param category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", + :ivar display_name: The display name of the api. + :vartype display_name: str + :ivar description: The description of the api. + :vartype description: str + :ivar icon_uri: The icon uri of the api. + :vartype icon_uri: str + :ivar swagger: The swagger of the api. + :vartype swagger: any + :ivar brand_color: The brand color of the api. + :vartype brand_color: str + :ivar category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier - :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :vartype category: str or ~azure.mgmt.logic.models.ApiTier + :ivar integration_service_environment: The integration service environment reference. + :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference """ _validation = { @@ -427,12 +516,31 @@ def __init__( display_name: Optional[str] = None, description: Optional[str] = None, icon_uri: Optional[str] = None, - swagger: Optional[object] = None, + swagger: Optional[Any] = None, brand_color: Optional[str] = None, category: Optional[Union[str, "ApiTier"]] = None, integration_service_environment: Optional["ResourceReference"] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + :keyword display_name: The display name of the api. + :paramtype display_name: str + :keyword description: The description of the api. + :paramtype description: str + :keyword icon_uri: The icon uri of the api. + :paramtype icon_uri: str + :keyword swagger: The swagger of the api. + :paramtype swagger: any + :keyword brand_color: The brand color of the api. + :paramtype brand_color: str + :keyword category: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", + "Premium". + :paramtype category: str or ~azure.mgmt.logic.models.ApiTier + :keyword integration_service_environment: The integration service environment reference. + :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + """ super(ApiReference, self).__init__(id=id, **kwargs) self.display_name = display_name self.description = description @@ -446,8 +554,8 @@ def __init__( class ApiResourceBackendService(msrest.serialization.Model): """The API backend service. - :param service_url: The service URL. - :type service_url: str + :ivar service_url: The service URL. + :vartype service_url: str """ _attribute_map = { @@ -460,6 +568,10 @@ def __init__( service_url: Optional[str] = None, **kwargs ): + """ + :keyword service_url: The service URL. + :paramtype service_url: str + """ super(ApiResourceBackendService, self).__init__(**kwargs) self.service_url = service_url @@ -467,10 +579,10 @@ def __init__( class ApiResourceDefinitions(msrest.serialization.Model): """The Api resource definition. - :param original_swagger_url: The original swagger url. - :type original_swagger_url: str - :param modified_swagger_url: The modified swagger url. - :type modified_swagger_url: str + :ivar original_swagger_url: The original swagger url. + :vartype original_swagger_url: str + :ivar modified_swagger_url: The modified swagger url. + :vartype modified_swagger_url: str """ _attribute_map = { @@ -485,6 +597,12 @@ def __init__( modified_swagger_url: Optional[str] = None, **kwargs ): + """ + :keyword original_swagger_url: The original swagger url. + :paramtype original_swagger_url: str + :keyword modified_swagger_url: The modified swagger url. + :paramtype modified_swagger_url: str + """ super(ApiResourceDefinitions, self).__init__(**kwargs) self.original_swagger_url = original_swagger_url self.modified_swagger_url = modified_swagger_url @@ -493,19 +611,19 @@ def __init__( class ApiResourceGeneralInformation(msrest.serialization.Model): """The API general information. - :param icon_url: The icon url. - :type icon_url: str - :param display_name: The display name. - :type display_name: str - :param description: The description. - :type description: str - :param terms_of_use_url: The terms of use url. - :type terms_of_use_url: str - :param release_tag: The release tag. - :type release_tag: str - :param tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", + :ivar icon_url: The icon url. + :vartype icon_url: str + :ivar display_name: The display name. + :vartype display_name: str + :ivar description: The description. + :vartype description: str + :ivar terms_of_use_url: The terms of use url. + :vartype terms_of_use_url: str + :ivar release_tag: The release tag. + :vartype release_tag: str + :ivar tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type tier: str or ~azure.mgmt.logic.models.ApiTier + :vartype tier: str or ~azure.mgmt.logic.models.ApiTier """ _attribute_map = { @@ -528,6 +646,21 @@ def __init__( tier: Optional[Union[str, "ApiTier"]] = None, **kwargs ): + """ + :keyword icon_url: The icon url. + :paramtype icon_url: str + :keyword display_name: The display name. + :paramtype display_name: str + :keyword description: The description. + :paramtype description: str + :keyword terms_of_use_url: The terms of use url. + :paramtype terms_of_use_url: str + :keyword release_tag: The release tag. + :paramtype release_tag: str + :keyword tier: The tier. Possible values include: "NotSpecified", "Enterprise", "Standard", + "Premium". + :paramtype tier: str or ~azure.mgmt.logic.models.ApiTier + """ super(ApiResourceGeneralInformation, self).__init__(**kwargs) self.icon_url = icon_url self.display_name = display_name @@ -540,30 +673,30 @@ def __init__( class ApiResourceMetadata(msrest.serialization.Model): """The api resource metadata. - :param source: The source. - :type source: str - :param brand_color: The brand color. - :type brand_color: str - :param hide_key: The hide key. - :type hide_key: str - :param tags: A set of tags. The tags. - :type tags: dict[str, str] - :param api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". - :type api_type: str or ~azure.mgmt.logic.models.ApiType - :param wsdl_service: The WSDL service. - :type wsdl_service: ~azure.mgmt.logic.models.WsdlService - :param wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", + :ivar source: The source. + :vartype source: str + :ivar brand_color: The brand color. + :vartype brand_color: str + :ivar hide_key: The hide key. + :vartype hide_key: str + :ivar tags: A set of tags. The tags. + :vartype tags: dict[str, str] + :ivar api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". + :vartype api_type: str or ~azure.mgmt.logic.models.ApiType + :ivar wsdl_service: The WSDL service. + :vartype wsdl_service: ~azure.mgmt.logic.models.WsdlService + :ivar wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", "SoapToRest", "SoapPassThrough". - :type wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod - :param connection_type: The connection type. - :type connection_type: str - :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", + :vartype wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod + :ivar connection_type: The connection type. + :vartype connection_type: str + :ivar provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :param deployment_parameters: The connector deployment parameters metadata. - :type deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet + :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar deployment_parameters: The connector deployment parameters metadata. + :vartype deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet """ _attribute_map = { @@ -594,6 +727,32 @@ def __init__( deployment_parameters: Optional["ApiDeploymentParameterMetadataSet"] = None, **kwargs ): + """ + :keyword source: The source. + :paramtype source: str + :keyword brand_color: The brand color. + :paramtype brand_color: str + :keyword hide_key: The hide key. + :paramtype hide_key: str + :keyword tags: A set of tags. The tags. + :paramtype tags: dict[str, str] + :keyword api_type: The api type. Possible values include: "NotSpecified", "Rest", "Soap". + :paramtype api_type: str or ~azure.mgmt.logic.models.ApiType + :keyword wsdl_service: The WSDL service. + :paramtype wsdl_service: ~azure.mgmt.logic.models.WsdlService + :keyword wsdl_import_method: The WSDL import method. Possible values include: "NotSpecified", + "SoapToRest", "SoapPassThrough". + :paramtype wsdl_import_method: str or ~azure.mgmt.logic.models.WsdlImportMethod + :keyword connection_type: The connection type. + :paramtype connection_type: str + :keyword provisioning_state: The provisioning state. Possible values include: "NotSpecified", + "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", + "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", + "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". + :paramtype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :keyword deployment_parameters: The connector deployment parameters metadata. + :paramtype deployment_parameters: ~azure.mgmt.logic.models.ApiDeploymentParameterMetadataSet + """ super(ApiResourceMetadata, self).__init__(**kwargs) self.source = source self.brand_color = brand_color @@ -610,10 +769,10 @@ def __init__( class ApiResourcePolicies(msrest.serialization.Model): """The API resource policies. - :param content: The API level only policies XML as embedded content. - :type content: str - :param content_link: The content link to the policies. - :type content_link: str + :ivar content: The API level only policies XML as embedded content. + :vartype content: str + :ivar content_link: The content link to the policies. + :vartype content_link: str """ _attribute_map = { @@ -628,6 +787,12 @@ def __init__( content_link: Optional[str] = None, **kwargs ): + """ + :keyword content: The API level only policies XML as embedded content. + :paramtype content: str + :keyword content_link: The content link to the policies. + :paramtype content_link: str + """ super(ApiResourcePolicies, self).__init__(**kwargs) self.content = content self.content_link = content_link @@ -636,38 +801,55 @@ def __init__( class ApiResourceProperties(msrest.serialization.Model): """The API resource properties. - :param name: The name. - :type name: str - :param connection_parameters: The connection parameters. - :type connection_parameters: dict[str, object] - :param metadata: The metadata. - :type metadata: ~azure.mgmt.logic.models.ApiResourceMetadata - :param runtime_urls: The runtime urls. - :type runtime_urls: list[str] - :param general_information: The api general information. - :type general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation - :param capabilities: The capabilities. - :type capabilities: list[str] - :param backend_service: The backend service. - :type backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService - :param policies: The policies for the API. - :type policies: ~azure.mgmt.logic.models.ApiResourcePolicies - :param api_definition_url: The API definition. - :type api_definition_url: str - :param api_definitions: The api definitions. - :type api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions - :param integration_service_environment: The integration service environment reference. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name. + :vartype name: str + :ivar connection_parameters: The connection parameters. + :vartype connection_parameters: dict[str, any] + :ivar metadata: The metadata. + :vartype metadata: ~azure.mgmt.logic.models.ApiResourceMetadata + :ivar runtime_urls: The runtime urls. + :vartype runtime_urls: list[str] + :ivar general_information: The api general information. + :vartype general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation + :ivar capabilities: The capabilities. + :vartype capabilities: list[str] + :ivar backend_service: The backend service. + :vartype backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService + :ivar policies: The policies for the API. + :vartype policies: ~azure.mgmt.logic.models.ApiResourcePolicies + :ivar api_definition_url: The API definition. + :vartype api_definition_url: str + :ivar api_definitions: The api definitions. + :vartype api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions + :ivar integration_service_environment: The integration service environment reference. + :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :ivar provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :param category: The category. Possible values include: "NotSpecified", "Enterprise", + :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar category: The category. Possible values include: "NotSpecified", "Enterprise", "Standard", "Premium". - :type category: str or ~azure.mgmt.logic.models.ApiTier + :vartype category: str or ~azure.mgmt.logic.models.ApiTier """ + _validation = { + 'name': {'readonly': True}, + 'connection_parameters': {'readonly': True}, + 'metadata': {'readonly': True}, + 'runtime_urls': {'readonly': True}, + 'general_information': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'backend_service': {'readonly': True}, + 'policies': {'readonly': True}, + 'api_definition_url': {'readonly': True}, + 'api_definitions': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'category': {'readonly': True}, + } + _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'connection_parameters': {'key': 'connectionParameters', 'type': '{object}'}, @@ -687,46 +869,38 @@ class ApiResourceProperties(msrest.serialization.Model): def __init__( self, *, - name: Optional[str] = None, - connection_parameters: Optional[Dict[str, object]] = None, - metadata: Optional["ApiResourceMetadata"] = None, - runtime_urls: Optional[List[str]] = None, - general_information: Optional["ApiResourceGeneralInformation"] = None, - capabilities: Optional[List[str]] = None, - backend_service: Optional["ApiResourceBackendService"] = None, - policies: Optional["ApiResourcePolicies"] = None, - api_definition_url: Optional[str] = None, - api_definitions: Optional["ApiResourceDefinitions"] = None, integration_service_environment: Optional["ResourceReference"] = None, - provisioning_state: Optional[Union[str, "WorkflowProvisioningState"]] = None, - category: Optional[Union[str, "ApiTier"]] = None, **kwargs ): + """ + :keyword integration_service_environment: The integration service environment reference. + :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + """ super(ApiResourceProperties, self).__init__(**kwargs) - self.name = name - self.connection_parameters = connection_parameters - self.metadata = metadata - self.runtime_urls = runtime_urls - self.general_information = general_information - self.capabilities = capabilities - self.backend_service = backend_service - self.policies = policies - self.api_definition_url = api_definition_url - self.api_definitions = api_definitions + self.name = None + self.connection_parameters = None + self.metadata = None + self.runtime_urls = None + self.general_information = None + self.capabilities = None + self.backend_service = None + self.policies = None + self.api_definition_url = None + self.api_definitions = None self.integration_service_environment = integration_service_environment - self.provisioning_state = provisioning_state - self.category = category + self.provisioning_state = None + self.category = None class ArtifactProperties(msrest.serialization.Model): """The artifact properties definition. - :param created_time: The artifact creation time. - :type created_time: ~datetime.datetime - :param changed_time: The artifact changed time. - :type changed_time: ~datetime.datetime - :param metadata: Any object. - :type metadata: object + :ivar created_time: The artifact creation time. + :vartype created_time: ~datetime.datetime + :ivar changed_time: The artifact changed time. + :vartype changed_time: ~datetime.datetime + :ivar metadata: Anything. + :vartype metadata: any """ _attribute_map = { @@ -740,9 +914,17 @@ def __init__( *, created_time: Optional[datetime.datetime] = None, changed_time: Optional[datetime.datetime] = None, - metadata: Optional[object] = None, + metadata: Optional[Any] = None, **kwargs ): + """ + :keyword created_time: The artifact creation time. + :paramtype created_time: ~datetime.datetime + :keyword changed_time: The artifact changed time. + :paramtype changed_time: ~datetime.datetime + :keyword metadata: Anything. + :paramtype metadata: any + """ super(ArtifactProperties, self).__init__(**kwargs) self.created_time = created_time self.changed_time = changed_time @@ -752,18 +934,18 @@ def __init__( class ArtifactContentPropertiesDefinition(ArtifactProperties): """The artifact content properties definition. - :param created_time: The artifact creation time. - :type created_time: ~datetime.datetime - :param changed_time: The artifact changed time. - :type changed_time: ~datetime.datetime - :param metadata: Any object. - :type metadata: object - :param content: Any object. - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink + :ivar created_time: The artifact creation time. + :vartype created_time: ~datetime.datetime + :ivar changed_time: The artifact changed time. + :vartype changed_time: ~datetime.datetime + :ivar metadata: Anything. + :vartype metadata: any + :ivar content: Anything. + :vartype content: any + :ivar content_type: The content type. + :vartype content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink """ _attribute_map = { @@ -780,33 +962,47 @@ def __init__( *, created_time: Optional[datetime.datetime] = None, changed_time: Optional[datetime.datetime] = None, - metadata: Optional[object] = None, - content: Optional[object] = None, + metadata: Optional[Any] = None, + content: Optional[Any] = None, content_type: Optional[str] = None, content_link: Optional["ContentLink"] = None, **kwargs ): + """ + :keyword created_time: The artifact creation time. + :paramtype created_time: ~datetime.datetime + :keyword changed_time: The artifact changed time. + :paramtype changed_time: ~datetime.datetime + :keyword metadata: Anything. + :paramtype metadata: any + :keyword content: Anything. + :paramtype content: any + :keyword content_type: The content type. + :paramtype content_type: str + :keyword content_link: The content link. + :paramtype content_link: ~azure.mgmt.logic.models.ContentLink + """ super(ArtifactContentPropertiesDefinition, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) self.content = content self.content_type = content_type self.content_link = content_link -class As2AcknowledgementConnectionSettings(msrest.serialization.Model): +class AS2AcknowledgementConnectionSettings(msrest.serialization.Model): """The AS2 agreement acknowledgement connection settings. All required parameters must be populated in order to send to Azure. - :param ignore_certificate_name_mismatch: Required. Indicates whether to ignore mismatch in + :ivar ignore_certificate_name_mismatch: Required. Indicates whether to ignore mismatch in certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. Indicates whether to support HTTP status + :vartype ignore_certificate_name_mismatch: bool + :ivar support_http_status_code_continue: Required. Indicates whether to support HTTP status code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. Indicates whether to keep the connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. Indicates whether to unfold the HTTP headers. - :type unfold_http_headers: bool + :vartype support_http_status_code_continue: bool + :ivar keep_http_connection_alive: Required. Indicates whether to keep the connection alive. + :vartype keep_http_connection_alive: bool + :ivar unfold_http_headers: Required. Indicates whether to unfold the HTTP headers. + :vartype unfold_http_headers: bool """ _validation = { @@ -832,22 +1028,34 @@ def __init__( unfold_http_headers: bool, **kwargs ): - super(As2AcknowledgementConnectionSettings, self).__init__(**kwargs) + """ + :keyword ignore_certificate_name_mismatch: Required. Indicates whether to ignore mismatch in + certificate name. + :paramtype ignore_certificate_name_mismatch: bool + :keyword support_http_status_code_continue: Required. Indicates whether to support HTTP status + code 'CONTINUE'. + :paramtype support_http_status_code_continue: bool + :keyword keep_http_connection_alive: Required. Indicates whether to keep the connection alive. + :paramtype keep_http_connection_alive: bool + :keyword unfold_http_headers: Required. Indicates whether to unfold the HTTP headers. + :paramtype unfold_http_headers: bool + """ + super(AS2AcknowledgementConnectionSettings, self).__init__(**kwargs) self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch self.support_http_status_code_continue = support_http_status_code_continue self.keep_http_connection_alive = keep_http_connection_alive self.unfold_http_headers = unfold_http_headers -class As2AgreementContent(msrest.serialization.Model): +class AS2AgreementContent(msrest.serialization.Model): """The integration account AS2 agreement content. All required parameters must be populated in order to send to Azure. - :param receive_agreement: Required. The AS2 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement - :param send_agreement: Required. The AS2 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.As2OneWayAgreement + :ivar receive_agreement: Required. The AS2 one-way receive agreement. + :vartype receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :ivar send_agreement: Required. The AS2 one-way send agreement. + :vartype send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement """ _validation = { @@ -856,40 +1064,46 @@ class As2AgreementContent(msrest.serialization.Model): } _attribute_map = { - 'receive_agreement': {'key': 'receiveAgreement', 'type': 'As2OneWayAgreement'}, - 'send_agreement': {'key': 'sendAgreement', 'type': 'As2OneWayAgreement'}, + 'receive_agreement': {'key': 'receiveAgreement', 'type': 'AS2OneWayAgreement'}, + 'send_agreement': {'key': 'sendAgreement', 'type': 'AS2OneWayAgreement'}, } def __init__( self, *, - receive_agreement: "As2OneWayAgreement", - send_agreement: "As2OneWayAgreement", + receive_agreement: "AS2OneWayAgreement", + send_agreement: "AS2OneWayAgreement", **kwargs ): - super(As2AgreementContent, self).__init__(**kwargs) + """ + :keyword receive_agreement: Required. The AS2 one-way receive agreement. + :paramtype receive_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + :keyword send_agreement: Required. The AS2 one-way send agreement. + :paramtype send_agreement: ~azure.mgmt.logic.models.AS2OneWayAgreement + """ + super(AS2AgreementContent, self).__init__(**kwargs) self.receive_agreement = receive_agreement self.send_agreement = send_agreement -class As2EnvelopeSettings(msrest.serialization.Model): +class AS2EnvelopeSettings(msrest.serialization.Model): """The AS2 agreement envelope settings. All required parameters must be populated in order to send to Azure. - :param message_content_type: Required. The message content type. - :type message_content_type: str - :param transmit_file_name_in_mime_header: Required. The value indicating whether to transmit + :ivar message_content_type: Required. The message content type. + :vartype message_content_type: str + :ivar transmit_file_name_in_mime_header: Required. The value indicating whether to transmit file name in mime header. - :type transmit_file_name_in_mime_header: bool - :param file_name_template: Required. The template for file name. - :type file_name_template: str - :param suspend_message_on_file_name_generation_error: Required. The value indicating whether to + :vartype transmit_file_name_in_mime_header: bool + :ivar file_name_template: Required. The template for file name. + :vartype file_name_template: str + :ivar suspend_message_on_file_name_generation_error: Required. The value indicating whether to suspend message on file name generation error. - :type suspend_message_on_file_name_generation_error: bool - :param autogenerate_file_name: Required. The value indicating whether to auto generate file + :vartype suspend_message_on_file_name_generation_error: bool + :ivar autogenerate_file_name: Required. The value indicating whether to auto generate file name. - :type autogenerate_file_name: bool + :vartype autogenerate_file_name: bool """ _validation = { @@ -918,7 +1132,22 @@ def __init__( autogenerate_file_name: bool, **kwargs ): - super(As2EnvelopeSettings, self).__init__(**kwargs) + """ + :keyword message_content_type: Required. The message content type. + :paramtype message_content_type: str + :keyword transmit_file_name_in_mime_header: Required. The value indicating whether to transmit + file name in mime header. + :paramtype transmit_file_name_in_mime_header: bool + :keyword file_name_template: Required. The template for file name. + :paramtype file_name_template: str + :keyword suspend_message_on_file_name_generation_error: Required. The value indicating whether + to suspend message on file name generation error. + :paramtype suspend_message_on_file_name_generation_error: bool + :keyword autogenerate_file_name: Required. The value indicating whether to auto generate file + name. + :paramtype autogenerate_file_name: bool + """ + super(AS2EnvelopeSettings, self).__init__(**kwargs) self.message_content_type = message_content_type self.transmit_file_name_in_mime_header = transmit_file_name_in_mime_header self.file_name_template = file_name_template @@ -926,17 +1155,17 @@ def __init__( self.autogenerate_file_name = autogenerate_file_name -class As2ErrorSettings(msrest.serialization.Model): +class AS2ErrorSettings(msrest.serialization.Model): """The AS2 agreement error settings. All required parameters must be populated in order to send to Azure. - :param suspend_duplicate_message: Required. The value indicating whether to suspend duplicate + :ivar suspend_duplicate_message: Required. The value indicating whether to suspend duplicate message. - :type suspend_duplicate_message: bool - :param resend_if_mdn_not_received: Required. The value indicating whether to resend message If + :vartype suspend_duplicate_message: bool + :ivar resend_if_mdn_not_received: Required. The value indicating whether to resend message If MDN is not received. - :type resend_if_mdn_not_received: bool + :vartype resend_if_mdn_not_received: bool """ _validation = { @@ -956,38 +1185,46 @@ def __init__( resend_if_mdn_not_received: bool, **kwargs ): - super(As2ErrorSettings, self).__init__(**kwargs) + """ + :keyword suspend_duplicate_message: Required. The value indicating whether to suspend duplicate + message. + :paramtype suspend_duplicate_message: bool + :keyword resend_if_mdn_not_received: Required. The value indicating whether to resend message + If MDN is not received. + :paramtype resend_if_mdn_not_received: bool + """ + super(AS2ErrorSettings, self).__init__(**kwargs) self.suspend_duplicate_message = suspend_duplicate_message self.resend_if_mdn_not_received = resend_if_mdn_not_received -class As2MdnSettings(msrest.serialization.Model): +class AS2MdnSettings(msrest.serialization.Model): """The AS2 agreement mdn settings. All required parameters must be populated in order to send to Azure. - :param need_mdn: Required. The value indicating whether to send or request a MDN. - :type need_mdn: bool - :param sign_mdn: Required. The value indicating whether the MDN needs to be signed or not. - :type sign_mdn: bool - :param send_mdn_asynchronously: Required. The value indicating whether to send the asynchronous + :ivar need_mdn: Required. The value indicating whether to send or request a MDN. + :vartype need_mdn: bool + :ivar sign_mdn: Required. The value indicating whether the MDN needs to be signed or not. + :vartype sign_mdn: bool + :ivar send_mdn_asynchronously: Required. The value indicating whether to send the asynchronous MDN. - :type send_mdn_asynchronously: bool - :param receipt_delivery_url: The receipt delivery URL. - :type receipt_delivery_url: str - :param disposition_notification_to: The disposition notification to header value. - :type disposition_notification_to: str - :param sign_outbound_mdn_if_optional: Required. The value indicating whether to sign the + :vartype send_mdn_asynchronously: bool + :ivar receipt_delivery_url: The receipt delivery URL. + :vartype receipt_delivery_url: str + :ivar disposition_notification_to: The disposition notification to header value. + :vartype disposition_notification_to: str + :ivar sign_outbound_mdn_if_optional: Required. The value indicating whether to sign the outbound MDN if optional. - :type sign_outbound_mdn_if_optional: bool - :param mdn_text: The MDN text. - :type mdn_text: str - :param send_inbound_mdn_to_message_box: Required. The value indicating whether to send inbound + :vartype sign_outbound_mdn_if_optional: bool + :ivar mdn_text: The MDN text. + :vartype mdn_text: str + :ivar send_inbound_mdn_to_message_box: Required. The value indicating whether to send inbound MDN to message box. - :type send_inbound_mdn_to_message_box: bool - :param mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values + :vartype send_inbound_mdn_to_message_box: bool + :ivar mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values include: "NotSpecified", "None", "MD5", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm + :vartype mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm """ _validation = { @@ -1025,7 +1262,31 @@ def __init__( mdn_text: Optional[str] = None, **kwargs ): - super(As2MdnSettings, self).__init__(**kwargs) + """ + :keyword need_mdn: Required. The value indicating whether to send or request a MDN. + :paramtype need_mdn: bool + :keyword sign_mdn: Required. The value indicating whether the MDN needs to be signed or not. + :paramtype sign_mdn: bool + :keyword send_mdn_asynchronously: Required. The value indicating whether to send the + asynchronous MDN. + :paramtype send_mdn_asynchronously: bool + :keyword receipt_delivery_url: The receipt delivery URL. + :paramtype receipt_delivery_url: str + :keyword disposition_notification_to: The disposition notification to header value. + :paramtype disposition_notification_to: str + :keyword sign_outbound_mdn_if_optional: Required. The value indicating whether to sign the + outbound MDN if optional. + :paramtype sign_outbound_mdn_if_optional: bool + :keyword mdn_text: The MDN text. + :paramtype mdn_text: str + :keyword send_inbound_mdn_to_message_box: Required. The value indicating whether to send + inbound MDN to message box. + :paramtype send_inbound_mdn_to_message_box: bool + :keyword mic_hashing_algorithm: Required. The signing or hashing algorithm. Possible values + include: "NotSpecified", "None", "MD5", "SHA1", "SHA2256", "SHA2384", "SHA2512". + :paramtype mic_hashing_algorithm: str or ~azure.mgmt.logic.models.HashingAlgorithm + """ + super(AS2MdnSettings, self).__init__(**kwargs) self.need_mdn = need_mdn self.sign_mdn = sign_mdn self.send_mdn_asynchronously = send_mdn_asynchronously @@ -1037,22 +1298,22 @@ def __init__( self.mic_hashing_algorithm = mic_hashing_algorithm -class As2MessageConnectionSettings(msrest.serialization.Model): +class AS2MessageConnectionSettings(msrest.serialization.Model): """The AS2 agreement message connection settings. All required parameters must be populated in order to send to Azure. - :param ignore_certificate_name_mismatch: Required. The value indicating whether to ignore + :ivar ignore_certificate_name_mismatch: Required. The value indicating whether to ignore mismatch in certificate name. - :type ignore_certificate_name_mismatch: bool - :param support_http_status_code_continue: Required. The value indicating whether to support - HTTP status code 'CONTINUE'. - :type support_http_status_code_continue: bool - :param keep_http_connection_alive: Required. The value indicating whether to keep the - connection alive. - :type keep_http_connection_alive: bool - :param unfold_http_headers: Required. The value indicating whether to unfold the HTTP headers. - :type unfold_http_headers: bool + :vartype ignore_certificate_name_mismatch: bool + :ivar support_http_status_code_continue: Required. The value indicating whether to support HTTP + status code 'CONTINUE'. + :vartype support_http_status_code_continue: bool + :ivar keep_http_connection_alive: Required. The value indicating whether to keep the connection + alive. + :vartype keep_http_connection_alive: bool + :ivar unfold_http_headers: Required. The value indicating whether to unfold the HTTP headers. + :vartype unfold_http_headers: bool """ _validation = { @@ -1078,24 +1339,38 @@ def __init__( unfold_http_headers: bool, **kwargs ): - super(As2MessageConnectionSettings, self).__init__(**kwargs) + """ + :keyword ignore_certificate_name_mismatch: Required. The value indicating whether to ignore + mismatch in certificate name. + :paramtype ignore_certificate_name_mismatch: bool + :keyword support_http_status_code_continue: Required. The value indicating whether to support + HTTP status code 'CONTINUE'. + :paramtype support_http_status_code_continue: bool + :keyword keep_http_connection_alive: Required. The value indicating whether to keep the + connection alive. + :paramtype keep_http_connection_alive: bool + :keyword unfold_http_headers: Required. The value indicating whether to unfold the HTTP + headers. + :paramtype unfold_http_headers: bool + """ + super(AS2MessageConnectionSettings, self).__init__(**kwargs) self.ignore_certificate_name_mismatch = ignore_certificate_name_mismatch self.support_http_status_code_continue = support_http_status_code_continue self.keep_http_connection_alive = keep_http_connection_alive self.unfold_http_headers = unfold_http_headers -class As2OneWayAgreement(msrest.serialization.Model): +class AS2OneWayAgreement(msrest.serialization.Model): """The integration account AS2 one-way agreement. All required parameters must be populated in order to send to Azure. - :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The AS2 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.As2ProtocolSettings + :ivar sender_business_identity: Required. The sender business identity. + :vartype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar receiver_business_identity: Required. The receiver business identity. + :vartype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar protocol_settings: Required. The AS2 protocol settings. + :vartype protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings """ _validation = { @@ -1107,7 +1382,7 @@ class As2OneWayAgreement(msrest.serialization.Model): _attribute_map = { 'sender_business_identity': {'key': 'senderBusinessIdentity', 'type': 'BusinessIdentity'}, 'receiver_business_identity': {'key': 'receiverBusinessIdentity', 'type': 'BusinessIdentity'}, - 'protocol_settings': {'key': 'protocolSettings', 'type': 'As2ProtocolSettings'}, + 'protocol_settings': {'key': 'protocolSettings', 'type': 'AS2ProtocolSettings'}, } def __init__( @@ -1115,35 +1390,43 @@ def __init__( *, sender_business_identity: "BusinessIdentity", receiver_business_identity: "BusinessIdentity", - protocol_settings: "As2ProtocolSettings", - **kwargs - ): - super(As2OneWayAgreement, self).__init__(**kwargs) + protocol_settings: "AS2ProtocolSettings", + **kwargs + ): + """ + :keyword sender_business_identity: Required. The sender business identity. + :paramtype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword receiver_business_identity: Required. The receiver business identity. + :paramtype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword protocol_settings: Required. The AS2 protocol settings. + :paramtype protocol_settings: ~azure.mgmt.logic.models.AS2ProtocolSettings + """ + super(AS2OneWayAgreement, self).__init__(**kwargs) self.sender_business_identity = sender_business_identity self.receiver_business_identity = receiver_business_identity self.protocol_settings = protocol_settings -class As2ProtocolSettings(msrest.serialization.Model): +class AS2ProtocolSettings(msrest.serialization.Model): """The AS2 agreement protocol settings. All required parameters must be populated in order to send to Azure. - :param message_connection_settings: Required. The message connection settings. - :type message_connection_settings: ~azure.mgmt.logic.models.As2MessageConnectionSettings - :param acknowledgement_connection_settings: Required. The acknowledgement connection settings. - :type acknowledgement_connection_settings: - ~azure.mgmt.logic.models.As2AcknowledgementConnectionSettings - :param mdn_settings: Required. The MDN settings. - :type mdn_settings: ~azure.mgmt.logic.models.As2MdnSettings - :param security_settings: Required. The security settings. - :type security_settings: ~azure.mgmt.logic.models.As2SecuritySettings - :param validation_settings: Required. The validation settings. - :type validation_settings: ~azure.mgmt.logic.models.As2ValidationSettings - :param envelope_settings: Required. The envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.As2EnvelopeSettings - :param error_settings: Required. The error settings. - :type error_settings: ~azure.mgmt.logic.models.As2ErrorSettings + :ivar message_connection_settings: Required. The message connection settings. + :vartype message_connection_settings: ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :ivar acknowledgement_connection_settings: Required. The acknowledgement connection settings. + :vartype acknowledgement_connection_settings: + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :ivar mdn_settings: Required. The MDN settings. + :vartype mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :ivar security_settings: Required. The security settings. + :vartype security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :ivar validation_settings: Required. The validation settings. + :vartype validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :ivar envelope_settings: Required. The envelope settings. + :vartype envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :ivar error_settings: Required. The error settings. + :vartype error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings """ _validation = { @@ -1157,28 +1440,46 @@ class As2ProtocolSettings(msrest.serialization.Model): } _attribute_map = { - 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'As2MessageConnectionSettings'}, - 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'As2AcknowledgementConnectionSettings'}, - 'mdn_settings': {'key': 'mdnSettings', 'type': 'As2MdnSettings'}, - 'security_settings': {'key': 'securitySettings', 'type': 'As2SecuritySettings'}, - 'validation_settings': {'key': 'validationSettings', 'type': 'As2ValidationSettings'}, - 'envelope_settings': {'key': 'envelopeSettings', 'type': 'As2EnvelopeSettings'}, - 'error_settings': {'key': 'errorSettings', 'type': 'As2ErrorSettings'}, + 'message_connection_settings': {'key': 'messageConnectionSettings', 'type': 'AS2MessageConnectionSettings'}, + 'acknowledgement_connection_settings': {'key': 'acknowledgementConnectionSettings', 'type': 'AS2AcknowledgementConnectionSettings'}, + 'mdn_settings': {'key': 'mdnSettings', 'type': 'AS2MdnSettings'}, + 'security_settings': {'key': 'securitySettings', 'type': 'AS2SecuritySettings'}, + 'validation_settings': {'key': 'validationSettings', 'type': 'AS2ValidationSettings'}, + 'envelope_settings': {'key': 'envelopeSettings', 'type': 'AS2EnvelopeSettings'}, + 'error_settings': {'key': 'errorSettings', 'type': 'AS2ErrorSettings'}, } def __init__( self, *, - message_connection_settings: "As2MessageConnectionSettings", - acknowledgement_connection_settings: "As2AcknowledgementConnectionSettings", - mdn_settings: "As2MdnSettings", - security_settings: "As2SecuritySettings", - validation_settings: "As2ValidationSettings", - envelope_settings: "As2EnvelopeSettings", - error_settings: "As2ErrorSettings", + message_connection_settings: "AS2MessageConnectionSettings", + acknowledgement_connection_settings: "AS2AcknowledgementConnectionSettings", + mdn_settings: "AS2MdnSettings", + security_settings: "AS2SecuritySettings", + validation_settings: "AS2ValidationSettings", + envelope_settings: "AS2EnvelopeSettings", + error_settings: "AS2ErrorSettings", **kwargs ): - super(As2ProtocolSettings, self).__init__(**kwargs) + """ + :keyword message_connection_settings: Required. The message connection settings. + :paramtype message_connection_settings: ~azure.mgmt.logic.models.AS2MessageConnectionSettings + :keyword acknowledgement_connection_settings: Required. The acknowledgement connection + settings. + :paramtype acknowledgement_connection_settings: + ~azure.mgmt.logic.models.AS2AcknowledgementConnectionSettings + :keyword mdn_settings: Required. The MDN settings. + :paramtype mdn_settings: ~azure.mgmt.logic.models.AS2MdnSettings + :keyword security_settings: Required. The security settings. + :paramtype security_settings: ~azure.mgmt.logic.models.AS2SecuritySettings + :keyword validation_settings: Required. The validation settings. + :paramtype validation_settings: ~azure.mgmt.logic.models.AS2ValidationSettings + :keyword envelope_settings: Required. The envelope settings. + :paramtype envelope_settings: ~azure.mgmt.logic.models.AS2EnvelopeSettings + :keyword error_settings: Required. The error settings. + :paramtype error_settings: ~azure.mgmt.logic.models.AS2ErrorSettings + """ + super(AS2ProtocolSettings, self).__init__(**kwargs) self.message_connection_settings = message_connection_settings self.acknowledgement_connection_settings = acknowledgement_connection_settings self.mdn_settings = mdn_settings @@ -1188,39 +1489,39 @@ def __init__( self.error_settings = error_settings -class As2SecuritySettings(msrest.serialization.Model): +class AS2SecuritySettings(msrest.serialization.Model): """The AS2 agreement security settings. All required parameters must be populated in order to send to Azure. - :param override_group_signing_certificate: Required. The value indicating whether to send or + :ivar override_group_signing_certificate: Required. The value indicating whether to send or request a MDN. - :type override_group_signing_certificate: bool - :param signing_certificate_name: The name of the signing certificate. - :type signing_certificate_name: str - :param encryption_certificate_name: The name of the encryption certificate. - :type encryption_certificate_name: str - :param enable_nrr_for_inbound_encoded_messages: Required. The value indicating whether to - enable NRR for inbound encoded messages. - :type enable_nrr_for_inbound_encoded_messages: bool - :param enable_nrr_for_inbound_decoded_messages: Required. The value indicating whether to - enable NRR for inbound decoded messages. - :type enable_nrr_for_inbound_decoded_messages: bool - :param enable_nrr_for_outbound_mdn: Required. The value indicating whether to enable NRR for + :vartype override_group_signing_certificate: bool + :ivar signing_certificate_name: The name of the signing certificate. + :vartype signing_certificate_name: str + :ivar encryption_certificate_name: The name of the encryption certificate. + :vartype encryption_certificate_name: str + :ivar enable_nrr_for_inbound_encoded_messages: Required. The value indicating whether to enable + NRR for inbound encoded messages. + :vartype enable_nrr_for_inbound_encoded_messages: bool + :ivar enable_nrr_for_inbound_decoded_messages: Required. The value indicating whether to enable + NRR for inbound decoded messages. + :vartype enable_nrr_for_inbound_decoded_messages: bool + :ivar enable_nrr_for_outbound_mdn: Required. The value indicating whether to enable NRR for outbound MDN. - :type enable_nrr_for_outbound_mdn: bool - :param enable_nrr_for_outbound_encoded_messages: Required. The value indicating whether to + :vartype enable_nrr_for_outbound_mdn: bool + :ivar enable_nrr_for_outbound_encoded_messages: Required. The value indicating whether to enable NRR for outbound encoded messages. - :type enable_nrr_for_outbound_encoded_messages: bool - :param enable_nrr_for_outbound_decoded_messages: Required. The value indicating whether to + :vartype enable_nrr_for_outbound_encoded_messages: bool + :ivar enable_nrr_for_outbound_decoded_messages: Required. The value indicating whether to enable NRR for outbound decoded messages. - :type enable_nrr_for_outbound_decoded_messages: bool - :param enable_nrr_for_inbound_mdn: Required. The value indicating whether to enable NRR for + :vartype enable_nrr_for_outbound_decoded_messages: bool + :ivar enable_nrr_for_inbound_mdn: Required. The value indicating whether to enable NRR for inbound MDN. - :type enable_nrr_for_inbound_mdn: bool - :param sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, + :vartype enable_nrr_for_inbound_mdn: bool + :ivar sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, ShaHyphenHashSize, Sha2UnderscoreHashSize. - :type sha2_algorithm_format: str + :vartype sha2_algorithm_format: str """ _validation = { @@ -1261,7 +1562,37 @@ def __init__( sha2_algorithm_format: Optional[str] = None, **kwargs ): - super(As2SecuritySettings, self).__init__(**kwargs) + """ + :keyword override_group_signing_certificate: Required. The value indicating whether to send or + request a MDN. + :paramtype override_group_signing_certificate: bool + :keyword signing_certificate_name: The name of the signing certificate. + :paramtype signing_certificate_name: str + :keyword encryption_certificate_name: The name of the encryption certificate. + :paramtype encryption_certificate_name: str + :keyword enable_nrr_for_inbound_encoded_messages: Required. The value indicating whether to + enable NRR for inbound encoded messages. + :paramtype enable_nrr_for_inbound_encoded_messages: bool + :keyword enable_nrr_for_inbound_decoded_messages: Required. The value indicating whether to + enable NRR for inbound decoded messages. + :paramtype enable_nrr_for_inbound_decoded_messages: bool + :keyword enable_nrr_for_outbound_mdn: Required. The value indicating whether to enable NRR for + outbound MDN. + :paramtype enable_nrr_for_outbound_mdn: bool + :keyword enable_nrr_for_outbound_encoded_messages: Required. The value indicating whether to + enable NRR for outbound encoded messages. + :paramtype enable_nrr_for_outbound_encoded_messages: bool + :keyword enable_nrr_for_outbound_decoded_messages: Required. The value indicating whether to + enable NRR for outbound decoded messages. + :paramtype enable_nrr_for_outbound_decoded_messages: bool + :keyword enable_nrr_for_inbound_mdn: Required. The value indicating whether to enable NRR for + inbound MDN. + :paramtype enable_nrr_for_inbound_mdn: bool + :keyword sha2_algorithm_format: The Sha2 algorithm format. Valid values are Sha2, ShaHashSize, + ShaHyphenHashSize, Sha2UnderscoreHashSize. + :paramtype sha2_algorithm_format: str + """ + super(AS2SecuritySettings, self).__init__(**kwargs) self.override_group_signing_certificate = override_group_signing_certificate self.signing_certificate_name = signing_certificate_name self.encryption_certificate_name = encryption_certificate_name @@ -1274,39 +1605,39 @@ def __init__( self.sha2_algorithm_format = sha2_algorithm_format -class As2ValidationSettings(msrest.serialization.Model): +class AS2ValidationSettings(msrest.serialization.Model): """The AS2 agreement validation settings. All required parameters must be populated in order to send to Azure. - :param override_message_properties: Required. The value indicating whether to override incoming + :ivar override_message_properties: Required. The value indicating whether to override incoming message properties with those in agreement. - :type override_message_properties: bool - :param encrypt_message: Required. The value indicating whether the message has to be encrypted. - :type encrypt_message: bool - :param sign_message: Required. The value indicating whether the message has to be signed. - :type sign_message: bool - :param compress_message: Required. The value indicating whether the message has to be + :vartype override_message_properties: bool + :ivar encrypt_message: Required. The value indicating whether the message has to be encrypted. + :vartype encrypt_message: bool + :ivar sign_message: Required. The value indicating whether the message has to be signed. + :vartype sign_message: bool + :ivar compress_message: Required. The value indicating whether the message has to be compressed. - :type compress_message: bool - :param check_duplicate_message: Required. The value indicating whether to check for duplicate + :vartype compress_message: bool + :ivar check_duplicate_message: Required. The value indicating whether to check for duplicate message. - :type check_duplicate_message: bool - :param interchange_duplicates_validity_days: Required. The number of days to look back for + :vartype check_duplicate_message: bool + :ivar interchange_duplicates_validity_days: Required. The number of days to look back for duplicate interchange. - :type interchange_duplicates_validity_days: int - :param check_certificate_revocation_list_on_send: Required. The value indicating whether to + :vartype interchange_duplicates_validity_days: int + :ivar check_certificate_revocation_list_on_send: Required. The value indicating whether to check for certificate revocation list on send. - :type check_certificate_revocation_list_on_send: bool - :param check_certificate_revocation_list_on_receive: Required. The value indicating whether to + :vartype check_certificate_revocation_list_on_send: bool + :ivar check_certificate_revocation_list_on_receive: Required. The value indicating whether to check for certificate revocation list on receive. - :type check_certificate_revocation_list_on_receive: bool - :param encryption_algorithm: Required. The encryption algorithm. Possible values include: + :vartype check_certificate_revocation_list_on_receive: bool + :ivar encryption_algorithm: Required. The encryption algorithm. Possible values include: "NotSpecified", "None", "DES3", "RC2", "AES128", "AES192", "AES256". - :type encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm - :param signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", + :vartype encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm + :ivar signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", "Default", "SHA1", "SHA2256", "SHA2384", "SHA2512". - :type signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + :vartype signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm """ _validation = { @@ -1349,7 +1680,38 @@ def __init__( signing_algorithm: Optional[Union[str, "SigningAlgorithm"]] = None, **kwargs ): - super(As2ValidationSettings, self).__init__(**kwargs) + """ + :keyword override_message_properties: Required. The value indicating whether to override + incoming message properties with those in agreement. + :paramtype override_message_properties: bool + :keyword encrypt_message: Required. The value indicating whether the message has to be + encrypted. + :paramtype encrypt_message: bool + :keyword sign_message: Required. The value indicating whether the message has to be signed. + :paramtype sign_message: bool + :keyword compress_message: Required. The value indicating whether the message has to be + compressed. + :paramtype compress_message: bool + :keyword check_duplicate_message: Required. The value indicating whether to check for duplicate + message. + :paramtype check_duplicate_message: bool + :keyword interchange_duplicates_validity_days: Required. The number of days to look back for + duplicate interchange. + :paramtype interchange_duplicates_validity_days: int + :keyword check_certificate_revocation_list_on_send: Required. The value indicating whether to + check for certificate revocation list on send. + :paramtype check_certificate_revocation_list_on_send: bool + :keyword check_certificate_revocation_list_on_receive: Required. The value indicating whether + to check for certificate revocation list on receive. + :paramtype check_certificate_revocation_list_on_receive: bool + :keyword encryption_algorithm: Required. The encryption algorithm. Possible values include: + "NotSpecified", "None", "DES3", "RC2", "AES128", "AES192", "AES256". + :paramtype encryption_algorithm: str or ~azure.mgmt.logic.models.EncryptionAlgorithm + :keyword signing_algorithm: The signing algorithm. Possible values include: "NotSpecified", + "Default", "SHA1", "SHA2256", "SHA2384", "SHA2512". + :paramtype signing_algorithm: str or ~azure.mgmt.logic.models.SigningAlgorithm + """ + super(AS2ValidationSettings, self).__init__(**kwargs) self.override_message_properties = override_message_properties self.encrypt_message = encrypt_message self.sign_message = sign_message @@ -1365,8 +1727,8 @@ def __init__( class AssemblyCollection(msrest.serialization.Model): """A collection of assembly definitions. - :param value: - :type value: list[~azure.mgmt.logic.models.AssemblyDefinition] + :ivar value: + :vartype value: list[~azure.mgmt.logic.models.AssemblyDefinition] """ _attribute_map = { @@ -1379,6 +1741,10 @@ def __init__( value: Optional[List["AssemblyDefinition"]] = None, **kwargs ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.logic.models.AssemblyDefinition] + """ super(AssemblyCollection, self).__init__(**kwargs) self.value = value @@ -1396,12 +1762,12 @@ class AssemblyDefinition(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: Required. The assembly properties. - :type properties: ~azure.mgmt.logic.models.AssemblyProperties + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar properties: Required. The assembly properties. + :vartype properties: ~azure.mgmt.logic.models.AssemblyProperties """ _validation = { @@ -1428,6 +1794,14 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword properties: Required. The assembly properties. + :paramtype properties: ~azure.mgmt.logic.models.AssemblyProperties + """ super(AssemblyDefinition, self).__init__(location=location, tags=tags, **kwargs) self.properties = properties @@ -1437,26 +1811,26 @@ class AssemblyProperties(ArtifactContentPropertiesDefinition): All required parameters must be populated in order to send to Azure. - :param created_time: The artifact creation time. - :type created_time: ~datetime.datetime - :param changed_time: The artifact changed time. - :type changed_time: ~datetime.datetime - :param metadata: Any object. - :type metadata: object - :param content: Any object. - :type content: object - :param content_type: The content type. - :type content_type: str - :param content_link: The content link. - :type content_link: ~azure.mgmt.logic.models.ContentLink - :param assembly_name: Required. The assembly name. - :type assembly_name: str - :param assembly_version: The assembly version. - :type assembly_version: str - :param assembly_culture: The assembly culture. - :type assembly_culture: str - :param assembly_public_key_token: The assembly public key token. - :type assembly_public_key_token: str + :ivar created_time: The artifact creation time. + :vartype created_time: ~datetime.datetime + :ivar changed_time: The artifact changed time. + :vartype changed_time: ~datetime.datetime + :ivar metadata: Anything. + :vartype metadata: any + :ivar content: Anything. + :vartype content: any + :ivar content_type: The content type. + :vartype content_type: str + :ivar content_link: The content link. + :vartype content_link: ~azure.mgmt.logic.models.ContentLink + :ivar assembly_name: Required. The assembly name. + :vartype assembly_name: str + :ivar assembly_version: The assembly version. + :vartype assembly_version: str + :ivar assembly_culture: The assembly culture. + :vartype assembly_culture: str + :ivar assembly_public_key_token: The assembly public key token. + :vartype assembly_public_key_token: str """ _validation = { @@ -1482,8 +1856,8 @@ def __init__( assembly_name: str, created_time: Optional[datetime.datetime] = None, changed_time: Optional[datetime.datetime] = None, - metadata: Optional[object] = None, - content: Optional[object] = None, + metadata: Optional[Any] = None, + content: Optional[Any] = None, content_type: Optional[str] = None, content_link: Optional["ContentLink"] = None, assembly_version: Optional[str] = None, @@ -1491,6 +1865,28 @@ def __init__( assembly_public_key_token: Optional[str] = None, **kwargs ): + """ + :keyword created_time: The artifact creation time. + :paramtype created_time: ~datetime.datetime + :keyword changed_time: The artifact changed time. + :paramtype changed_time: ~datetime.datetime + :keyword metadata: Anything. + :paramtype metadata: any + :keyword content: Anything. + :paramtype content: any + :keyword content_type: The content type. + :paramtype content_type: str + :keyword content_link: The content link. + :paramtype content_link: ~azure.mgmt.logic.models.ContentLink + :keyword assembly_name: Required. The assembly name. + :paramtype assembly_name: str + :keyword assembly_version: The assembly version. + :paramtype assembly_version: str + :keyword assembly_culture: The assembly culture. + :paramtype assembly_culture: str + :keyword assembly_public_key_token: The assembly public key token. + :paramtype assembly_public_key_token: str + """ super(AssemblyProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, content=content, content_type=content_type, content_link=content_link, **kwargs) self.assembly_name = assembly_name self.assembly_version = assembly_version @@ -1503,8 +1899,8 @@ class ErrorInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. The error code. - :type code: str + :ivar code: Required. The error code. + :vartype code: str """ _validation = { @@ -1521,6 +1917,10 @@ def __init__( code: str, **kwargs ): + """ + :keyword code: Required. The error code. + :paramtype code: str + """ super(ErrorInfo, self).__init__(**kwargs) self.code = code @@ -1530,12 +1930,12 @@ class AzureResourceErrorInfo(ErrorInfo): All required parameters must be populated in order to send to Azure. - :param code: Required. The error code. - :type code: str - :param message: Required. The error message. - :type message: str - :param details: The error details. - :type details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + :ivar code: Required. The error code. + :vartype code: str + :ivar message: Required. The error message. + :vartype message: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] """ _validation = { @@ -1557,6 +1957,14 @@ def __init__( details: Optional[List["AzureResourceErrorInfo"]] = None, **kwargs ): + """ + :keyword code: Required. The error code. + :paramtype code: str + :keyword message: Required. The error message. + :paramtype message: str + :keyword details: The error details. + :paramtype details: list[~azure.mgmt.logic.models.AzureResourceErrorInfo] + """ super(AzureResourceErrorInfo, self).__init__(code=code, **kwargs) self.message = message self.details = details @@ -1565,8 +1973,8 @@ def __init__( class B2BPartnerContent(msrest.serialization.Model): """The B2B partner content. - :param business_identities: The list of partner business identities. - :type business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + :ivar business_identities: The list of partner business identities. + :vartype business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] """ _attribute_map = { @@ -1579,6 +1987,10 @@ def __init__( business_identities: Optional[List["BusinessIdentity"]] = None, **kwargs ): + """ + :keyword business_identities: The list of partner business identities. + :paramtype business_identities: list[~azure.mgmt.logic.models.BusinessIdentity] + """ super(B2BPartnerContent, self).__init__(**kwargs) self.business_identities = business_identities @@ -1596,12 +2008,12 @@ class BatchConfiguration(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: Required. The batch configuration properties. - :type properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar properties: Required. The batch configuration properties. + :vartype properties: ~azure.mgmt.logic.models.BatchConfigurationProperties """ _validation = { @@ -1628,6 +2040,14 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword properties: Required. The batch configuration properties. + :paramtype properties: ~azure.mgmt.logic.models.BatchConfigurationProperties + """ super(BatchConfiguration, self).__init__(location=location, tags=tags, **kwargs) self.properties = properties @@ -1635,8 +2055,8 @@ def __init__( class BatchConfigurationCollection(msrest.serialization.Model): """A collection of batch configurations. - :param value: - :type value: list[~azure.mgmt.logic.models.BatchConfiguration] + :ivar value: + :vartype value: list[~azure.mgmt.logic.models.BatchConfiguration] """ _attribute_map = { @@ -1649,6 +2069,10 @@ def __init__( value: Optional[List["BatchConfiguration"]] = None, **kwargs ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.logic.models.BatchConfiguration] + """ super(BatchConfigurationCollection, self).__init__(**kwargs) self.value = value @@ -1658,16 +2082,16 @@ class BatchConfigurationProperties(ArtifactProperties): All required parameters must be populated in order to send to Azure. - :param metadata: Any object. - :type metadata: object - :param batch_group_name: Required. The name of the batch group. - :type batch_group_name: str - :param release_criteria: Required. The batch release criteria. - :type release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria - :param created_time: The created time. - :type created_time: ~datetime.datetime - :param changed_time: The changed time. - :type changed_time: ~datetime.datetime + :ivar created_time: The artifact creation time. + :vartype created_time: ~datetime.datetime + :ivar changed_time: The artifact changed time. + :vartype changed_time: ~datetime.datetime + :ivar metadata: Anything. + :vartype metadata: any + :ivar batch_group_name: Required. The name of the batch group. + :vartype batch_group_name: str + :ivar release_criteria: Required. The batch release criteria. + :vartype release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria """ _validation = { @@ -1676,11 +2100,11 @@ class BatchConfigurationProperties(ArtifactProperties): } _attribute_map = { + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, 'metadata': {'key': 'metadata', 'type': 'object'}, 'batch_group_name': {'key': 'batchGroupName', 'type': 'str'}, 'release_criteria': {'key': 'releaseCriteria', 'type': 'BatchReleaseCriteria'}, - 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, - 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, } def __init__( @@ -1688,27 +2112,37 @@ def __init__( *, batch_group_name: str, release_criteria: "BatchReleaseCriteria", - metadata: Optional[object] = None, created_time: Optional[datetime.datetime] = None, changed_time: Optional[datetime.datetime] = None, - **kwargs - ): - super(BatchConfigurationProperties, self).__init__(metadata=metadata, **kwargs) + metadata: Optional[Any] = None, + **kwargs + ): + """ + :keyword created_time: The artifact creation time. + :paramtype created_time: ~datetime.datetime + :keyword changed_time: The artifact changed time. + :paramtype changed_time: ~datetime.datetime + :keyword metadata: Anything. + :paramtype metadata: any + :keyword batch_group_name: Required. The name of the batch group. + :paramtype batch_group_name: str + :keyword release_criteria: Required. The batch release criteria. + :paramtype release_criteria: ~azure.mgmt.logic.models.BatchReleaseCriteria + """ + super(BatchConfigurationProperties, self).__init__(created_time=created_time, changed_time=changed_time, metadata=metadata, **kwargs) self.batch_group_name = batch_group_name self.release_criteria = release_criteria - self.created_time = created_time - self.changed_time = changed_time class BatchReleaseCriteria(msrest.serialization.Model): """The batch release criteria. - :param message_count: The message count. - :type message_count: int - :param batch_size: The batch size in bytes. - :type batch_size: int - :param recurrence: The recurrence. - :type recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + :ivar message_count: The message count. + :vartype message_count: int + :ivar batch_size: The batch size in bytes. + :vartype batch_size: int + :ivar recurrence: The recurrence. + :vartype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence """ _attribute_map = { @@ -1725,6 +2159,14 @@ def __init__( recurrence: Optional["WorkflowTriggerRecurrence"] = None, **kwargs ): + """ + :keyword message_count: The message count. + :paramtype message_count: int + :keyword batch_size: The batch size in bytes. + :paramtype batch_size: int + :keyword recurrence: The recurrence. + :paramtype recurrence: ~azure.mgmt.logic.models.WorkflowTriggerRecurrence + """ super(BatchReleaseCriteria, self).__init__(**kwargs) self.message_count = message_count self.batch_size = batch_size @@ -1736,10 +2178,10 @@ class BusinessIdentity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32. - :type qualifier: str - :param value: Required. The user defined business identity value. - :type value: str + :ivar qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32. + :vartype qualifier: str + :ivar value: Required. The user defined business identity value. + :vartype value: str """ _validation = { @@ -1759,6 +2201,13 @@ def __init__( value: str, **kwargs ): + """ + :keyword qualifier: Required. The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, + 32. + :paramtype qualifier: str + :keyword value: Required. The user defined business identity value. + :paramtype value: str + """ super(BusinessIdentity, self).__init__(**kwargs) self.qualifier = qualifier self.value = value @@ -1767,8 +2216,8 @@ def __init__( class CallbackUrl(msrest.serialization.Model): """The callback url. - :param value: The URL value. - :type value: str + :ivar value: The URL value. + :vartype value: str """ _attribute_map = { @@ -1781,6 +2230,10 @@ def __init__( value: Optional[str] = None, **kwargs ): + """ + :keyword value: The URL value. + :paramtype value: str + """ super(CallbackUrl, self).__init__(**kwargs) self.value = value @@ -1788,10 +2241,10 @@ def __init__( class ContentHash(msrest.serialization.Model): """The content hash. - :param algorithm: The algorithm of the content hash. - :type algorithm: str - :param value: The value of the content hash. - :type value: str + :ivar algorithm: The algorithm of the content hash. + :vartype algorithm: str + :ivar value: The value of the content hash. + :vartype value: str """ _attribute_map = { @@ -1806,6 +2259,12 @@ def __init__( value: Optional[str] = None, **kwargs ): + """ + :keyword algorithm: The algorithm of the content hash. + :paramtype algorithm: str + :keyword value: The value of the content hash. + :paramtype value: str + """ super(ContentHash, self).__init__(**kwargs) self.algorithm = algorithm self.value = value @@ -1814,18 +2273,27 @@ def __init__( class ContentLink(msrest.serialization.Model): """The content link. - :param uri: The content link URI. - :type uri: str - :param content_version: The content version. - :type content_version: str - :param content_size: The content size. - :type content_size: long - :param content_hash: The content hash. - :type content_hash: ~azure.mgmt.logic.models.ContentHash - :param metadata: The metadata. - :type metadata: object + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar uri: The content link URI. + :vartype uri: str + :ivar content_version: The content version. + :vartype content_version: str + :ivar content_size: The content size. + :vartype content_size: long + :ivar content_hash: The content hash. + :vartype content_hash: ~azure.mgmt.logic.models.ContentHash + :ivar metadata: The metadata. + :vartype metadata: any """ + _validation = { + 'content_version': {'readonly': True}, + 'content_size': {'readonly': True}, + 'content_hash': {'readonly': True}, + 'metadata': {'readonly': True}, + } + _attribute_map = { 'uri': {'key': 'uri', 'type': 'str'}, 'content_version': {'key': 'contentVersion', 'type': 'str'}, @@ -1838,25 +2306,25 @@ def __init__( self, *, uri: Optional[str] = None, - content_version: Optional[str] = None, - content_size: Optional[int] = None, - content_hash: Optional["ContentHash"] = None, - metadata: Optional[object] = None, **kwargs ): + """ + :keyword uri: The content link URI. + :paramtype uri: str + """ super(ContentLink, self).__init__(**kwargs) self.uri = uri - self.content_version = content_version - self.content_size = content_size - self.content_hash = content_hash - self.metadata = metadata + self.content_version = None + self.content_size = None + self.content_hash = None + self.metadata = None class Correlation(msrest.serialization.Model): """The correlation property. - :param client_tracking_id: The client tracking id. - :type client_tracking_id: str + :ivar client_tracking_id: The client tracking id. + :vartype client_tracking_id: str """ _attribute_map = { @@ -1869,6 +2337,10 @@ def __init__( client_tracking_id: Optional[str] = None, **kwargs ): + """ + :keyword client_tracking_id: The client tracking id. + :paramtype client_tracking_id: str + """ super(Correlation, self).__init__(**kwargs) self.client_tracking_id = client_tracking_id @@ -1878,37 +2350,37 @@ class EdifactAcknowledgementSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param need_technical_acknowledgement: Required. The value indicating whether technical + :ivar need_technical_acknowledgement: Required. The value indicating whether technical acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating whether to batch the + :vartype need_technical_acknowledgement: bool + :ivar batch_technical_acknowledgements: Required. The value indicating whether to batch the technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating whether functional + :vartype batch_technical_acknowledgements: bool + :ivar need_functional_acknowledgement: Required. The value indicating whether functional acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param batch_functional_acknowledgements: Required. The value indicating whether to batch + :vartype need_functional_acknowledgement: bool + :ivar batch_functional_acknowledgements: Required. The value indicating whether to batch functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating whether a loop is needed - for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating whether to send + :vartype batch_functional_acknowledgements: bool + :ivar need_loop_for_valid_messages: Required. The value indicating whether a loop is needed for + valid messages. + :vartype need_loop_for_valid_messages: bool + :ivar send_synchronous_acknowledgement: Required. The value indicating whether to send synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The acknowledgement control number + :vartype send_synchronous_acknowledgement: bool + :ivar acknowledgement_control_number_prefix: The acknowledgement control number prefix. + :vartype acknowledgement_control_number_prefix: str + :ivar acknowledgement_control_number_suffix: The acknowledgement control number suffix. + :vartype acknowledgement_control_number_suffix: str + :ivar acknowledgement_control_number_lower_bound: Required. The acknowledgement control number lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The acknowledgement control number + :vartype acknowledgement_control_number_lower_bound: int + :ivar acknowledgement_control_number_upper_bound: Required. The acknowledgement control number upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value indicating whether to + :vartype acknowledgement_control_number_upper_bound: int + :ivar rollover_acknowledgement_control_number: Required. The value indicating whether to rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool + :vartype rollover_acknowledgement_control_number: bool """ _validation = { @@ -1953,6 +2425,39 @@ def __init__( acknowledgement_control_number_suffix: Optional[str] = None, **kwargs ): + """ + :keyword need_technical_acknowledgement: Required. The value indicating whether technical + acknowledgement is needed. + :paramtype need_technical_acknowledgement: bool + :keyword batch_technical_acknowledgements: Required. The value indicating whether to batch the + technical acknowledgements. + :paramtype batch_technical_acknowledgements: bool + :keyword need_functional_acknowledgement: Required. The value indicating whether functional + acknowledgement is needed. + :paramtype need_functional_acknowledgement: bool + :keyword batch_functional_acknowledgements: Required. The value indicating whether to batch + functional acknowledgements. + :paramtype batch_functional_acknowledgements: bool + :keyword need_loop_for_valid_messages: Required. The value indicating whether a loop is needed + for valid messages. + :paramtype need_loop_for_valid_messages: bool + :keyword send_synchronous_acknowledgement: Required. The value indicating whether to send + synchronous acknowledgement. + :paramtype send_synchronous_acknowledgement: bool + :keyword acknowledgement_control_number_prefix: The acknowledgement control number prefix. + :paramtype acknowledgement_control_number_prefix: str + :keyword acknowledgement_control_number_suffix: The acknowledgement control number suffix. + :paramtype acknowledgement_control_number_suffix: str + :keyword acknowledgement_control_number_lower_bound: Required. The acknowledgement control + number lower bound. + :paramtype acknowledgement_control_number_lower_bound: int + :keyword acknowledgement_control_number_upper_bound: Required. The acknowledgement control + number upper bound. + :paramtype acknowledgement_control_number_upper_bound: int + :keyword rollover_acknowledgement_control_number: Required. The value indicating whether to + rollover acknowledgement control number. + :paramtype rollover_acknowledgement_control_number: bool + """ super(EdifactAcknowledgementSettings, self).__init__(**kwargs) self.need_technical_acknowledgement = need_technical_acknowledgement self.batch_technical_acknowledgements = batch_technical_acknowledgements @@ -1972,10 +2477,10 @@ class EdifactAgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param receive_agreement: Required. The EDIFACT one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement - :param send_agreement: Required. The EDIFACT one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :ivar receive_agreement: Required. The EDIFACT one-way receive agreement. + :vartype receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :ivar send_agreement: Required. The EDIFACT one-way send agreement. + :vartype send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement """ _validation = { @@ -1995,6 +2500,12 @@ def __init__( send_agreement: "EdifactOneWayAgreement", **kwargs ): + """ + :keyword receive_agreement: Required. The EDIFACT one-way receive agreement. + :paramtype receive_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + :keyword send_agreement: Required. The EDIFACT one-way send agreement. + :paramtype send_agreement: ~azure.mgmt.logic.models.EdifactOneWayAgreement + """ super(EdifactAgreementContent, self).__init__(**kwargs) self.receive_agreement = receive_agreement self.send_agreement = send_agreement @@ -2005,33 +2516,33 @@ class EdifactDelimiterOverride(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_id: The message id. - :type message_id: str - :param message_version: The message version. - :type message_version: str - :param message_release: The message release. - :type message_release: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values + :ivar message_id: The message id. + :vartype message_id: str + :ivar message_version: The message version. + :vartype message_version: str + :ivar message_release: The message release. + :vartype message_release: str + :ivar data_element_separator: Required. The data element separator. + :vartype data_element_separator: int + :ivar component_separator: Required. The component separator. + :vartype component_separator: int + :ivar segment_terminator: Required. The segment terminator. + :vartype segment_terminator: int + :ivar repetition_separator: Required. The repetition separator. + :vartype repetition_separator: int + :ivar segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param decimal_point_indicator: Required. The decimal point indicator. Possible values include: + :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :ivar decimal_point_indicator: Required. The decimal point indicator. Possible values include: "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param message_association_assigned_code: The message association assigned code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this delimiter settings has to be + :vartype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :ivar release_indicator: Required. The release indicator. + :vartype release_indicator: int + :ivar message_association_assigned_code: The message association assigned code. + :vartype message_association_assigned_code: str + :ivar target_namespace: The target namespace on which this delimiter settings has to be applied. - :type target_namespace: str + :vartype target_namespace: str """ _validation = { @@ -2076,6 +2587,35 @@ def __init__( target_namespace: Optional[str] = None, **kwargs ): + """ + :keyword message_id: The message id. + :paramtype message_id: str + :keyword message_version: The message version. + :paramtype message_version: str + :keyword message_release: The message release. + :paramtype message_release: str + :keyword data_element_separator: Required. The data element separator. + :paramtype data_element_separator: int + :keyword component_separator: Required. The component separator. + :paramtype component_separator: int + :keyword segment_terminator: Required. The segment terminator. + :paramtype segment_terminator: int + :keyword repetition_separator: Required. The repetition separator. + :paramtype repetition_separator: int + :keyword segment_terminator_suffix: Required. The segment terminator suffix. Possible values + include: "NotSpecified", "None", "CR", "LF", "CRLF". + :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :keyword decimal_point_indicator: Required. The decimal point indicator. Possible values + include: "NotSpecified", "Comma", "Decimal". + :paramtype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :keyword release_indicator: Required. The release indicator. + :paramtype release_indicator: int + :keyword message_association_assigned_code: The message association assigned code. + :paramtype message_association_assigned_code: str + :keyword target_namespace: The target namespace on which this delimiter settings has to be + applied. + :paramtype target_namespace: str + """ super(EdifactDelimiterOverride, self).__init__(**kwargs) self.message_id = message_id self.message_version = message_version @@ -2094,38 +2634,37 @@ def __init__( class EdifactEnvelopeOverride(msrest.serialization.Model): """The Edifact envelope override settings. - :param message_id: The message id on which this envelope settings has to be applied. - :type message_id: str - :param message_version: The message version on which this envelope settings has to be applied. - :type message_version: str - :param message_release: The message release version on which this envelope settings has to be - applied. - :type message_release: str - :param message_association_assigned_code: The message association assigned code. - :type message_association_assigned_code: str - :param target_namespace: The target namespace on which this envelope settings has to be + :ivar message_id: The message id on which this envelope settings has to be applied. + :vartype message_id: str + :ivar message_version: The message version on which this envelope settings has to be applied. + :vartype message_version: str + :ivar message_release: The message release version on which this envelope settings has to be applied. - :type target_namespace: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param receiver_application_qualifier: The receiver application qualifier. - :type receiver_application_qualifier: str - :param receiver_application_id: The receiver application id. - :type receiver_application_id: str - :param controlling_agency_code: The controlling agency code. - :type controlling_agency_code: str - :param group_header_message_version: The group header message version. - :type group_header_message_version: str - :param group_header_message_release: The group header message release. - :type group_header_message_release: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param application_password: The application password. - :type application_password: str + :vartype message_release: str + :ivar message_association_assigned_code: The message association assigned code. + :vartype message_association_assigned_code: str + :ivar target_namespace: The target namespace on which this envelope settings has to be applied. + :vartype target_namespace: str + :ivar functional_group_id: The functional group id. + :vartype functional_group_id: str + :ivar sender_application_qualifier: The sender application qualifier. + :vartype sender_application_qualifier: str + :ivar sender_application_id: The sender application id. + :vartype sender_application_id: str + :ivar receiver_application_qualifier: The receiver application qualifier. + :vartype receiver_application_qualifier: str + :ivar receiver_application_id: The receiver application id. + :vartype receiver_application_id: str + :ivar controlling_agency_code: The controlling agency code. + :vartype controlling_agency_code: str + :ivar group_header_message_version: The group header message version. + :vartype group_header_message_version: str + :ivar group_header_message_release: The group header message release. + :vartype group_header_message_release: str + :ivar association_assigned_code: The association assigned code. + :vartype association_assigned_code: str + :ivar application_password: The application password. + :vartype application_password: str """ _attribute_map = { @@ -2166,6 +2705,41 @@ def __init__( application_password: Optional[str] = None, **kwargs ): + """ + :keyword message_id: The message id on which this envelope settings has to be applied. + :paramtype message_id: str + :keyword message_version: The message version on which this envelope settings has to be + applied. + :paramtype message_version: str + :keyword message_release: The message release version on which this envelope settings has to be + applied. + :paramtype message_release: str + :keyword message_association_assigned_code: The message association assigned code. + :paramtype message_association_assigned_code: str + :keyword target_namespace: The target namespace on which this envelope settings has to be + applied. + :paramtype target_namespace: str + :keyword functional_group_id: The functional group id. + :paramtype functional_group_id: str + :keyword sender_application_qualifier: The sender application qualifier. + :paramtype sender_application_qualifier: str + :keyword sender_application_id: The sender application id. + :paramtype sender_application_id: str + :keyword receiver_application_qualifier: The receiver application qualifier. + :paramtype receiver_application_qualifier: str + :keyword receiver_application_id: The receiver application id. + :paramtype receiver_application_id: str + :keyword controlling_agency_code: The controlling agency code. + :paramtype controlling_agency_code: str + :keyword group_header_message_version: The group header message version. + :paramtype group_header_message_version: str + :keyword group_header_message_release: The group header message release. + :paramtype group_header_message_release: str + :keyword association_assigned_code: The association assigned code. + :paramtype association_assigned_code: str + :keyword application_password: The application password. + :paramtype application_password: str + """ super(EdifactEnvelopeOverride, self).__init__(**kwargs) self.message_id = message_id self.message_version = message_version @@ -2189,100 +2763,100 @@ class EdifactEnvelopeSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param group_association_assigned_code: The group association assigned code. - :type group_association_assigned_code: str - :param communication_agreement_id: The communication agreement id. - :type communication_agreement_id: str - :param apply_delimiter_string_advice: Required. The value indicating whether to apply delimiter + :ivar group_association_assigned_code: The group association assigned code. + :vartype group_association_assigned_code: str + :ivar communication_agreement_id: The communication agreement id. + :vartype communication_agreement_id: str + :ivar apply_delimiter_string_advice: Required. The value indicating whether to apply delimiter string advice. - :type apply_delimiter_string_advice: bool - :param create_grouping_segments: Required. The value indicating whether to create grouping + :vartype apply_delimiter_string_advice: bool + :ivar create_grouping_segments: Required. The value indicating whether to create grouping segments. - :type create_grouping_segments: bool - :param enable_default_group_headers: Required. The value indicating whether to enable default + :vartype create_grouping_segments: bool + :ivar enable_default_group_headers: Required. The value indicating whether to enable default group headers. - :type enable_default_group_headers: bool - :param recipient_reference_password_value: The recipient reference password value. - :type recipient_reference_password_value: str - :param recipient_reference_password_qualifier: The recipient reference password qualifier. - :type recipient_reference_password_qualifier: str - :param application_reference_id: The application reference id. - :type application_reference_id: str - :param processing_priority_code: The processing priority code. - :type processing_priority_code: str - :param interchange_control_number_lower_bound: Required. The interchange control number lower + :vartype enable_default_group_headers: bool + :ivar recipient_reference_password_value: The recipient reference password value. + :vartype recipient_reference_password_value: str + :ivar recipient_reference_password_qualifier: The recipient reference password qualifier. + :vartype recipient_reference_password_qualifier: str + :ivar application_reference_id: The application reference id. + :vartype application_reference_id: str + :ivar processing_priority_code: The processing priority code. + :vartype processing_priority_code: str + :ivar interchange_control_number_lower_bound: Required. The interchange control number lower bound. - :type interchange_control_number_lower_bound: long - :param interchange_control_number_upper_bound: Required. The interchange control number upper + :vartype interchange_control_number_lower_bound: long + :ivar interchange_control_number_upper_bound: Required. The interchange control number upper bound. - :type interchange_control_number_upper_bound: long - :param rollover_interchange_control_number: Required. The value indicating whether to rollover + :vartype interchange_control_number_upper_bound: long + :ivar rollover_interchange_control_number: Required. The value indicating whether to rollover interchange control number. - :type rollover_interchange_control_number: bool - :param interchange_control_number_prefix: The interchange control number prefix. - :type interchange_control_number_prefix: str - :param interchange_control_number_suffix: The interchange control number suffix. - :type interchange_control_number_suffix: str - :param sender_reverse_routing_address: The sender reverse routing address. - :type sender_reverse_routing_address: str - :param receiver_reverse_routing_address: The receiver reverse routing address. - :type receiver_reverse_routing_address: str - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_controlling_agency_code: The group controlling agency code. - :type group_controlling_agency_code: str - :param group_message_version: The group message version. - :type group_message_version: str - :param group_message_release: The group message release. - :type group_message_release: str - :param group_control_number_lower_bound: Required. The group control number lower bound. - :type group_control_number_lower_bound: long - :param group_control_number_upper_bound: Required. The group control number upper bound. - :type group_control_number_upper_bound: long - :param rollover_group_control_number: Required. The value indicating whether to rollover group + :vartype rollover_interchange_control_number: bool + :ivar interchange_control_number_prefix: The interchange control number prefix. + :vartype interchange_control_number_prefix: str + :ivar interchange_control_number_suffix: The interchange control number suffix. + :vartype interchange_control_number_suffix: str + :ivar sender_reverse_routing_address: The sender reverse routing address. + :vartype sender_reverse_routing_address: str + :ivar receiver_reverse_routing_address: The receiver reverse routing address. + :vartype receiver_reverse_routing_address: str + :ivar functional_group_id: The functional group id. + :vartype functional_group_id: str + :ivar group_controlling_agency_code: The group controlling agency code. + :vartype group_controlling_agency_code: str + :ivar group_message_version: The group message version. + :vartype group_message_version: str + :ivar group_message_release: The group message release. + :vartype group_message_release: str + :ivar group_control_number_lower_bound: Required. The group control number lower bound. + :vartype group_control_number_lower_bound: long + :ivar group_control_number_upper_bound: Required. The group control number upper bound. + :vartype group_control_number_upper_bound: long + :ivar rollover_group_control_number: Required. The value indicating whether to rollover group control number. - :type rollover_group_control_number: bool - :param group_control_number_prefix: The group control number prefix. - :type group_control_number_prefix: str - :param group_control_number_suffix: The group control number suffix. - :type group_control_number_suffix: str - :param group_application_receiver_qualifier: The group application receiver qualifier. - :type group_application_receiver_qualifier: str - :param group_application_receiver_id: The group application receiver id. - :type group_application_receiver_id: str - :param group_application_sender_qualifier: The group application sender qualifier. - :type group_application_sender_qualifier: str - :param group_application_sender_id: The group application sender id. - :type group_application_sender_id: str - :param group_application_password: The group application password. - :type group_application_password: str - :param overwrite_existing_transaction_set_control_number: Required. The value indicating - whether to overwrite existing transaction set control number. - :type overwrite_existing_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control number suffix. - :type transaction_set_control_number_suffix: str - :param transaction_set_control_number_lower_bound: Required. The transaction set control number + :vartype rollover_group_control_number: bool + :ivar group_control_number_prefix: The group control number prefix. + :vartype group_control_number_prefix: str + :ivar group_control_number_suffix: The group control number suffix. + :vartype group_control_number_suffix: str + :ivar group_application_receiver_qualifier: The group application receiver qualifier. + :vartype group_application_receiver_qualifier: str + :ivar group_application_receiver_id: The group application receiver id. + :vartype group_application_receiver_id: str + :ivar group_application_sender_qualifier: The group application sender qualifier. + :vartype group_application_sender_qualifier: str + :ivar group_application_sender_id: The group application sender id. + :vartype group_application_sender_id: str + :ivar group_application_password: The group application password. + :vartype group_application_password: str + :ivar overwrite_existing_transaction_set_control_number: Required. The value indicating whether + to overwrite existing transaction set control number. + :vartype overwrite_existing_transaction_set_control_number: bool + :ivar transaction_set_control_number_prefix: The transaction set control number prefix. + :vartype transaction_set_control_number_prefix: str + :ivar transaction_set_control_number_suffix: The transaction set control number suffix. + :vartype transaction_set_control_number_suffix: str + :ivar transaction_set_control_number_lower_bound: Required. The transaction set control number lower bound. - :type transaction_set_control_number_lower_bound: long - :param transaction_set_control_number_upper_bound: Required. The transaction set control number + :vartype transaction_set_control_number_lower_bound: long + :ivar transaction_set_control_number_upper_bound: Required. The transaction set control number upper bound. - :type transaction_set_control_number_upper_bound: long - :param rollover_transaction_set_control_number: Required. The value indicating whether to + :vartype transaction_set_control_number_upper_bound: long + :ivar rollover_transaction_set_control_number: Required. The value indicating whether to rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param is_test_interchange: Required. The value indicating whether the message is a test + :vartype rollover_transaction_set_control_number: bool + :ivar is_test_interchange: Required. The value indicating whether the message is a test interchange. - :type is_test_interchange: bool - :param sender_internal_identification: The sender internal identification. - :type sender_internal_identification: str - :param sender_internal_sub_identification: The sender internal sub identification. - :type sender_internal_sub_identification: str - :param receiver_internal_identification: The receiver internal identification. - :type receiver_internal_identification: str - :param receiver_internal_sub_identification: The receiver internal sub identification. - :type receiver_internal_sub_identification: str + :vartype is_test_interchange: bool + :ivar sender_internal_identification: The sender internal identification. + :vartype sender_internal_identification: str + :ivar sender_internal_sub_identification: The sender internal sub identification. + :vartype sender_internal_sub_identification: str + :ivar receiver_internal_identification: The receiver internal identification. + :vartype receiver_internal_identification: str + :ivar receiver_internal_sub_identification: The receiver internal sub identification. + :vartype receiver_internal_sub_identification: str """ _validation = { @@ -2392,6 +2966,102 @@ def __init__( receiver_internal_sub_identification: Optional[str] = None, **kwargs ): + """ + :keyword group_association_assigned_code: The group association assigned code. + :paramtype group_association_assigned_code: str + :keyword communication_agreement_id: The communication agreement id. + :paramtype communication_agreement_id: str + :keyword apply_delimiter_string_advice: Required. The value indicating whether to apply + delimiter string advice. + :paramtype apply_delimiter_string_advice: bool + :keyword create_grouping_segments: Required. The value indicating whether to create grouping + segments. + :paramtype create_grouping_segments: bool + :keyword enable_default_group_headers: Required. The value indicating whether to enable default + group headers. + :paramtype enable_default_group_headers: bool + :keyword recipient_reference_password_value: The recipient reference password value. + :paramtype recipient_reference_password_value: str + :keyword recipient_reference_password_qualifier: The recipient reference password qualifier. + :paramtype recipient_reference_password_qualifier: str + :keyword application_reference_id: The application reference id. + :paramtype application_reference_id: str + :keyword processing_priority_code: The processing priority code. + :paramtype processing_priority_code: str + :keyword interchange_control_number_lower_bound: Required. The interchange control number lower + bound. + :paramtype interchange_control_number_lower_bound: long + :keyword interchange_control_number_upper_bound: Required. The interchange control number upper + bound. + :paramtype interchange_control_number_upper_bound: long + :keyword rollover_interchange_control_number: Required. The value indicating whether to + rollover interchange control number. + :paramtype rollover_interchange_control_number: bool + :keyword interchange_control_number_prefix: The interchange control number prefix. + :paramtype interchange_control_number_prefix: str + :keyword interchange_control_number_suffix: The interchange control number suffix. + :paramtype interchange_control_number_suffix: str + :keyword sender_reverse_routing_address: The sender reverse routing address. + :paramtype sender_reverse_routing_address: str + :keyword receiver_reverse_routing_address: The receiver reverse routing address. + :paramtype receiver_reverse_routing_address: str + :keyword functional_group_id: The functional group id. + :paramtype functional_group_id: str + :keyword group_controlling_agency_code: The group controlling agency code. + :paramtype group_controlling_agency_code: str + :keyword group_message_version: The group message version. + :paramtype group_message_version: str + :keyword group_message_release: The group message release. + :paramtype group_message_release: str + :keyword group_control_number_lower_bound: Required. The group control number lower bound. + :paramtype group_control_number_lower_bound: long + :keyword group_control_number_upper_bound: Required. The group control number upper bound. + :paramtype group_control_number_upper_bound: long + :keyword rollover_group_control_number: Required. The value indicating whether to rollover + group control number. + :paramtype rollover_group_control_number: bool + :keyword group_control_number_prefix: The group control number prefix. + :paramtype group_control_number_prefix: str + :keyword group_control_number_suffix: The group control number suffix. + :paramtype group_control_number_suffix: str + :keyword group_application_receiver_qualifier: The group application receiver qualifier. + :paramtype group_application_receiver_qualifier: str + :keyword group_application_receiver_id: The group application receiver id. + :paramtype group_application_receiver_id: str + :keyword group_application_sender_qualifier: The group application sender qualifier. + :paramtype group_application_sender_qualifier: str + :keyword group_application_sender_id: The group application sender id. + :paramtype group_application_sender_id: str + :keyword group_application_password: The group application password. + :paramtype group_application_password: str + :keyword overwrite_existing_transaction_set_control_number: Required. The value indicating + whether to overwrite existing transaction set control number. + :paramtype overwrite_existing_transaction_set_control_number: bool + :keyword transaction_set_control_number_prefix: The transaction set control number prefix. + :paramtype transaction_set_control_number_prefix: str + :keyword transaction_set_control_number_suffix: The transaction set control number suffix. + :paramtype transaction_set_control_number_suffix: str + :keyword transaction_set_control_number_lower_bound: Required. The transaction set control + number lower bound. + :paramtype transaction_set_control_number_lower_bound: long + :keyword transaction_set_control_number_upper_bound: Required. The transaction set control + number upper bound. + :paramtype transaction_set_control_number_upper_bound: long + :keyword rollover_transaction_set_control_number: Required. The value indicating whether to + rollover transaction set control number. + :paramtype rollover_transaction_set_control_number: bool + :keyword is_test_interchange: Required. The value indicating whether the message is a test + interchange. + :paramtype is_test_interchange: bool + :keyword sender_internal_identification: The sender internal identification. + :paramtype sender_internal_identification: str + :keyword sender_internal_sub_identification: The sender internal sub identification. + :paramtype sender_internal_sub_identification: str + :keyword receiver_internal_identification: The receiver internal identification. + :paramtype receiver_internal_identification: str + :keyword receiver_internal_sub_identification: The receiver internal sub identification. + :paramtype receiver_internal_sub_identification: str + """ super(EdifactEnvelopeSettings, self).__init__(**kwargs) self.group_association_assigned_code = group_association_assigned_code self.communication_agreement_id = communication_agreement_id @@ -2441,32 +3111,32 @@ class EdifactFramingSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param service_code_list_directory_version: The service code list directory version. - :type service_code_list_directory_version: str - :param character_encoding: The character encoding. - :type character_encoding: str - :param protocol_version: Required. The protocol version. - :type protocol_version: int - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param release_indicator: Required. The release indicator. - :type release_indicator: int - :param repetition_separator: Required. The repetition separator. - :type repetition_separator: int - :param character_set: Required. The EDIFACT frame setting characterSet. Possible values - include: "NotSpecified", "UNOB", "UNOA", "UNOC", "UNOD", "UNOE", "UNOF", "UNOG", "UNOH", - "UNOI", "UNOJ", "UNOK", "UNOX", "UNOY", "KECA". - :type character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet - :param decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. Possible + :ivar service_code_list_directory_version: The service code list directory version. + :vartype service_code_list_directory_version: str + :ivar character_encoding: The character encoding. + :vartype character_encoding: str + :ivar protocol_version: Required. The protocol version. + :vartype protocol_version: int + :ivar data_element_separator: Required. The data element separator. + :vartype data_element_separator: int + :ivar component_separator: Required. The component separator. + :vartype component_separator: int + :ivar segment_terminator: Required. The segment terminator. + :vartype segment_terminator: int + :ivar release_indicator: Required. The release indicator. + :vartype release_indicator: int + :ivar repetition_separator: Required. The repetition separator. + :vartype repetition_separator: int + :ivar character_set: Required. The EDIFACT frame setting characterSet. Possible values include: + "NotSpecified", "UNOB", "UNOA", "UNOC", "UNOD", "UNOE", "UNOF", "UNOG", "UNOH", "UNOI", "UNOJ", + "UNOK", "UNOX", "UNOY", "KECA". + :vartype character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :ivar decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. Possible values include: "NotSpecified", "Comma", "Decimal". - :type decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator - :param segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator - suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :vartype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :ivar segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator suffix. + Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". + :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix """ _validation = { @@ -2511,6 +3181,34 @@ def __init__( character_encoding: Optional[str] = None, **kwargs ): + """ + :keyword service_code_list_directory_version: The service code list directory version. + :paramtype service_code_list_directory_version: str + :keyword character_encoding: The character encoding. + :paramtype character_encoding: str + :keyword protocol_version: Required. The protocol version. + :paramtype protocol_version: int + :keyword data_element_separator: Required. The data element separator. + :paramtype data_element_separator: int + :keyword component_separator: Required. The component separator. + :paramtype component_separator: int + :keyword segment_terminator: Required. The segment terminator. + :paramtype segment_terminator: int + :keyword release_indicator: Required. The release indicator. + :paramtype release_indicator: int + :keyword repetition_separator: Required. The repetition separator. + :paramtype repetition_separator: int + :keyword character_set: Required. The EDIFACT frame setting characterSet. Possible values + include: "NotSpecified", "UNOB", "UNOA", "UNOC", "UNOD", "UNOE", "UNOF", "UNOG", "UNOH", + "UNOI", "UNOJ", "UNOK", "UNOX", "UNOY", "KECA". + :paramtype character_set: str or ~azure.mgmt.logic.models.EdifactCharacterSet + :keyword decimal_point_indicator: Required. The EDIFACT frame setting decimal indicator. + Possible values include: "NotSpecified", "Comma", "Decimal". + :paramtype decimal_point_indicator: str or ~azure.mgmt.logic.models.EdifactDecimalIndicator + :keyword segment_terminator_suffix: Required. The EDIFACT frame setting segment terminator + suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". + :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ super(EdifactFramingSettings, self).__init__(**kwargs) self.service_code_list_directory_version = service_code_list_directory_version self.character_encoding = character_encoding @@ -2530,9 +3228,9 @@ class EdifactMessageFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_filter_type: Required. The message filter type. Possible values include: + :ivar message_filter_type: Required. The message filter type. Possible values include: "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + :vartype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType """ _validation = { @@ -2549,6 +3247,11 @@ def __init__( message_filter_type: Union[str, "MessageFilterType"], **kwargs ): + """ + :keyword message_filter_type: Required. The message filter type. Possible values include: + "NotSpecified", "Include", "Exclude". + :paramtype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + """ super(EdifactMessageFilter, self).__init__(**kwargs) self.message_filter_type = message_filter_type @@ -2558,8 +3261,8 @@ class EdifactMessageIdentifier(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_id: Required. The message id on which this envelope settings has to be applied. - :type message_id: str + :ivar message_id: Required. The message id on which this envelope settings has to be applied. + :vartype message_id: str """ _validation = { @@ -2576,6 +3279,11 @@ def __init__( message_id: str, **kwargs ): + """ + :keyword message_id: Required. The message id on which this envelope settings has to be + applied. + :paramtype message_id: str + """ super(EdifactMessageIdentifier, self).__init__(**kwargs) self.message_id = message_id @@ -2585,12 +3293,12 @@ class EdifactOneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The EDIFACT protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + :ivar sender_business_identity: Required. The sender business identity. + :vartype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar receiver_business_identity: Required. The receiver business identity. + :vartype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar protocol_settings: Required. The EDIFACT protocol settings. + :vartype protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings """ _validation = { @@ -2613,6 +3321,14 @@ def __init__( protocol_settings: "EdifactProtocolSettings", **kwargs ): + """ + :keyword sender_business_identity: Required. The sender business identity. + :paramtype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword receiver_business_identity: Required. The receiver business identity. + :paramtype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword protocol_settings: Required. The EDIFACT protocol settings. + :paramtype protocol_settings: ~azure.mgmt.logic.models.EdifactProtocolSettings + """ super(EdifactOneWayAgreement, self).__init__(**kwargs) self.sender_business_identity = sender_business_identity self.receiver_business_identity = receiver_business_identity @@ -2624,19 +3340,19 @@ class EdifactProcessingSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param mask_security_info: Required. The value indicating whether to mask security information. - :type mask_security_info: bool - :param preserve_interchange: Required. The value indicating whether to preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating whether to suspend + :ivar mask_security_info: Required. The value indicating whether to mask security information. + :vartype mask_security_info: bool + :ivar preserve_interchange: Required. The value indicating whether to preserve interchange. + :vartype preserve_interchange: bool + :ivar suspend_interchange_on_error: Required. The value indicating whether to suspend interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to + :vartype suspend_interchange_on_error: bool + :ivar create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating whether to use dot as + :vartype create_empty_xml_tags_for_trailing_separators: bool + :ivar use_dot_as_decimal_separator: Required. The value indicating whether to use dot as decimal separator. - :type use_dot_as_decimal_separator: bool + :vartype use_dot_as_decimal_separator: bool """ _validation = { @@ -2665,6 +3381,22 @@ def __init__( use_dot_as_decimal_separator: bool, **kwargs ): + """ + :keyword mask_security_info: Required. The value indicating whether to mask security + information. + :paramtype mask_security_info: bool + :keyword preserve_interchange: Required. The value indicating whether to preserve interchange. + :paramtype preserve_interchange: bool + :keyword suspend_interchange_on_error: Required. The value indicating whether to suspend + interchange on error. + :paramtype suspend_interchange_on_error: bool + :keyword create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether + to create empty xml tags for trailing separators. + :paramtype create_empty_xml_tags_for_trailing_separators: bool + :keyword use_dot_as_decimal_separator: Required. The value indicating whether to use dot as + decimal separator. + :paramtype use_dot_as_decimal_separator: bool + """ super(EdifactProcessingSettings, self).__init__(**kwargs) self.mask_security_info = mask_security_info self.preserve_interchange = preserve_interchange @@ -2678,28 +3410,28 @@ class EdifactProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param validation_settings: Required. The EDIFACT validation settings. - :type validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings - :param framing_settings: Required. The EDIFACT framing settings. - :type framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings - :param envelope_settings: Required. The EDIFACT envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings - :param acknowledgement_settings: Required. The EDIFACT acknowledgement settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings - :param message_filter: Required. The EDIFACT message filter. - :type message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter - :param processing_settings: Required. The EDIFACT processing Settings. - :type processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings - :param envelope_overrides: The EDIFACT envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] - :param message_filter_list: The EDIFACT message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] - :param schema_references: Required. The EDIFACT schema references. - :type schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] - :param validation_overrides: The EDIFACT validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] - :param edifact_delimiter_overrides: The EDIFACT delimiter override settings. - :type edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + :ivar validation_settings: Required. The EDIFACT validation settings. + :vartype validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings + :ivar framing_settings: Required. The EDIFACT framing settings. + :vartype framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :ivar envelope_settings: Required. The EDIFACT envelope settings. + :vartype envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :ivar acknowledgement_settings: Required. The EDIFACT acknowledgement settings. + :vartype acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :ivar message_filter: Required. The EDIFACT message filter. + :vartype message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :ivar processing_settings: Required. The EDIFACT processing Settings. + :vartype processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings + :ivar envelope_overrides: The EDIFACT envelope override settings. + :vartype envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :ivar message_filter_list: The EDIFACT message filter list. + :vartype message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :ivar schema_references: Required. The EDIFACT schema references. + :vartype schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] + :ivar validation_overrides: The EDIFACT validation override settings. + :vartype validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] + :ivar edifact_delimiter_overrides: The EDIFACT delimiter override settings. + :vartype edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] """ _validation = { @@ -2742,6 +3474,30 @@ def __init__( edifact_delimiter_overrides: Optional[List["EdifactDelimiterOverride"]] = None, **kwargs ): + """ + :keyword validation_settings: Required. The EDIFACT validation settings. + :paramtype validation_settings: ~azure.mgmt.logic.models.EdifactValidationSettings + :keyword framing_settings: Required. The EDIFACT framing settings. + :paramtype framing_settings: ~azure.mgmt.logic.models.EdifactFramingSettings + :keyword envelope_settings: Required. The EDIFACT envelope settings. + :paramtype envelope_settings: ~azure.mgmt.logic.models.EdifactEnvelopeSettings + :keyword acknowledgement_settings: Required. The EDIFACT acknowledgement settings. + :paramtype acknowledgement_settings: ~azure.mgmt.logic.models.EdifactAcknowledgementSettings + :keyword message_filter: Required. The EDIFACT message filter. + :paramtype message_filter: ~azure.mgmt.logic.models.EdifactMessageFilter + :keyword processing_settings: Required. The EDIFACT processing Settings. + :paramtype processing_settings: ~azure.mgmt.logic.models.EdifactProcessingSettings + :keyword envelope_overrides: The EDIFACT envelope override settings. + :paramtype envelope_overrides: list[~azure.mgmt.logic.models.EdifactEnvelopeOverride] + :keyword message_filter_list: The EDIFACT message filter list. + :paramtype message_filter_list: list[~azure.mgmt.logic.models.EdifactMessageIdentifier] + :keyword schema_references: Required. The EDIFACT schema references. + :paramtype schema_references: list[~azure.mgmt.logic.models.EdifactSchemaReference] + :keyword validation_overrides: The EDIFACT validation override settings. + :paramtype validation_overrides: list[~azure.mgmt.logic.models.EdifactValidationOverride] + :keyword edifact_delimiter_overrides: The EDIFACT delimiter override settings. + :paramtype edifact_delimiter_overrides: list[~azure.mgmt.logic.models.EdifactDelimiterOverride] + """ super(EdifactProtocolSettings, self).__init__(**kwargs) self.validation_settings = validation_settings self.framing_settings = framing_settings @@ -2761,20 +3517,20 @@ class EdifactSchemaReference(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_id: Required. The message id. - :type message_id: str - :param message_version: Required. The message version. - :type message_version: str - :param message_release: Required. The message release version. - :type message_release: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param sender_application_qualifier: The sender application qualifier. - :type sender_application_qualifier: str - :param association_assigned_code: The association assigned code. - :type association_assigned_code: str - :param schema_name: Required. The schema name. - :type schema_name: str + :ivar message_id: Required. The message id. + :vartype message_id: str + :ivar message_version: Required. The message version. + :vartype message_version: str + :ivar message_release: Required. The message release version. + :vartype message_release: str + :ivar sender_application_id: The sender application id. + :vartype sender_application_id: str + :ivar sender_application_qualifier: The sender application qualifier. + :vartype sender_application_qualifier: str + :ivar association_assigned_code: The association assigned code. + :vartype association_assigned_code: str + :ivar schema_name: Required. The schema name. + :vartype schema_name: str """ _validation = { @@ -2806,6 +3562,22 @@ def __init__( association_assigned_code: Optional[str] = None, **kwargs ): + """ + :keyword message_id: Required. The message id. + :paramtype message_id: str + :keyword message_version: Required. The message version. + :paramtype message_version: str + :keyword message_release: Required. The message release version. + :paramtype message_release: str + :keyword sender_application_id: The sender application id. + :paramtype sender_application_id: str + :keyword sender_application_qualifier: The sender application qualifier. + :paramtype sender_application_qualifier: str + :keyword association_assigned_code: The association assigned code. + :paramtype association_assigned_code: str + :keyword schema_name: Required. The schema name. + :paramtype schema_name: str + """ super(EdifactSchemaReference, self).__init__(**kwargs) self.message_id = message_id self.message_version = message_version @@ -2821,23 +3593,23 @@ class EdifactValidationOverride(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_id: Required. The message id on which the validation settings has to be applied. - :type message_id: str - :param enforce_character_set: Required. The value indicating whether to validate character Set. - :type enforce_character_set: bool - :param validate_edi_types: Required. The value indicating whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :ivar message_id: Required. The message id on which the validation settings has to be applied. + :vartype message_id: str + :ivar enforce_character_set: Required. The value indicating whether to validate character Set. + :vartype enforce_character_set: bool + :ivar validate_edi_types: Required. The value indicating whether to validate EDI types. + :vartype validate_edi_types: bool + :ivar validate_xsd_types: Required. The value indicating whether to validate XSD types. + :vartype validate_xsd_types: bool + :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values + :vartype allow_leading_and_trailing_spaces_and_zeroes: bool + :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool + :vartype trim_leading_and_trailing_spaces_and_zeroes: bool """ _validation = { @@ -2872,6 +3644,27 @@ def __init__( trim_leading_and_trailing_spaces_and_zeroes: bool, **kwargs ): + """ + :keyword message_id: Required. The message id on which the validation settings has to be + applied. + :paramtype message_id: str + :keyword enforce_character_set: Required. The value indicating whether to validate character + Set. + :paramtype enforce_character_set: bool + :keyword validate_edi_types: Required. The value indicating whether to validate EDI types. + :paramtype validate_edi_types: bool + :keyword validate_xsd_types: Required. The value indicating whether to validate XSD types. + :paramtype validate_xsd_types: bool + :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether + to allow leading and trailing spaces and zeroes. + :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool + :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values + include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". + :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + trim leading and trailing spaces and zeroes. + :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool + """ super(EdifactValidationOverride, self).__init__(**kwargs) self.message_id = message_id self.enforce_character_set = enforce_character_set @@ -2887,36 +3680,36 @@ class EdifactValidationSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param validate_character_set: Required. The value indicating whether to validate character set + :ivar validate_character_set: Required. The value indicating whether to validate character set in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value indicating whether to + :vartype validate_character_set: bool + :ivar check_duplicate_interchange_control_number: Required. The value indicating whether to check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity period of interchange + :vartype check_duplicate_interchange_control_number: bool + :ivar interchange_control_number_validity_days: Required. The validity period of interchange control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value indicating whether to check - for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value indicating whether - to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to Whether to validate EDI + :vartype interchange_control_number_validity_days: int + :ivar check_duplicate_group_control_number: Required. The value indicating whether to check for + duplicate group control number. + :vartype check_duplicate_group_control_number: bool + :ivar check_duplicate_transaction_set_control_number: Required. The value indicating whether to + check for duplicate transaction set control number. + :vartype check_duplicate_transaction_set_control_number: bool + :ivar validate_edi_types: Required. The value indicating whether to Whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to Whether to validate XSD + :vartype validate_edi_types: bool + :ivar validate_xsd_types: Required. The value indicating whether to Whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :vartype validate_xsd_types: bool + :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :vartype allow_leading_and_trailing_spaces_and_zeroes: bool + :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values + :vartype trim_leading_and_trailing_spaces_and_zeroes: bool + :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -2960,6 +3753,38 @@ def __init__( trailing_separator_policy: Union[str, "TrailingSeparatorPolicy"], **kwargs ): + """ + :keyword validate_character_set: Required. The value indicating whether to validate character + set in the message. + :paramtype validate_character_set: bool + :keyword check_duplicate_interchange_control_number: Required. The value indicating whether to + check for duplicate interchange control number. + :paramtype check_duplicate_interchange_control_number: bool + :keyword interchange_control_number_validity_days: Required. The validity period of interchange + control number. + :paramtype interchange_control_number_validity_days: int + :keyword check_duplicate_group_control_number: Required. The value indicating whether to check + for duplicate group control number. + :paramtype check_duplicate_group_control_number: bool + :keyword check_duplicate_transaction_set_control_number: Required. The value indicating whether + to check for duplicate transaction set control number. + :paramtype check_duplicate_transaction_set_control_number: bool + :keyword validate_edi_types: Required. The value indicating whether to Whether to validate EDI + types. + :paramtype validate_edi_types: bool + :keyword validate_xsd_types: Required. The value indicating whether to Whether to validate XSD + types. + :paramtype validate_xsd_types: bool + :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether + to allow leading and trailing spaces and zeroes. + :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool + :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + trim leading and trailing spaces and zeroes. + :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool + :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values + include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". + :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ super(EdifactValidationSettings, self).__init__(**kwargs) self.validate_character_set = validate_character_set self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number @@ -2976,10 +3801,10 @@ def __init__( class ErrorProperties(msrest.serialization.Model): """Error properties indicate why the Logic service was not able to process the incoming request. The reason is provided in the error message. - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str + :ivar code: Error code. + :vartype code: str + :ivar message: Error message indicating why the operation failed. + :vartype message: str """ _attribute_map = { @@ -2994,6 +3819,12 @@ def __init__( message: Optional[str] = None, **kwargs ): + """ + :keyword code: Error code. + :paramtype code: str + :keyword message: Error message indicating why the operation failed. + :paramtype message: str + """ super(ErrorProperties, self).__init__(**kwargs) self.code = code self.message = message @@ -3002,8 +3833,8 @@ def __init__( class ErrorResponse(msrest.serialization.Model): """Error response indicates Logic service is not able to process the incoming request. The error property contains the error details. - :param error: The error properties. - :type error: ~azure.mgmt.logic.models.ErrorProperties + :ivar error: The error properties. + :vartype error: ~azure.mgmt.logic.models.ErrorProperties """ _attribute_map = { @@ -3016,6 +3847,10 @@ def __init__( error: Optional["ErrorProperties"] = None, **kwargs ): + """ + :keyword error: The error properties. + :paramtype error: ~azure.mgmt.logic.models.ErrorProperties + """ super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -3023,14 +3858,14 @@ def __init__( class Expression(msrest.serialization.Model): """The expression. - :param text: The text. - :type text: str - :param value: Any object. - :type value: object - :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :ivar text: The text. + :vartype text: str + :ivar value: Anything. + :vartype value: any + :ivar subexpressions: The sub expressions. + :vartype subexpressions: list[~azure.mgmt.logic.models.Expression] + :ivar error: The azure resource error info. + :vartype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo """ _attribute_map = { @@ -3044,11 +3879,21 @@ def __init__( self, *, text: Optional[str] = None, - value: Optional[object] = None, + value: Optional[Any] = None, subexpressions: Optional[List["Expression"]] = None, error: Optional["AzureResourceErrorInfo"] = None, **kwargs ): + """ + :keyword text: The text. + :paramtype text: str + :keyword value: Anything. + :paramtype value: any + :keyword subexpressions: The sub expressions. + :paramtype subexpressions: list[~azure.mgmt.logic.models.Expression] + :keyword error: The azure resource error info. + :paramtype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + """ super(Expression, self).__init__(**kwargs) self.text = text self.value = value @@ -3059,16 +3904,16 @@ def __init__( class ExpressionRoot(Expression): """The expression root. - :param text: The text. - :type text: str - :param value: Any object. - :type value: object - :param subexpressions: The sub expressions. - :type subexpressions: list[~azure.mgmt.logic.models.Expression] - :param error: The azure resource error info. - :type error: ~azure.mgmt.logic.models.AzureResourceErrorInfo - :param path: The path. - :type path: str + :ivar text: The text. + :vartype text: str + :ivar value: Anything. + :vartype value: any + :ivar subexpressions: The sub expressions. + :vartype subexpressions: list[~azure.mgmt.logic.models.Expression] + :ivar error: The azure resource error info. + :vartype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :ivar path: The path. + :vartype path: str """ _attribute_map = { @@ -3083,12 +3928,24 @@ def __init__( self, *, text: Optional[str] = None, - value: Optional[object] = None, + value: Optional[Any] = None, subexpressions: Optional[List["Expression"]] = None, error: Optional["AzureResourceErrorInfo"] = None, path: Optional[str] = None, **kwargs ): + """ + :keyword text: The text. + :paramtype text: str + :keyword value: Anything. + :paramtype value: any + :keyword subexpressions: The sub expressions. + :paramtype subexpressions: list[~azure.mgmt.logic.models.Expression] + :keyword error: The azure resource error info. + :paramtype error: ~azure.mgmt.logic.models.AzureResourceErrorInfo + :keyword path: The path. + :paramtype path: str + """ super(ExpressionRoot, self).__init__(text=text, value=value, subexpressions=subexpressions, error=error, **kwargs) self.path = path @@ -3096,8 +3953,8 @@ def __init__( class ExpressionTraces(msrest.serialization.Model): """The expression traces. - :param inputs: - :type inputs: list[~azure.mgmt.logic.models.ExpressionRoot] + :ivar inputs: + :vartype inputs: list[~azure.mgmt.logic.models.ExpressionRoot] """ _attribute_map = { @@ -3110,6 +3967,10 @@ def __init__( inputs: Optional[List["ExpressionRoot"]] = None, **kwargs ): + """ + :keyword inputs: + :paramtype inputs: list[~azure.mgmt.logic.models.ExpressionRoot] + """ super(ExpressionTraces, self).__init__(**kwargs) self.inputs = inputs @@ -3119,15 +3980,15 @@ class ExtendedErrorInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. The error code. Possible values include: "NotSpecified", + :ivar code: Required. The error code. Possible values include: "NotSpecified", "IntegrationServiceEnvironmentNotFound", "InternalServerError", "InvalidOperationId". - :type code: str or ~azure.mgmt.logic.models.ErrorResponseCode - :param message: Required. The error message. - :type message: str - :param details: The error message details. - :type details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] - :param inner_error: The inner error. - :type inner_error: object + :vartype code: str or ~azure.mgmt.logic.models.ErrorResponseCode + :ivar message: Required. The error message. + :vartype message: str + :ivar details: The error message details. + :vartype details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] + :ivar inner_error: The inner error. + :vartype inner_error: any """ _validation = { @@ -3148,9 +4009,20 @@ def __init__( code: Union[str, "ErrorResponseCode"], message: str, details: Optional[List["ExtendedErrorInfo"]] = None, - inner_error: Optional[object] = None, - **kwargs - ): + inner_error: Optional[Any] = None, + **kwargs + ): + """ + :keyword code: Required. The error code. Possible values include: "NotSpecified", + "IntegrationServiceEnvironmentNotFound", "InternalServerError", "InvalidOperationId". + :paramtype code: str or ~azure.mgmt.logic.models.ErrorResponseCode + :keyword message: Required. The error message. + :paramtype message: str + :keyword details: The error message details. + :paramtype details: list[~azure.mgmt.logic.models.ExtendedErrorInfo] + :keyword inner_error: The inner error. + :paramtype inner_error: any + """ super(ExtendedErrorInfo, self).__init__(**kwargs) self.code = code self.message = message @@ -3161,14 +4033,14 @@ def __init__( class FlowAccessControlConfiguration(msrest.serialization.Model): """The access control configuration. - :param triggers: The access control configuration for invoking workflow triggers. - :type triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :param contents: The access control configuration for accessing workflow run contents. - :type contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :param actions: The access control configuration for workflow actions. - :type actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy - :param workflow_management: The access control configuration for workflow management. - :type workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :ivar triggers: The access control configuration for invoking workflow triggers. + :vartype triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :ivar contents: The access control configuration for accessing workflow run contents. + :vartype contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :ivar actions: The access control configuration for workflow actions. + :vartype actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :ivar workflow_management: The access control configuration for workflow management. + :vartype workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy """ _attribute_map = { @@ -3187,6 +4059,16 @@ def __init__( workflow_management: Optional["FlowAccessControlConfigurationPolicy"] = None, **kwargs ): + """ + :keyword triggers: The access control configuration for invoking workflow triggers. + :paramtype triggers: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :keyword contents: The access control configuration for accessing workflow run contents. + :paramtype contents: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :keyword actions: The access control configuration for workflow actions. + :paramtype actions: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + :keyword workflow_management: The access control configuration for workflow management. + :paramtype workflow_management: ~azure.mgmt.logic.models.FlowAccessControlConfigurationPolicy + """ super(FlowAccessControlConfiguration, self).__init__(**kwargs) self.triggers = triggers self.contents = contents @@ -3197,10 +4079,11 @@ def __init__( class FlowAccessControlConfigurationPolicy(msrest.serialization.Model): """The access control configuration policy. - :param allowed_caller_ip_addresses: The allowed caller IP address ranges. - :type allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] - :param open_authentication_policies: The authentication policies for workflow. - :type open_authentication_policies: ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies + :ivar allowed_caller_ip_addresses: The allowed caller IP address ranges. + :vartype allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] + :ivar open_authentication_policies: The authentication policies for workflow. + :vartype open_authentication_policies: + ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies """ _attribute_map = { @@ -3215,6 +4098,13 @@ def __init__( open_authentication_policies: Optional["OpenAuthenticationAccessPolicies"] = None, **kwargs ): + """ + :keyword allowed_caller_ip_addresses: The allowed caller IP address ranges. + :paramtype allowed_caller_ip_addresses: list[~azure.mgmt.logic.models.IpAddressRange] + :keyword open_authentication_policies: The authentication policies for workflow. + :paramtype open_authentication_policies: + ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicies + """ super(FlowAccessControlConfigurationPolicy, self).__init__(**kwargs) self.allowed_caller_ip_addresses = allowed_caller_ip_addresses self.open_authentication_policies = open_authentication_policies @@ -3223,10 +4113,10 @@ def __init__( class FlowEndpoints(msrest.serialization.Model): """The flow endpoints configuration. - :param outgoing_ip_addresses: The outgoing ip address. - :type outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] - :param access_endpoint_ip_addresses: The access endpoint ip address. - :type access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + :ivar outgoing_ip_addresses: The outgoing ip address. + :vartype outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + :ivar access_endpoint_ip_addresses: The access endpoint ip address. + :vartype access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] """ _attribute_map = { @@ -3241,6 +4131,12 @@ def __init__( access_endpoint_ip_addresses: Optional[List["IpAddress"]] = None, **kwargs ): + """ + :keyword outgoing_ip_addresses: The outgoing ip address. + :paramtype outgoing_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + :keyword access_endpoint_ip_addresses: The access endpoint ip address. + :paramtype access_endpoint_ip_addresses: list[~azure.mgmt.logic.models.IpAddress] + """ super(FlowEndpoints, self).__init__(**kwargs) self.outgoing_ip_addresses = outgoing_ip_addresses self.access_endpoint_ip_addresses = access_endpoint_ip_addresses @@ -3249,10 +4145,10 @@ def __init__( class FlowEndpointsConfiguration(msrest.serialization.Model): """The endpoints configuration. - :param workflow: The workflow endpoints. - :type workflow: ~azure.mgmt.logic.models.FlowEndpoints - :param connector: The connector endpoints. - :type connector: ~azure.mgmt.logic.models.FlowEndpoints + :ivar workflow: The workflow endpoints. + :vartype workflow: ~azure.mgmt.logic.models.FlowEndpoints + :ivar connector: The connector endpoints. + :vartype connector: ~azure.mgmt.logic.models.FlowEndpoints """ _attribute_map = { @@ -3267,6 +4163,12 @@ def __init__( connector: Optional["FlowEndpoints"] = None, **kwargs ): + """ + :keyword workflow: The workflow endpoints. + :paramtype workflow: ~azure.mgmt.logic.models.FlowEndpoints + :keyword connector: The connector endpoints. + :paramtype connector: ~azure.mgmt.logic.models.FlowEndpoints + """ super(FlowEndpointsConfiguration, self).__init__(**kwargs) self.workflow = workflow self.connector = connector @@ -3275,8 +4177,8 @@ def __init__( class GenerateUpgradedDefinitionParameters(msrest.serialization.Model): """The parameters to generate upgraded definition. - :param target_schema_version: The target schema version. - :type target_schema_version: str + :ivar target_schema_version: The target schema version. + :vartype target_schema_version: str """ _attribute_map = { @@ -3289,6 +4191,10 @@ def __init__( target_schema_version: Optional[str] = None, **kwargs ): + """ + :keyword target_schema_version: The target schema version. + :paramtype target_schema_version: str + """ super(GenerateUpgradedDefinitionParameters, self).__init__(**kwargs) self.target_schema_version = target_schema_version @@ -3296,10 +4202,10 @@ def __init__( class GetCallbackUrlParameters(msrest.serialization.Model): """The callback url parameters. - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType + :ivar not_after: The expiry time. + :vartype not_after: ~datetime.datetime + :ivar key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". + :vartype key_type: str or ~azure.mgmt.logic.models.KeyType """ _attribute_map = { @@ -3314,6 +4220,13 @@ def __init__( key_type: Optional[Union[str, "KeyType"]] = None, **kwargs ): + """ + :keyword not_after: The expiry time. + :paramtype not_after: ~datetime.datetime + :keyword key_type: The key type. Possible values include: "NotSpecified", "Primary", + "Secondary". + :paramtype key_type: str or ~azure.mgmt.logic.models.KeyType + """ super(GetCallbackUrlParameters, self).__init__(**kwargs) self.not_after = not_after self.key_type = key_type @@ -3330,17 +4243,17 @@ class IntegrationAccount(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment - :param state: The workflow state. Possible values include: "NotSpecified", "Completed", + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.logic.models.IntegrationAccountSku + :ivar integration_service_environment: The integration service environment. + :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :ivar state: The workflow state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState """ _validation = { @@ -3356,7 +4269,7 @@ class IntegrationAccount(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'IntegrationAccountSku'}, - 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'IntegrationServiceEnvironment'}, + 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'ResourceReference'}, 'state': {'key': 'properties.state', 'type': 'str'}, } @@ -3366,10 +4279,23 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, sku: Optional["IntegrationAccountSku"] = None, - integration_service_environment: Optional["IntegrationServiceEnvironment"] = None, + integration_service_environment: Optional["ResourceReference"] = None, state: Optional[Union[str, "WorkflowState"]] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword sku: The sku. + :paramtype sku: ~azure.mgmt.logic.models.IntegrationAccountSku + :keyword integration_service_environment: The integration service environment. + :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :keyword state: The workflow state. Possible values include: "NotSpecified", "Completed", + "Enabled", "Disabled", "Deleted", "Suspended". + :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState + """ super(IntegrationAccount, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku self.integration_service_environment = integration_service_environment @@ -3389,31 +4315,31 @@ class IntegrationAccountAgreement(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param agreement_type: Required. The agreement type. Possible values include: "NotSpecified", + :ivar metadata: The metadata. + :vartype metadata: any + :ivar agreement_type: Required. The agreement type. Possible values include: "NotSpecified", "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType - :param host_partner: Required. The integration account partner that is set as host partner for + :vartype agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :ivar host_partner: Required. The integration account partner that is set as host partner for + this agreement. + :vartype host_partner: str + :ivar guest_partner: Required. The integration account partner that is set as guest partner for this agreement. - :type host_partner: str - :param guest_partner: Required. The integration account partner that is set as guest partner - for this agreement. - :type guest_partner: str - :param host_identity: Required. The business identity of the host partner. - :type host_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param guest_identity: Required. The business identity of the guest partner. - :type guest_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param content: Required. The agreement content. - :type content: ~azure.mgmt.logic.models.AgreementContent + :vartype guest_partner: str + :ivar host_identity: Required. The business identity of the host partner. + :vartype host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar guest_identity: Required. The business identity of the guest partner. + :vartype guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar content: Required. The agreement content. + :vartype content: ~azure.mgmt.logic.models.AgreementContent """ _validation = { @@ -3458,9 +4384,32 @@ def __init__( content: "AgreementContent", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, - **kwargs - ): + metadata: Optional[Any] = None, + **kwargs + ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword metadata: The metadata. + :paramtype metadata: any + :keyword agreement_type: Required. The agreement type. Possible values include: "NotSpecified", + "AS2", "X12", "Edifact". + :paramtype agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :keyword host_partner: Required. The integration account partner that is set as host partner + for this agreement. + :paramtype host_partner: str + :keyword guest_partner: Required. The integration account partner that is set as guest partner + for this agreement. + :paramtype guest_partner: str + :keyword host_identity: Required. The business identity of the host partner. + :paramtype host_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword guest_identity: Required. The business identity of the guest partner. + :paramtype guest_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword content: Required. The agreement content. + :paramtype content: ~azure.mgmt.logic.models.AgreementContent + """ super(IntegrationAccountAgreement, self).__init__(location=location, tags=tags, **kwargs) self.created_time = None self.changed_time = None @@ -3478,9 +4427,9 @@ class IntegrationAccountAgreementFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param agreement_type: Required. The agreement type of integration account agreement. Possible + :ivar agreement_type: Required. The agreement type of integration account agreement. Possible values include: "NotSpecified", "AS2", "X12", "Edifact". - :type agreement_type: str or ~azure.mgmt.logic.models.AgreementType + :vartype agreement_type: str or ~azure.mgmt.logic.models.AgreementType """ _validation = { @@ -3497,6 +4446,11 @@ def __init__( agreement_type: Union[str, "AgreementType"], **kwargs ): + """ + :keyword agreement_type: Required. The agreement type of integration account agreement. + Possible values include: "NotSpecified", "AS2", "X12", "Edifact". + :paramtype agreement_type: str or ~azure.mgmt.logic.models.AgreementType + """ super(IntegrationAccountAgreementFilter, self).__init__(**kwargs) self.agreement_type = agreement_type @@ -3504,10 +4458,10 @@ def __init__( class IntegrationAccountAgreementListResult(msrest.serialization.Model): """The list of integration account agreements. - :param value: The list of integration account agreements. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration account agreements. + :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -3522,6 +4476,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration account agreements. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountAgreement] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationAccountAgreementListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -3538,20 +4498,20 @@ class IntegrationAccountCertificate(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~azure.mgmt.logic.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str + :ivar metadata: The metadata. + :vartype metadata: any + :ivar key: The key details in the key vault. + :vartype key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :ivar public_certificate: The public certificate. + :vartype public_certificate: str """ _validation = { @@ -3580,11 +4540,23 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, + metadata: Optional[Any] = None, key: Optional["KeyVaultKeyReference"] = None, public_certificate: Optional[str] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword metadata: The metadata. + :paramtype metadata: any + :keyword key: The key details in the key vault. + :paramtype key: ~azure.mgmt.logic.models.KeyVaultKeyReference + :keyword public_certificate: The public certificate. + :paramtype public_certificate: str + """ super(IntegrationAccountCertificate, self).__init__(location=location, tags=tags, **kwargs) self.created_time = None self.changed_time = None @@ -3596,10 +4568,10 @@ def __init__( class IntegrationAccountCertificateListResult(msrest.serialization.Model): """The list of integration account certificates. - :param value: The list of integration account certificates. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration account certificates. + :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -3614,6 +4586,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration account certificates. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountCertificate] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationAccountCertificateListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -3622,10 +4600,10 @@ def __init__( class IntegrationAccountListResult(msrest.serialization.Model): """The list of integration accounts. - :param value: The list of integration accounts. - :type value: list[~azure.mgmt.logic.models.IntegrationAccount] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration accounts. + :vartype value: list[~azure.mgmt.logic.models.IntegrationAccount] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -3640,6 +4618,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration accounts. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccount] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationAccountListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -3658,28 +4642,28 @@ class IntegrationAccountMap(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: + :vartype map_type: str or ~azure.mgmt.logic.models.MapType + :ivar parameters_schema: The parameters schema of integration account map. + :vartype parameters_schema: ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. :vartype changed_time: ~datetime.datetime - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str + :ivar content: The content. + :vartype content: str + :ivar content_type: The content type. + :vartype content_type: str :ivar content_link: The content link. :vartype content_link: ~azure.mgmt.logic.models.ContentLink - :param metadata: The metadata. - :type metadata: object + :ivar metadata: The metadata. + :vartype metadata: any """ _validation = { @@ -3717,9 +4701,27 @@ def __init__( parameters_schema: Optional["IntegrationAccountMapPropertiesParametersSchema"] = None, content: Optional[str] = None, content_type: Optional[str] = None, - metadata: Optional[object] = None, - **kwargs - ): + metadata: Optional[Any] = None, + **kwargs + ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword map_type: Required. The map type. Possible values include: "NotSpecified", "Xslt", + "Xslt20", "Xslt30", "Liquid". + :paramtype map_type: str or ~azure.mgmt.logic.models.MapType + :keyword parameters_schema: The parameters schema of integration account map. + :paramtype parameters_schema: + ~azure.mgmt.logic.models.IntegrationAccountMapPropertiesParametersSchema + :keyword content: The content. + :paramtype content: str + :keyword content_type: The content type. + :paramtype content_type: str + :keyword metadata: The metadata. + :paramtype metadata: any + """ super(IntegrationAccountMap, self).__init__(location=location, tags=tags, **kwargs) self.map_type = map_type self.parameters_schema = parameters_schema @@ -3736,9 +4738,9 @@ class IntegrationAccountMapFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param map_type: Required. The map type of integration account map. Possible values include: + :ivar map_type: Required. The map type of integration account map. Possible values include: "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". - :type map_type: str or ~azure.mgmt.logic.models.MapType + :vartype map_type: str or ~azure.mgmt.logic.models.MapType """ _validation = { @@ -3755,6 +4757,11 @@ def __init__( map_type: Union[str, "MapType"], **kwargs ): + """ + :keyword map_type: Required. The map type of integration account map. Possible values include: + "NotSpecified", "Xslt", "Xslt20", "Xslt30", "Liquid". + :paramtype map_type: str or ~azure.mgmt.logic.models.MapType + """ super(IntegrationAccountMapFilter, self).__init__(**kwargs) self.map_type = map_type @@ -3762,10 +4769,10 @@ def __init__( class IntegrationAccountMapListResult(msrest.serialization.Model): """The list of integration account maps. - :param value: The list of integration account maps. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountMap] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration account maps. + :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountMap] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -3780,6 +4787,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration account maps. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountMap] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationAccountMapListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -3788,8 +4801,8 @@ def __init__( class IntegrationAccountMapPropertiesParametersSchema(msrest.serialization.Model): """The parameters schema of integration account map. - :param ref: The reference name. - :type ref: str + :ivar ref: The reference name. + :vartype ref: str """ _attribute_map = { @@ -3802,6 +4815,10 @@ def __init__( ref: Optional[str] = None, **kwargs ): + """ + :keyword ref: The reference name. + :paramtype ref: str + """ super(IntegrationAccountMapPropertiesParametersSchema, self).__init__(**kwargs) self.ref = ref @@ -3819,21 +4836,20 @@ class IntegrationAccountPartner(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param partner_type: Required. The partner type. Possible values include: "NotSpecified", - "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar partner_type: Required. The partner type. Possible values include: "NotSpecified", "B2B". + :vartype partner_type: str or ~azure.mgmt.logic.models.PartnerType :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param content: Required. The partner content. - :type content: ~azure.mgmt.logic.models.PartnerContent + :ivar metadata: The metadata. + :vartype metadata: any + :ivar content: Required. The partner content. + :vartype content: ~azure.mgmt.logic.models.PartnerContent """ _validation = { @@ -3866,9 +4882,22 @@ def __init__( content: "PartnerContent", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - metadata: Optional[object] = None, - **kwargs - ): + metadata: Optional[Any] = None, + **kwargs + ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword partner_type: Required. The partner type. Possible values include: "NotSpecified", + "B2B". + :paramtype partner_type: str or ~azure.mgmt.logic.models.PartnerType + :keyword metadata: The metadata. + :paramtype metadata: any + :keyword content: Required. The partner content. + :paramtype content: ~azure.mgmt.logic.models.PartnerContent + """ super(IntegrationAccountPartner, self).__init__(location=location, tags=tags, **kwargs) self.partner_type = partner_type self.created_time = None @@ -3882,9 +4911,9 @@ class IntegrationAccountPartnerFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param partner_type: Required. The partner type of integration account partner. Possible values + :ivar partner_type: Required. The partner type of integration account partner. Possible values include: "NotSpecified", "B2B". - :type partner_type: str or ~azure.mgmt.logic.models.PartnerType + :vartype partner_type: str or ~azure.mgmt.logic.models.PartnerType """ _validation = { @@ -3901,6 +4930,11 @@ def __init__( partner_type: Union[str, "PartnerType"], **kwargs ): + """ + :keyword partner_type: Required. The partner type of integration account partner. Possible + values include: "NotSpecified", "B2B". + :paramtype partner_type: str or ~azure.mgmt.logic.models.PartnerType + """ super(IntegrationAccountPartnerFilter, self).__init__(**kwargs) self.partner_type = partner_type @@ -3908,10 +4942,10 @@ def __init__( class IntegrationAccountPartnerListResult(msrest.serialization.Model): """The list of integration account partners. - :param value: The list of integration account partners. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration account partners. + :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -3926,6 +4960,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration account partners. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountPartner] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationAccountPartnerListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -3944,28 +4984,28 @@ class IntegrationAccountSchema(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param schema_type: Required. The schema type. Possible values include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar schema_type: Required. The schema type. Possible values include: "NotSpecified", "Xml". + :vartype schema_type: str or ~azure.mgmt.logic.models.SchemaType + :ivar target_namespace: The target namespace of the schema. + :vartype target_namespace: str + :ivar document_name: The document name. + :vartype document_name: str + :ivar file_name: The file name. + :vartype file_name: str :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. :vartype changed_time: ~datetime.datetime - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type: The content type. - :type content_type: str + :ivar metadata: The metadata. + :vartype metadata: any + :ivar content: The content. + :vartype content: str + :ivar content_type: The content type. + :vartype content_type: str :ivar content_link: The content link. :vartype content_link: ~azure.mgmt.logic.models.ContentLink """ @@ -4007,11 +5047,32 @@ def __init__( target_namespace: Optional[str] = None, document_name: Optional[str] = None, file_name: Optional[str] = None, - metadata: Optional[object] = None, + metadata: Optional[Any] = None, content: Optional[str] = None, content_type: Optional[str] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword schema_type: Required. The schema type. Possible values include: "NotSpecified", + "Xml". + :paramtype schema_type: str or ~azure.mgmt.logic.models.SchemaType + :keyword target_namespace: The target namespace of the schema. + :paramtype target_namespace: str + :keyword document_name: The document name. + :paramtype document_name: str + :keyword file_name: The file name. + :paramtype file_name: str + :keyword metadata: The metadata. + :paramtype metadata: any + :keyword content: The content. + :paramtype content: str + :keyword content_type: The content type. + :paramtype content_type: str + """ super(IntegrationAccountSchema, self).__init__(location=location, tags=tags, **kwargs) self.schema_type = schema_type self.target_namespace = target_namespace @@ -4030,9 +5091,9 @@ class IntegrationAccountSchemaFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param schema_type: Required. The schema type of integration account schema. Possible values + :ivar schema_type: Required. The schema type of integration account schema. Possible values include: "NotSpecified", "Xml". - :type schema_type: str or ~azure.mgmt.logic.models.SchemaType + :vartype schema_type: str or ~azure.mgmt.logic.models.SchemaType """ _validation = { @@ -4049,6 +5110,11 @@ def __init__( schema_type: Union[str, "SchemaType"], **kwargs ): + """ + :keyword schema_type: Required. The schema type of integration account schema. Possible values + include: "NotSpecified", "Xml". + :paramtype schema_type: str or ~azure.mgmt.logic.models.SchemaType + """ super(IntegrationAccountSchemaFilter, self).__init__(**kwargs) self.schema_type = schema_type @@ -4056,10 +5122,10 @@ def __init__( class IntegrationAccountSchemaListResult(msrest.serialization.Model): """The list of integration account schemas. - :param value: The list of integration account schemas. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration account schemas. + :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -4074,6 +5140,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration account schemas. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountSchema] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationAccountSchemaListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -4090,16 +5162,16 @@ class IntegrationAccountSession(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] :ivar created_time: The created time. :vartype created_time: ~datetime.datetime :ivar changed_time: The changed time. :vartype changed_time: ~datetime.datetime - :param content: The session content. - :type content: object + :ivar content: The session content. + :vartype content: any """ _validation = { @@ -4126,9 +5198,17 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - content: Optional[object] = None, + content: Optional[Any] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword content: The session content. + :paramtype content: any + """ super(IntegrationAccountSession, self).__init__(location=location, tags=tags, **kwargs) self.created_time = None self.changed_time = None @@ -4140,8 +5220,8 @@ class IntegrationAccountSessionFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param changed_time: Required. The changed time of integration account sessions. - :type changed_time: ~datetime.datetime + :ivar changed_time: Required. The changed time of integration account sessions. + :vartype changed_time: ~datetime.datetime """ _validation = { @@ -4158,6 +5238,10 @@ def __init__( changed_time: datetime.datetime, **kwargs ): + """ + :keyword changed_time: Required. The changed time of integration account sessions. + :paramtype changed_time: ~datetime.datetime + """ super(IntegrationAccountSessionFilter, self).__init__(**kwargs) self.changed_time = changed_time @@ -4165,10 +5249,10 @@ def __init__( class IntegrationAccountSessionListResult(msrest.serialization.Model): """The list of integration account sessions. - :param value: The list of integration account sessions. - :type value: list[~azure.mgmt.logic.models.IntegrationAccountSession] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration account sessions. + :vartype value: list[~azure.mgmt.logic.models.IntegrationAccountSession] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -4183,6 +5267,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration account sessions. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationAccountSession] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationAccountSessionListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -4193,9 +5283,9 @@ class IntegrationAccountSku(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", + :ivar name: Required. The sku name. Possible values include: "NotSpecified", "Free", "Basic", "Standard". - :type name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + :vartype name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName """ _validation = { @@ -4212,10 +5302,81 @@ def __init__( name: Union[str, "IntegrationAccountSkuName"], **kwargs ): + """ + :keyword name: Required. The sku name. Possible values include: "NotSpecified", "Free", + "Basic", "Standard". + :paramtype name: str or ~azure.mgmt.logic.models.IntegrationAccountSkuName + """ super(IntegrationAccountSku, self).__init__(**kwargs) self.name = name +class IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): + """The encryption configuration for the integration service environment. + + :ivar encryption_key_reference: The encryption key reference. + :vartype encryption_key_reference: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionKeyReference + """ + + _attribute_map = { + 'encryption_key_reference': {'key': 'encryptionKeyReference', 'type': 'IntegrationServiceEnvironmenEncryptionKeyReference'}, + } + + def __init__( + self, + *, + encryption_key_reference: Optional["IntegrationServiceEnvironmenEncryptionKeyReference"] = None, + **kwargs + ): + """ + :keyword encryption_key_reference: The encryption key reference. + :paramtype encryption_key_reference: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionKeyReference + """ + super(IntegrationServiceEnvironmenEncryptionConfiguration, self).__init__(**kwargs) + self.encryption_key_reference = encryption_key_reference + + +class IntegrationServiceEnvironmenEncryptionKeyReference(msrest.serialization.Model): + """The encryption key details for the integration service environment. + + :ivar key_vault: The key vault reference. + :vartype key_vault: ~azure.mgmt.logic.models.ResourceReference + :ivar key_name: Gets the key name in the Key Vault. + :vartype key_name: str + :ivar key_version: Gets the version of the key specified in the keyName property. + :vartype key_version: str + """ + + _attribute_map = { + 'key_vault': {'key': 'keyVault', 'type': 'ResourceReference'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault: Optional["ResourceReference"] = None, + key_name: Optional[str] = None, + key_version: Optional[str] = None, + **kwargs + ): + """ + :keyword key_vault: The key vault reference. + :paramtype key_vault: ~azure.mgmt.logic.models.ResourceReference + :keyword key_name: Gets the key name in the Key Vault. + :paramtype key_name: str + :keyword key_version: Gets the version of the key specified in the keyName property. + :paramtype key_version: str + """ + super(IntegrationServiceEnvironmenEncryptionKeyReference, self).__init__(**kwargs) + self.key_vault = key_vault + self.key_name = key_name + self.key_version = key_version + + class IntegrationServiceEnvironment(Resource): """The integration service environment. @@ -4227,14 +5388,16 @@ class IntegrationServiceEnvironment(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar properties: The integration service environment properties. + :vartype properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku + :ivar identity: Managed service identity properties. + :vartype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity """ _validation = { @@ -4251,6 +5414,7 @@ class IntegrationServiceEnvironment(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, 'properties': {'key': 'properties', 'type': 'IntegrationServiceEnvironmentProperties'}, 'sku': {'key': 'sku', 'type': 'IntegrationServiceEnvironmentSku'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } def __init__( @@ -4260,19 +5424,33 @@ def __init__( tags: Optional[Dict[str, str]] = None, properties: Optional["IntegrationServiceEnvironmentProperties"] = None, sku: Optional["IntegrationServiceEnvironmentSku"] = None, - **kwargs - ): + identity: Optional["ManagedServiceIdentity"] = None, + **kwargs + ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword properties: The integration service environment properties. + :paramtype properties: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentProperties + :keyword sku: The sku. + :paramtype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSku + :keyword identity: Managed service identity properties. + :paramtype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity + """ super(IntegrationServiceEnvironment, self).__init__(location=location, tags=tags, **kwargs) self.properties = properties self.sku = sku + self.identity = identity class IntegrationServiceEnvironmentAccessEndpoint(msrest.serialization.Model): """The integration service environment access endpoint. - :param type: The access endpoint type. Possible values include: "NotSpecified", "External", + :ivar type: The access endpoint type. Possible values include: "NotSpecified", "External", "Internal". - :type type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType + :vartype type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType """ _attribute_map = { @@ -4285,6 +5463,12 @@ def __init__( type: Optional[Union[str, "IntegrationServiceEnvironmentAccessEndpointType"]] = None, **kwargs ): + """ + :keyword type: The access endpoint type. Possible values include: "NotSpecified", "External", + "Internal". + :paramtype type: str or + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpointType + """ super(IntegrationServiceEnvironmentAccessEndpoint, self).__init__(**kwargs) self.type = type @@ -4292,10 +5476,10 @@ def __init__( class IntegrationServiceEnvironmentListResult(msrest.serialization.Model): """The list of integration service environments. - :param value: - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: + :vartype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -4310,24 +5494,310 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: + :paramtype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationServiceEnvironmentListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link +class IntegrationServiceEnvironmentManagedApi(Resource): + """The integration service environment managed api. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str + :ivar type: Gets the resource type. + :vartype type: str + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar name_properties_name: The name. + :vartype name_properties_name: str + :ivar connection_parameters: The connection parameters. + :vartype connection_parameters: dict[str, any] + :ivar metadata: The metadata. + :vartype metadata: ~azure.mgmt.logic.models.ApiResourceMetadata + :ivar runtime_urls: The runtime urls. + :vartype runtime_urls: list[str] + :ivar general_information: The api general information. + :vartype general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation + :ivar capabilities: The capabilities. + :vartype capabilities: list[str] + :ivar backend_service: The backend service. + :vartype backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService + :ivar policies: The policies for the API. + :vartype policies: ~azure.mgmt.logic.models.ApiResourcePolicies + :ivar api_definition_url: The API definition. + :vartype api_definition_url: str + :ivar api_definitions: The api definitions. + :vartype api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions + :ivar integration_service_environment: The integration service environment reference. + :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :ivar provisioning_state: The provisioning state. Possible values include: "NotSpecified", + "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", + "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", + "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar category: The category. Possible values include: "NotSpecified", "Enterprise", + "Standard", "Premium". + :vartype category: str or ~azure.mgmt.logic.models.ApiTier + :ivar deployment_parameters: The integration service environment managed api deployment + parameters. + :vartype deployment_parameters: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'name_properties_name': {'readonly': True}, + 'connection_parameters': {'readonly': True}, + 'metadata': {'readonly': True}, + 'runtime_urls': {'readonly': True}, + 'general_information': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'backend_service': {'readonly': True}, + 'policies': {'readonly': True}, + 'api_definition_url': {'readonly': True}, + 'api_definitions': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'category': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'connection_parameters': {'key': 'properties.connectionParameters', 'type': '{object}'}, + 'metadata': {'key': 'properties.metadata', 'type': 'ApiResourceMetadata'}, + 'runtime_urls': {'key': 'properties.runtimeUrls', 'type': '[str]'}, + 'general_information': {'key': 'properties.generalInformation', 'type': 'ApiResourceGeneralInformation'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[str]'}, + 'backend_service': {'key': 'properties.backendService', 'type': 'ApiResourceBackendService'}, + 'policies': {'key': 'properties.policies', 'type': 'ApiResourcePolicies'}, + 'api_definition_url': {'key': 'properties.apiDefinitionUrl', 'type': 'str'}, + 'api_definitions': {'key': 'properties.apiDefinitions', 'type': 'ApiResourceDefinitions'}, + 'integration_service_environment': {'key': 'properties.integrationServiceEnvironment', 'type': 'ResourceReference'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'deployment_parameters': {'key': 'properties.deploymentParameters', 'type': 'IntegrationServiceEnvironmentManagedApiDeploymentParameters'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + integration_service_environment: Optional["ResourceReference"] = None, + deployment_parameters: Optional["IntegrationServiceEnvironmentManagedApiDeploymentParameters"] = None, + **kwargs + ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword integration_service_environment: The integration service environment reference. + :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :keyword deployment_parameters: The integration service environment managed api deployment + parameters. + :paramtype deployment_parameters: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters + """ + super(IntegrationServiceEnvironmentManagedApi, self).__init__(location=location, tags=tags, **kwargs) + self.name_properties_name = None + self.connection_parameters = None + self.metadata = None + self.runtime_urls = None + self.general_information = None + self.capabilities = None + self.backend_service = None + self.policies = None + self.api_definition_url = None + self.api_definitions = None + self.integration_service_environment = integration_service_environment + self.provisioning_state = None + self.category = None + self.deployment_parameters = deployment_parameters + + +class IntegrationServiceEnvironmentManagedApiDeploymentParameters(msrest.serialization.Model): + """The integration service environment managed api deployment parameters. + + :ivar content_link_definition: The integration service environment managed api content link for + deployment. + :vartype content_link_definition: ~azure.mgmt.logic.models.ContentLink + """ + + _attribute_map = { + 'content_link_definition': {'key': 'contentLinkDefinition', 'type': 'ContentLink'}, + } + + def __init__( + self, + *, + content_link_definition: Optional["ContentLink"] = None, + **kwargs + ): + """ + :keyword content_link_definition: The integration service environment managed api content link + for deployment. + :paramtype content_link_definition: ~azure.mgmt.logic.models.ContentLink + """ + super(IntegrationServiceEnvironmentManagedApiDeploymentParameters, self).__init__(**kwargs) + self.content_link_definition = content_link_definition + + +class IntegrationServiceEnvironmentManagedApiListResult(msrest.serialization.Model): + """The list of integration service environment managed APIs. + + :ivar value: The integration service environment managed APIs. + :vartype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IntegrationServiceEnvironmentManagedApi]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["IntegrationServiceEnvironmentManagedApi"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword value: The integration service environment managed APIs. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ + super(IntegrationServiceEnvironmentManagedApiListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class IntegrationServiceEnvironmentManagedApiProperties(ApiResourceProperties): + """The integration service environment managed api properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name. + :vartype name: str + :ivar connection_parameters: The connection parameters. + :vartype connection_parameters: dict[str, any] + :ivar metadata: The metadata. + :vartype metadata: ~azure.mgmt.logic.models.ApiResourceMetadata + :ivar runtime_urls: The runtime urls. + :vartype runtime_urls: list[str] + :ivar general_information: The api general information. + :vartype general_information: ~azure.mgmt.logic.models.ApiResourceGeneralInformation + :ivar capabilities: The capabilities. + :vartype capabilities: list[str] + :ivar backend_service: The backend service. + :vartype backend_service: ~azure.mgmt.logic.models.ApiResourceBackendService + :ivar policies: The policies for the API. + :vartype policies: ~azure.mgmt.logic.models.ApiResourcePolicies + :ivar api_definition_url: The API definition. + :vartype api_definition_url: str + :ivar api_definitions: The api definitions. + :vartype api_definitions: ~azure.mgmt.logic.models.ApiResourceDefinitions + :ivar integration_service_environment: The integration service environment reference. + :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :ivar provisioning_state: The provisioning state. Possible values include: "NotSpecified", + "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", + "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", + "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". + :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar category: The category. Possible values include: "NotSpecified", "Enterprise", + "Standard", "Premium". + :vartype category: str or ~azure.mgmt.logic.models.ApiTier + :ivar deployment_parameters: The integration service environment managed api deployment + parameters. + :vartype deployment_parameters: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters + """ + + _validation = { + 'name': {'readonly': True}, + 'connection_parameters': {'readonly': True}, + 'metadata': {'readonly': True}, + 'runtime_urls': {'readonly': True}, + 'general_information': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'backend_service': {'readonly': True}, + 'policies': {'readonly': True}, + 'api_definition_url': {'readonly': True}, + 'api_definitions': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'category': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'connection_parameters': {'key': 'connectionParameters', 'type': '{object}'}, + 'metadata': {'key': 'metadata', 'type': 'ApiResourceMetadata'}, + 'runtime_urls': {'key': 'runtimeUrls', 'type': '[str]'}, + 'general_information': {'key': 'generalInformation', 'type': 'ApiResourceGeneralInformation'}, + 'capabilities': {'key': 'capabilities', 'type': '[str]'}, + 'backend_service': {'key': 'backendService', 'type': 'ApiResourceBackendService'}, + 'policies': {'key': 'policies', 'type': 'ApiResourcePolicies'}, + 'api_definition_url': {'key': 'apiDefinitionUrl', 'type': 'str'}, + 'api_definitions': {'key': 'apiDefinitions', 'type': 'ApiResourceDefinitions'}, + 'integration_service_environment': {'key': 'integrationServiceEnvironment', 'type': 'ResourceReference'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'deployment_parameters': {'key': 'deploymentParameters', 'type': 'IntegrationServiceEnvironmentManagedApiDeploymentParameters'}, + } + + def __init__( + self, + *, + integration_service_environment: Optional["ResourceReference"] = None, + deployment_parameters: Optional["IntegrationServiceEnvironmentManagedApiDeploymentParameters"] = None, + **kwargs + ): + """ + :keyword integration_service_environment: The integration service environment reference. + :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :keyword deployment_parameters: The integration service environment managed api deployment + parameters. + :paramtype deployment_parameters: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiDeploymentParameters + """ + super(IntegrationServiceEnvironmentManagedApiProperties, self).__init__(integration_service_environment=integration_service_environment, **kwargs) + self.deployment_parameters = deployment_parameters + + class IntegrationServiceEnvironmentNetworkDependency(msrest.serialization.Model): """The azure async operation resource. - :param category: The network dependency category type. Possible values include: "NotSpecified", + :ivar category: The network dependency category type. Possible values include: "NotSpecified", "AzureStorage", "AzureManagement", "AzureActiveDirectory", "SSLCertificateVerification", "DiagnosticLogsAndMetrics", "IntegrationServiceEnvironmentConnectors", "RedisCache", "AccessEndpoints", "RecoveryService", "SQL", "RegionalService". - :type category: str or + :vartype category: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType - :param display_name: The display name. - :type display_name: str - :param endpoints: The endpoints. - :type endpoints: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] + :ivar display_name: The display name. + :vartype display_name: str + :ivar endpoints: The endpoints. + :vartype endpoints: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] """ _attribute_map = { @@ -4344,6 +5814,20 @@ def __init__( endpoints: Optional[List["IntegrationServiceEnvironmentNetworkEndpoint"]] = None, **kwargs ): + """ + :keyword category: The network dependency category type. Possible values include: + "NotSpecified", "AzureStorage", "AzureManagement", "AzureActiveDirectory", + "SSLCertificateVerification", "DiagnosticLogsAndMetrics", + "IntegrationServiceEnvironmentConnectors", "RedisCache", "AccessEndpoints", "RecoveryService", + "SQL", "RegionalService". + :paramtype category: str or + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyCategoryType + :keyword display_name: The display name. + :paramtype display_name: str + :keyword endpoints: The endpoints. + :paramtype endpoints: + list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndpoint] + """ super(IntegrationServiceEnvironmentNetworkDependency, self).__init__(**kwargs) self.category = category self.display_name = display_name @@ -4353,11 +5837,11 @@ def __init__( class IntegrationServiceEnvironmentNetworkDependencyHealth(msrest.serialization.Model): """The integration service environment subnet network health. - :param error: The error if any occurred during the operation. - :type error: ~azure.mgmt.logic.models.ExtendedErrorInfo - :param state: The network dependency health state. Possible values include: "NotSpecified", + :ivar error: The error if any occurred during the operation. + :vartype error: ~azure.mgmt.logic.models.ExtendedErrorInfo + :ivar state: The network dependency health state. Possible values include: "NotSpecified", "Healthy", "Unhealthy", "Unknown". - :type state: str or + :vartype state: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealthState """ @@ -4373,6 +5857,14 @@ def __init__( state: Optional[Union[str, "IntegrationServiceEnvironmentNetworkDependencyHealthState"]] = None, **kwargs ): + """ + :keyword error: The error if any occurred during the operation. + :paramtype error: ~azure.mgmt.logic.models.ExtendedErrorInfo + :keyword state: The network dependency health state. Possible values include: "NotSpecified", + "Healthy", "Unhealthy", "Unknown". + :paramtype state: str or + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealthState + """ super(IntegrationServiceEnvironmentNetworkDependencyHealth, self).__init__(**kwargs) self.error = error self.state = state @@ -4381,14 +5873,14 @@ def __init__( class IntegrationServiceEnvironmentNetworkEndpoint(msrest.serialization.Model): """The network endpoint. - :param accessibility: The accessibility state. Possible values include: "NotSpecified", + :ivar accessibility: The accessibility state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". - :type accessibility: str or + :vartype accessibility: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState - :param domain_name: The domain name. - :type domain_name: str - :param ports: The ports. - :type ports: list[str] + :ivar domain_name: The domain name. + :vartype domain_name: str + :ivar ports: The ports. + :vartype ports: list[str] """ _attribute_map = { @@ -4405,6 +5897,16 @@ def __init__( ports: Optional[List[str]] = None, **kwargs ): + """ + :keyword accessibility: The accessibility state. Possible values include: "NotSpecified", + "Unknown", "Available", "NotAvailable". + :paramtype accessibility: str or + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState + :keyword domain_name: The domain name. + :paramtype domain_name: str + :keyword ports: The ports. + :paramtype ports: list[str] + """ super(IntegrationServiceEnvironmentNetworkEndpoint, self).__init__(**kwargs) self.accessibility = accessibility self.domain_name = domain_name @@ -4414,20 +5916,23 @@ def __init__( class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): """The integration service environment properties. - :param provisioning_state: The provisioning state. Possible values include: "NotSpecified", + :ivar provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". - :type provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState - :param state: The integration service environment state. Possible values include: + :vartype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :ivar state: The integration service environment state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState - :param integration_service_environment_id: Gets the tracking id. - :type integration_service_environment_id: str - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :param network_configuration: The network configuration. - :type network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState + :ivar integration_service_environment_id: Gets the tracking id. + :vartype integration_service_environment_id: str + :ivar endpoints_configuration: The endpoints configuration. + :vartype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :ivar network_configuration: The network configuration. + :vartype network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration + :ivar encryption_configuration: The encryption configuration. + :vartype encryption_configuration: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionConfiguration """ _attribute_map = { @@ -4436,6 +5941,7 @@ class IntegrationServiceEnvironmentProperties(msrest.serialization.Model): 'integration_service_environment_id': {'key': 'integrationServiceEnvironmentId', 'type': 'str'}, 'endpoints_configuration': {'key': 'endpointsConfiguration', 'type': 'FlowEndpointsConfiguration'}, 'network_configuration': {'key': 'networkConfiguration', 'type': 'NetworkConfiguration'}, + 'encryption_configuration': {'key': 'encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, } def __init__( @@ -4446,23 +5952,44 @@ def __init__( integration_service_environment_id: Optional[str] = None, endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, network_configuration: Optional["NetworkConfiguration"] = None, - **kwargs - ): + encryption_configuration: Optional["IntegrationServiceEnvironmenEncryptionConfiguration"] = None, + **kwargs + ): + """ + :keyword provisioning_state: The provisioning state. Possible values include: "NotSpecified", + "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", + "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", + "Unregistered", "Completed", "Renewing", "Pending", "Waiting", "InProgress". + :paramtype provisioning_state: str or ~azure.mgmt.logic.models.WorkflowProvisioningState + :keyword state: The integration service environment state. Possible values include: + "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". + :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState + :keyword integration_service_environment_id: Gets the tracking id. + :paramtype integration_service_environment_id: str + :keyword endpoints_configuration: The endpoints configuration. + :paramtype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :keyword network_configuration: The network configuration. + :paramtype network_configuration: ~azure.mgmt.logic.models.NetworkConfiguration + :keyword encryption_configuration: The encryption configuration. + :paramtype encryption_configuration: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionConfiguration + """ super(IntegrationServiceEnvironmentProperties, self).__init__(**kwargs) self.provisioning_state = provisioning_state self.state = state self.integration_service_environment_id = integration_service_environment_id self.endpoints_configuration = endpoints_configuration self.network_configuration = network_configuration + self.encryption_configuration = encryption_configuration class IntegrationServiceEnvironmentSku(msrest.serialization.Model): """The integration service environment sku. - :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :param capacity: The sku capacity. - :type capacity: int + :ivar name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". + :vartype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :ivar capacity: The sku capacity. + :vartype capacity: int """ _attribute_map = { @@ -4477,6 +6004,12 @@ def __init__( capacity: Optional[int] = None, **kwargs ): + """ + :keyword name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". + :paramtype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :keyword capacity: The sku capacity. + :paramtype capacity: int + """ super(IntegrationServiceEnvironmentSku, self).__init__(**kwargs) self.name = name self.capacity = capacity @@ -4485,14 +6018,14 @@ def __init__( class IntegrationServiceEnvironmentSkuCapacity(msrest.serialization.Model): """The integration service environment sku capacity. - :param minimum: The minimum capacity. - :type minimum: int - :param maximum: The maximum capacity. - :type maximum: int - :param default: The default capacity. - :type default: int - :param scale_type: The sku scale type. Possible values include: "Manual", "Automatic", "None". - :type scale_type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType + :ivar minimum: The minimum capacity. + :vartype minimum: int + :ivar maximum: The maximum capacity. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar scale_type: The sku scale type. Possible values include: "Manual", "Automatic", "None". + :vartype scale_type: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType """ _attribute_map = { @@ -4511,6 +6044,18 @@ def __init__( scale_type: Optional[Union[str, "IntegrationServiceEnvironmentSkuScaleType"]] = None, **kwargs ): + """ + :keyword minimum: The minimum capacity. + :paramtype minimum: int + :keyword maximum: The maximum capacity. + :paramtype maximum: int + :keyword default: The default capacity. + :paramtype default: int + :keyword scale_type: The sku scale type. Possible values include: "Manual", "Automatic", + "None". + :paramtype scale_type: str or + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuScaleType + """ super(IntegrationServiceEnvironmentSkuCapacity, self).__init__(**kwargs) self.minimum = minimum self.maximum = maximum @@ -4521,12 +6066,12 @@ def __init__( class IntegrationServiceEnvironmentSkuDefinition(msrest.serialization.Model): """The integration service environment sku definition. - :param resource_type: The resource type. - :type resource_type: str - :param sku: The sku. - :type sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku - :param capacity: The sku capacity. - :type capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity + :ivar resource_type: The resource type. + :vartype resource_type: str + :ivar sku: The sku. + :vartype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku + :ivar capacity: The sku capacity. + :vartype capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity """ _attribute_map = { @@ -4543,6 +6088,14 @@ def __init__( capacity: Optional["IntegrationServiceEnvironmentSkuCapacity"] = None, **kwargs ): + """ + :keyword resource_type: The resource type. + :paramtype resource_type: str + :keyword sku: The sku. + :paramtype sku: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinitionSku + :keyword capacity: The sku capacity. + :paramtype capacity: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuCapacity + """ super(IntegrationServiceEnvironmentSkuDefinition, self).__init__(**kwargs) self.resource_type = resource_type self.sku = sku @@ -4552,10 +6105,10 @@ def __init__( class IntegrationServiceEnvironmentSkuDefinitionSku(msrest.serialization.Model): """The sku. - :param name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". - :type name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName - :param tier: The sku tier. - :type tier: str + :ivar name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". + :vartype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :ivar tier: The sku tier. + :vartype tier: str """ _attribute_map = { @@ -4570,6 +6123,12 @@ def __init__( tier: Optional[str] = None, **kwargs ): + """ + :keyword name: The sku name. Possible values include: "NotSpecified", "Premium", "Developer". + :paramtype name: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuName + :keyword tier: The sku tier. + :paramtype tier: str + """ super(IntegrationServiceEnvironmentSkuDefinitionSku, self).__init__(**kwargs) self.name = name self.tier = tier @@ -4578,10 +6137,10 @@ def __init__( class IntegrationServiceEnvironmentSkuList(msrest.serialization.Model): """The list of integration service environment skus. - :param value: The list of integration service environment skus. - :type value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of integration service environment skus. + :vartype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -4596,6 +6155,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of integration service environment skus. + :paramtype value: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuDefinition] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(IntegrationServiceEnvironmentSkuList, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -4606,15 +6171,15 @@ class IntegrationServiceEnvironmentSubnetNetworkHealth(msrest.serialization.Mode All required parameters must be populated in order to send to Azure. - :param outbound_network_dependencies: The outbound network dependencies. - :type outbound_network_dependencies: + :ivar outbound_network_dependencies: The outbound network dependencies. + :vartype outbound_network_dependencies: list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependency] - :param outbound_network_health: The integration service environment network health. - :type outbound_network_health: + :ivar outbound_network_health: The integration service environment network health. + :vartype outbound_network_health: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth - :param network_dependency_health_state: Required. The integration service environment network + :ivar network_dependency_health_state: Required. The integration service environment network health state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". - :type network_dependency_health_state: str or + :vartype network_dependency_health_state: str or ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState """ @@ -4636,6 +6201,18 @@ def __init__( outbound_network_health: Optional["IntegrationServiceEnvironmentNetworkDependencyHealth"] = None, **kwargs ): + """ + :keyword outbound_network_dependencies: The outbound network dependencies. + :paramtype outbound_network_dependencies: + list[~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependency] + :keyword outbound_network_health: The integration service environment network health. + :paramtype outbound_network_health: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkDependencyHealth + :keyword network_dependency_health_state: Required. The integration service environment network + health state. Possible values include: "NotSpecified", "Unknown", "Available", "NotAvailable". + :paramtype network_dependency_health_state: str or + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentNetworkEndPointAccessibilityState + """ super(IntegrationServiceEnvironmentSubnetNetworkHealth, self).__init__(**kwargs) self.outbound_network_dependencies = outbound_network_dependencies self.outbound_network_health = outbound_network_health @@ -4645,8 +6222,8 @@ def __init__( class IpAddress(msrest.serialization.Model): """The ip address. - :param address: The address. - :type address: str + :ivar address: The address. + :vartype address: str """ _attribute_map = { @@ -4659,6 +6236,10 @@ def __init__( address: Optional[str] = None, **kwargs ): + """ + :keyword address: The address. + :paramtype address: str + """ super(IpAddress, self).__init__(**kwargs) self.address = address @@ -4666,8 +6247,8 @@ def __init__( class IpAddressRange(msrest.serialization.Model): """The ip address range. - :param address_range: The IP address range. - :type address_range: str + :ivar address_range: The IP address range. + :vartype address_range: str """ _attribute_map = { @@ -4680,6 +6261,10 @@ def __init__( address_range: Optional[str] = None, **kwargs ): + """ + :keyword address_range: The IP address range. + :paramtype address_range: str + """ super(IpAddressRange, self).__init__(**kwargs) self.address_range = address_range @@ -4687,10 +6272,10 @@ def __init__( class JsonSchema(msrest.serialization.Model): """The JSON schema. - :param title: The JSON title. - :type title: str - :param content: The JSON content. - :type content: str + :ivar title: The JSON title. + :vartype title: str + :ivar content: The JSON content. + :vartype content: str """ _attribute_map = { @@ -4705,6 +6290,12 @@ def __init__( content: Optional[str] = None, **kwargs ): + """ + :keyword title: The JSON title. + :paramtype title: str + :keyword content: The JSON content. + :paramtype content: str + """ super(JsonSchema, self).__init__(**kwargs) self.title = title self.content = content @@ -4713,10 +6304,10 @@ def __init__( class KeyVaultKey(msrest.serialization.Model): """The key vault key. - :param kid: The key id. - :type kid: str - :param attributes: The key attributes. - :type attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + :ivar kid: The key id. + :vartype kid: str + :ivar attributes: The key attributes. + :vartype attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes """ _attribute_map = { @@ -4731,6 +6322,12 @@ def __init__( attributes: Optional["KeyVaultKeyAttributes"] = None, **kwargs ): + """ + :keyword kid: The key id. + :paramtype kid: str + :keyword attributes: The key attributes. + :paramtype attributes: ~azure.mgmt.logic.models.KeyVaultKeyAttributes + """ super(KeyVaultKey, self).__init__(**kwargs) self.kid = kid self.attributes = attributes @@ -4739,12 +6336,12 @@ def __init__( class KeyVaultKeyAttributes(msrest.serialization.Model): """The key attributes. - :param enabled: Whether the key is enabled or not. - :type enabled: bool - :param created: When the key was created. - :type created: long - :param updated: When the key was updated. - :type updated: long + :ivar enabled: Whether the key is enabled or not. + :vartype enabled: bool + :ivar created: When the key was created. + :vartype created: long + :ivar updated: When the key was updated. + :vartype updated: long """ _attribute_map = { @@ -4761,6 +6358,14 @@ def __init__( updated: Optional[int] = None, **kwargs ): + """ + :keyword enabled: Whether the key is enabled or not. + :paramtype enabled: bool + :keyword created: When the key was created. + :paramtype created: long + :keyword updated: When the key was updated. + :paramtype updated: long + """ super(KeyVaultKeyAttributes, self).__init__(**kwargs) self.enabled = enabled self.created = created @@ -4770,10 +6375,10 @@ def __init__( class KeyVaultKeyCollection(msrest.serialization.Model): """Collection of key vault keys. - :param value: The key vault keys. - :type value: list[~azure.mgmt.logic.models.KeyVaultKey] - :param skip_token: The skip token. - :type skip_token: str + :ivar value: The key vault keys. + :vartype value: list[~azure.mgmt.logic.models.KeyVaultKey] + :ivar skip_token: The skip token. + :vartype skip_token: str """ _attribute_map = { @@ -4788,6 +6393,12 @@ def __init__( skip_token: Optional[str] = None, **kwargs ): + """ + :keyword value: The key vault keys. + :paramtype value: list[~azure.mgmt.logic.models.KeyVaultKey] + :keyword skip_token: The skip token. + :paramtype skip_token: str + """ super(KeyVaultKeyCollection, self).__init__(**kwargs) self.value = value self.skip_token = skip_token @@ -4798,12 +6409,12 @@ class KeyVaultKeyReference(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault - :param key_name: Required. The private key name in key vault. - :type key_name: str - :param key_version: The private key version in key vault. - :type key_version: str + :ivar key_vault: Required. The key vault reference. + :vartype key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :ivar key_name: Required. The private key name in key vault. + :vartype key_name: str + :ivar key_version: The private key version in key vault. + :vartype key_version: str """ _validation = { @@ -4825,6 +6436,14 @@ def __init__( key_version: Optional[str] = None, **kwargs ): + """ + :keyword key_vault: Required. The key vault reference. + :paramtype key_vault: ~azure.mgmt.logic.models.KeyVaultKeyReferenceKeyVault + :keyword key_name: Required. The private key name in key vault. + :paramtype key_name: str + :keyword key_version: The private key version in key vault. + :paramtype key_version: str + """ super(KeyVaultKeyReference, self).__init__(**kwargs) self.key_vault = key_vault self.key_name = key_name @@ -4836,8 +6455,8 @@ class KeyVaultKeyReferenceKeyVault(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param id: The resource id. - :type id: str + :ivar id: The resource id. + :vartype id: str :ivar name: The resource name. :vartype name: str :ivar type: The resource type. @@ -4861,6 +6480,10 @@ def __init__( id: Optional[str] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + """ super(KeyVaultKeyReferenceKeyVault, self).__init__(**kwargs) self.id = id self.name = None @@ -4872,33 +6495,36 @@ class KeyVaultReference(ResourceReference): Variables are only populated by the server, and will be ignored when sending a request. - :param id: The resource id. - :type id: str + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The key vault name. - :type name: str """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, *, id: Optional[str] = None, - name: Optional[str] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + """ super(KeyVaultReference, self).__init__(id=id, **kwargs) - self.name = name class ListKeyVaultKeysDefinition(msrest.serialization.Model): @@ -4906,10 +6532,10 @@ class ListKeyVaultKeysDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param key_vault: Required. The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str + :ivar key_vault: Required. The key vault reference. + :vartype key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :ivar skip_token: The skip token. + :vartype skip_token: str """ _validation = { @@ -4928,6 +6554,12 @@ def __init__( skip_token: Optional[str] = None, **kwargs ): + """ + :keyword key_vault: Required. The key vault reference. + :paramtype key_vault: ~azure.mgmt.logic.models.KeyVaultReference + :keyword skip_token: The skip token. + :paramtype skip_token: str + """ super(ListKeyVaultKeysDefinition, self).__init__(**kwargs) self.key_vault = key_vault self.skip_token = skip_token @@ -4944,12 +6576,12 @@ class ManagedApi(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The api resource properties. - :type properties: ~azure.mgmt.logic.models.ApiResourceProperties + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar properties: The api resource properties. + :vartype properties: ~azure.mgmt.logic.models.ApiResourceProperties """ _validation = { @@ -4975,6 +6607,14 @@ def __init__( properties: Optional["ApiResourceProperties"] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword properties: The api resource properties. + :paramtype properties: ~azure.mgmt.logic.models.ApiResourceProperties + """ super(ManagedApi, self).__init__(location=location, tags=tags, **kwargs) self.properties = properties @@ -4982,10 +6622,10 @@ def __init__( class ManagedApiListResult(msrest.serialization.Model): """The list of managed APIs. - :param value: The managed APIs. - :type value: list[~azure.mgmt.logic.models.ManagedApi] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The managed APIs. + :vartype value: list[~azure.mgmt.logic.models.ManagedApi] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -5000,20 +6640,84 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The managed APIs. + :paramtype value: list[~azure.mgmt.logic.models.ManagedApi] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(ManagedApiListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link +class ManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Type of managed service identity. The type 'SystemAssigned' includes an + implicitly created identity. The type 'None' will remove any identities from the resource. + Possible values include: "SystemAssigned", "UserAssigned", "None". + :vartype type: str or ~azure.mgmt.logic.models.ManagedServiceIdentityType + :ivar tenant_id: Tenant of managed service identity. + :vartype tenant_id: str + :ivar principal_id: Principal Id of managed service identity. + :vartype principal_id: str + :ivar user_assigned_identities: The list of user assigned identities associated with the + resource. The user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + :vartype user_assigned_identities: dict[str, ~azure.mgmt.logic.models.UserAssignedIdentity] + """ + + _validation = { + 'type': {'required': True}, + 'tenant_id': {'readonly': True}, + 'principal_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + *, + type: Union[str, "ManagedServiceIdentityType"], + user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, + **kwargs + ): + """ + :keyword type: Required. Type of managed service identity. The type 'SystemAssigned' includes + an implicitly created identity. The type 'None' will remove any identities from the resource. + Possible values include: "SystemAssigned", "UserAssigned", "None". + :paramtype type: str or ~azure.mgmt.logic.models.ManagedServiceIdentityType + :keyword user_assigned_identities: The list of user assigned identities associated with the + resource. The user identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + :paramtype user_assigned_identities: dict[str, ~azure.mgmt.logic.models.UserAssignedIdentity] + """ + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.type = type + self.tenant_id = None + self.principal_id = None + self.user_assigned_identities = user_assigned_identities + + class NetworkConfiguration(msrest.serialization.Model): """The network configuration. - :param virtual_network_address_space: Gets the virtual network address space. - :type virtual_network_address_space: str - :param access_endpoint: The access endpoint. - :type access_endpoint: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint - :param subnets: The subnets. - :type subnets: list[~azure.mgmt.logic.models.ResourceReference] + :ivar virtual_network_address_space: Gets the virtual network address space. + :vartype virtual_network_address_space: str + :ivar access_endpoint: The access endpoint. + :vartype access_endpoint: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint + :ivar subnets: The subnets. + :vartype subnets: list[~azure.mgmt.logic.models.ResourceReference] """ _attribute_map = { @@ -5030,6 +6734,15 @@ def __init__( subnets: Optional[List["ResourceReference"]] = None, **kwargs ): + """ + :keyword virtual_network_address_space: Gets the virtual network address space. + :paramtype virtual_network_address_space: str + :keyword access_endpoint: The access endpoint. + :paramtype access_endpoint: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentAccessEndpoint + :keyword subnets: The subnets. + :paramtype subnets: list[~azure.mgmt.logic.models.ResourceReference] + """ super(NetworkConfiguration, self).__init__(**kwargs) self.virtual_network_address_space = virtual_network_address_space self.access_endpoint = access_endpoint @@ -5039,8 +6752,8 @@ def __init__( class OpenAuthenticationAccessPolicies(msrest.serialization.Model): """AuthenticationPolicy of type Open. - :param policies: Open authentication policies. - :type policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] + :ivar policies: Open authentication policies. + :vartype policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] """ _attribute_map = { @@ -5053,6 +6766,10 @@ def __init__( policies: Optional[Dict[str, "OpenAuthenticationAccessPolicy"]] = None, **kwargs ): + """ + :keyword policies: Open authentication policies. + :paramtype policies: dict[str, ~azure.mgmt.logic.models.OpenAuthenticationAccessPolicy] + """ super(OpenAuthenticationAccessPolicies, self).__init__(**kwargs) self.policies = policies @@ -5060,43 +6777,42 @@ def __init__( class OpenAuthenticationAccessPolicy(msrest.serialization.Model): """Open authentication access policy defined by user. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: Type of provider for OAuth. Default value: "AAD". - :vartype type: str - :param claims: The access policy claims. - :type claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] + :ivar type: Type of provider for OAuth. Possible values include: "AAD". + :vartype type: str or ~azure.mgmt.logic.models.OpenAuthenticationProviderType + :ivar claims: The access policy claims. + :vartype claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] """ - _validation = { - 'type': {'readonly': True, 'constant': True}, - } - _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, } - type = "AAD" - def __init__( self, *, + type: Optional[Union[str, "OpenAuthenticationProviderType"]] = None, claims: Optional[List["OpenAuthenticationPolicyClaim"]] = None, **kwargs ): + """ + :keyword type: Type of provider for OAuth. Possible values include: "AAD". + :paramtype type: str or ~azure.mgmt.logic.models.OpenAuthenticationProviderType + :keyword claims: The access policy claims. + :paramtype claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] + """ super(OpenAuthenticationAccessPolicy, self).__init__(**kwargs) - self.type = None + self.type = type self.claims = claims class OpenAuthenticationPolicyClaim(msrest.serialization.Model): """Open authentication policy claim. - :param name: The name of the claim. - :type name: str - :param value: The value of the claim. - :type value: str + :ivar name: The name of the claim. + :vartype name: str + :ivar value: The value of the claim. + :vartype value: str """ _attribute_map = { @@ -5111,6 +6827,12 @@ def __init__( value: Optional[str] = None, **kwargs ): + """ + :keyword name: The name of the claim. + :paramtype name: str + :keyword value: The value of the claim. + :paramtype value: str + """ super(OpenAuthenticationPolicyClaim, self).__init__(**kwargs) self.name = name self.value = value @@ -5119,14 +6841,14 @@ def __init__( class Operation(msrest.serialization.Model): """Logic REST API operation. - :param origin: Operation: origin. - :type origin: str - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: The object that represents the operation. - :type display: ~azure.mgmt.logic.models.OperationDisplay - :param properties: The properties. - :type properties: object + :ivar origin: Operation: origin. + :vartype origin: str + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :ivar display: The object that represents the operation. + :vartype display: ~azure.mgmt.logic.models.OperationDisplay + :ivar properties: The properties. + :vartype properties: any """ _attribute_map = { @@ -5142,9 +6864,19 @@ def __init__( origin: Optional[str] = None, name: Optional[str] = None, display: Optional["OperationDisplay"] = None, - properties: Optional[object] = None, - **kwargs - ): + properties: Optional[Any] = None, + **kwargs + ): + """ + :keyword origin: Operation: origin. + :paramtype origin: str + :keyword name: Operation name: {provider}/{resource}/{operation}. + :paramtype name: str + :keyword display: The object that represents the operation. + :paramtype display: ~azure.mgmt.logic.models.OperationDisplay + :keyword properties: The properties. + :paramtype properties: any + """ super(Operation, self).__init__(**kwargs) self.origin = origin self.name = name @@ -5155,14 +6887,14 @@ def __init__( class OperationDisplay(msrest.serialization.Model): """The object that represents the operation. - :param provider: Service provider: Microsoft.Logic. - :type provider: str - :param resource: Resource on which the operation is performed: Profile, endpoint, etc. - :type resource: str - :param operation: Operation type: Read, write, delete, etc. - :type operation: str - :param description: Operation: description. - :type description: str + :ivar provider: Service provider: Microsoft.Logic. + :vartype provider: str + :ivar resource: Resource on which the operation is performed: Profile, endpoint, etc. + :vartype resource: str + :ivar operation: Operation type: Read, write, delete, etc. + :vartype operation: str + :ivar description: Operation: description. + :vartype description: str """ _attribute_map = { @@ -5181,6 +6913,16 @@ def __init__( description: Optional[str] = None, **kwargs ): + """ + :keyword provider: Service provider: Microsoft.Logic. + :paramtype provider: str + :keyword resource: Resource on which the operation is performed: Profile, endpoint, etc. + :paramtype resource: str + :keyword operation: Operation type: Read, write, delete, etc. + :paramtype operation: str + :keyword description: Operation: description. + :paramtype description: str + """ super(OperationDisplay, self).__init__(**kwargs) self.provider = provider self.resource = resource @@ -5191,10 +6933,10 @@ def __init__( class OperationListResult(msrest.serialization.Model): """Result of the request to list Logic operations. It contains a list of operations and a URL link to get the next set of results. - :param value: List of Logic operations supported by the Logic resource provider. - :type value: list[~azure.mgmt.logic.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str + :ivar value: List of Logic operations supported by the Logic resource provider. + :vartype value: list[~azure.mgmt.logic.models.Operation] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str """ _attribute_map = { @@ -5209,6 +6951,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: List of Logic operations supported by the Logic resource provider. + :paramtype value: list[~azure.mgmt.logic.models.Operation] + :keyword next_link: URL to get the next set of operation list results if there are any. + :paramtype next_link: str + """ super(OperationListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -5217,20 +6965,20 @@ def __init__( class OperationResultProperties(msrest.serialization.Model): """The run operation result properties. - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: + :ivar start_time: The start time of the workflow scope repetition. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the workflow scope repetition. + :vartype end_time: ~datetime.datetime + :ivar correlation: The correlation properties. + :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :ivar status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: The workflow scope repetition code. + :vartype code: str + :ivar error: Anything. + :vartype error: any """ _attribute_map = { @@ -5250,9 +6998,25 @@ def __init__( correlation: Optional["RunActionCorrelation"] = None, status: Optional[Union[str, "WorkflowStatus"]] = None, code: Optional[str] = None, - error: Optional[object] = None, - **kwargs - ): + error: Optional[Any] = None, + **kwargs + ): + """ + :keyword start_time: The start time of the workflow scope repetition. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time of the workflow scope repetition. + :paramtype end_time: ~datetime.datetime + :keyword correlation: The correlation properties. + :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :keyword status: The status of the workflow scope repetition. Possible values include: + "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", + "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". + :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :keyword code: The workflow scope repetition code. + :paramtype code: str + :keyword error: Anything. + :paramtype error: any + """ super(OperationResultProperties, self).__init__(**kwargs) self.start_time = start_time self.end_time = end_time @@ -5267,36 +7031,36 @@ class OperationResult(OperationResultProperties): Variables are only populated by the server, and will be ignored when sending a request. - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: + :ivar start_time: The start time of the workflow scope repetition. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the workflow scope repetition. + :vartype end_time: ~datetime.datetime + :ivar correlation: The correlation properties. + :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :ivar status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: The workflow scope repetition code. + :vartype code: str + :ivar error: Anything. + :vartype error: any :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :ivar inputs: Gets the inputs. - :vartype inputs: object + :vartype inputs: any :ivar inputs_link: Gets the link to inputs. :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs: Gets the outputs. - :vartype outputs: object + :vartype outputs: any :ivar outputs_link: Gets the link to outputs. :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int + :vartype tracked_properties: any + :ivar retry_history: Gets the retry histories. + :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :ivar iteration_count: + :vartype iteration_count: int """ _validation = { @@ -5333,11 +7097,31 @@ def __init__( correlation: Optional["RunActionCorrelation"] = None, status: Optional[Union[str, "WorkflowStatus"]] = None, code: Optional[str] = None, - error: Optional[object] = None, + error: Optional[Any] = None, retry_history: Optional[List["RetryHistory"]] = None, iteration_count: Optional[int] = None, **kwargs ): + """ + :keyword start_time: The start time of the workflow scope repetition. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time of the workflow scope repetition. + :paramtype end_time: ~datetime.datetime + :keyword correlation: The correlation properties. + :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :keyword status: The status of the workflow scope repetition. Possible values include: + "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", + "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". + :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :keyword code: The workflow scope repetition code. + :paramtype code: str + :keyword error: Anything. + :paramtype error: any + :keyword retry_history: Gets the retry histories. + :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :keyword iteration_count: + :paramtype iteration_count: int + """ super(OperationResult, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, **kwargs) self.tracking_id = None self.inputs = None @@ -5352,8 +7136,8 @@ def __init__( class PartnerContent(msrest.serialization.Model): """The integration account partner content. - :param b2_b: The B2B partner content. - :type b2_b: ~azure.mgmt.logic.models.B2BPartnerContent + :ivar b2_b: The B2B partner content. + :vartype b2_b: ~azure.mgmt.logic.models.B2BPartnerContent """ _attribute_map = { @@ -5366,6 +7150,10 @@ def __init__( b2_b: Optional["B2BPartnerContent"] = None, **kwargs ): + """ + :keyword b2_b: The B2B partner content. + :paramtype b2_b: ~azure.mgmt.logic.models.B2BPartnerContent + """ super(PartnerContent, self).__init__(**kwargs) self.b2_b = b2_b @@ -5373,16 +7161,16 @@ def __init__( class RecurrenceSchedule(msrest.serialization.Model): """The recurrence schedule. - :param minutes: The minutes. - :type minutes: list[int] - :param hours: The hours. - :type hours: list[int] - :param week_days: The days of the week. - :type week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] - :param month_days: The month days. - :type month_days: list[int] - :param monthly_occurrences: The monthly occurrences. - :type monthly_occurrences: list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + :ivar minutes: The minutes. + :vartype minutes: list[int] + :ivar hours: The hours. + :vartype hours: list[int] + :ivar week_days: The days of the week. + :vartype week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :ivar month_days: The month days. + :vartype month_days: list[int] + :ivar monthly_occurrences: The monthly occurrences. + :vartype monthly_occurrences: list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] """ _attribute_map = { @@ -5403,6 +7191,18 @@ def __init__( monthly_occurrences: Optional[List["RecurrenceScheduleOccurrence"]] = None, **kwargs ): + """ + :keyword minutes: The minutes. + :paramtype minutes: list[int] + :keyword hours: The hours. + :paramtype hours: list[int] + :keyword week_days: The days of the week. + :paramtype week_days: list[str or ~azure.mgmt.logic.models.DaysOfWeek] + :keyword month_days: The month days. + :paramtype month_days: list[int] + :keyword monthly_occurrences: The monthly occurrences. + :paramtype monthly_occurrences: list[~azure.mgmt.logic.models.RecurrenceScheduleOccurrence] + """ super(RecurrenceSchedule, self).__init__(**kwargs) self.minutes = minutes self.hours = hours @@ -5414,11 +7214,11 @@ def __init__( class RecurrenceScheduleOccurrence(msrest.serialization.Model): """The recurrence schedule occurrence. - :param day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", + :ivar day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday". - :type day: str or ~azure.mgmt.logic.models.DayOfWeek - :param occurrence: The occurrence. - :type occurrence: int + :vartype day: str or ~azure.mgmt.logic.models.DayOfWeek + :ivar occurrence: The occurrence. + :vartype occurrence: int """ _attribute_map = { @@ -5433,6 +7233,13 @@ def __init__( occurrence: Optional[int] = None, **kwargs ): + """ + :keyword day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". + :paramtype day: str or ~azure.mgmt.logic.models.DayOfWeek + :keyword occurrence: The occurrence. + :paramtype occurrence: int + """ super(RecurrenceScheduleOccurrence, self).__init__(**kwargs) self.day = day self.occurrence = occurrence @@ -5441,8 +7248,8 @@ def __init__( class RegenerateActionParameter(msrest.serialization.Model): """The access key regenerate action content. - :param key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". - :type key_type: str or ~azure.mgmt.logic.models.KeyType + :ivar key_type: The key type. Possible values include: "NotSpecified", "Primary", "Secondary". + :vartype key_type: str or ~azure.mgmt.logic.models.KeyType """ _attribute_map = { @@ -5455,6 +7262,11 @@ def __init__( key_type: Optional[Union[str, "KeyType"]] = None, **kwargs ): + """ + :keyword key_type: The key type. Possible values include: "NotSpecified", "Primary", + "Secondary". + :paramtype key_type: str or ~azure.mgmt.logic.models.KeyType + """ super(RegenerateActionParameter, self).__init__(**kwargs) self.key_type = key_type @@ -5464,10 +7276,10 @@ class RepetitionIndex(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param scope_name: The scope. - :type scope_name: str - :param item_index: Required. The index. - :type item_index: int + :ivar scope_name: The scope. + :vartype scope_name: str + :ivar item_index: Required. The index. + :vartype item_index: int """ _validation = { @@ -5486,6 +7298,12 @@ def __init__( scope_name: Optional[str] = None, **kwargs ): + """ + :keyword scope_name: The scope. + :paramtype scope_name: str + :keyword item_index: Required. The index. + :paramtype item_index: int + """ super(RepetitionIndex, self).__init__(**kwargs) self.scope_name = scope_name self.item_index = item_index @@ -5494,12 +7312,12 @@ def __init__( class Request(msrest.serialization.Model): """A request. - :param headers: A list of all the headers attached to the request. - :type headers: object - :param uri: The destination for the request. - :type uri: str - :param method: The HTTP method used for the request. - :type method: str + :ivar headers: A list of all the headers attached to the request. + :vartype headers: any + :ivar uri: The destination for the request. + :vartype uri: str + :ivar method: The HTTP method used for the request. + :vartype method: str """ _attribute_map = { @@ -5511,11 +7329,19 @@ class Request(msrest.serialization.Model): def __init__( self, *, - headers: Optional[object] = None, + headers: Optional[Any] = None, uri: Optional[str] = None, method: Optional[str] = None, **kwargs ): + """ + :keyword headers: A list of all the headers attached to the request. + :paramtype headers: any + :keyword uri: The destination for the request. + :paramtype uri: str + :keyword method: The HTTP method used for the request. + :paramtype method: str + """ super(Request, self).__init__(**kwargs) self.headers = headers self.uri = uri @@ -5533,12 +7359,12 @@ class RequestHistory(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param properties: The request history properties. - :type properties: ~azure.mgmt.logic.models.RequestHistoryProperties + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar properties: The request history properties. + :vartype properties: ~azure.mgmt.logic.models.RequestHistoryProperties """ _validation = { @@ -5564,6 +7390,14 @@ def __init__( properties: Optional["RequestHistoryProperties"] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword properties: The request history properties. + :paramtype properties: ~azure.mgmt.logic.models.RequestHistoryProperties + """ super(RequestHistory, self).__init__(location=location, tags=tags, **kwargs) self.properties = properties @@ -5571,10 +7405,10 @@ def __init__( class RequestHistoryListResult(msrest.serialization.Model): """The list of workflow request histories. - :param value: A list of workflow request histories. - :type value: list[~azure.mgmt.logic.models.RequestHistory] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: A list of workflow request histories. + :vartype value: list[~azure.mgmt.logic.models.RequestHistory] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -5589,6 +7423,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: A list of workflow request histories. + :paramtype value: list[~azure.mgmt.logic.models.RequestHistory] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(RequestHistoryListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -5597,14 +7437,14 @@ def __init__( class RequestHistoryProperties(msrest.serialization.Model): """The request history. - :param start_time: The time the request started. - :type start_time: ~datetime.datetime - :param end_time: The time the request ended. - :type end_time: ~datetime.datetime - :param request: The request. - :type request: ~azure.mgmt.logic.models.Request - :param response: The response. - :type response: ~azure.mgmt.logic.models.Response + :ivar start_time: The time the request started. + :vartype start_time: ~datetime.datetime + :ivar end_time: The time the request ended. + :vartype end_time: ~datetime.datetime + :ivar request: The request. + :vartype request: ~azure.mgmt.logic.models.Request + :ivar response: The response. + :vartype response: ~azure.mgmt.logic.models.Response """ _attribute_map = { @@ -5623,6 +7463,16 @@ def __init__( response: Optional["Response"] = None, **kwargs ): + """ + :keyword start_time: The time the request started. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The time the request ended. + :paramtype end_time: ~datetime.datetime + :keyword request: The request. + :paramtype request: ~azure.mgmt.logic.models.Request + :keyword response: The response. + :paramtype response: ~azure.mgmt.logic.models.Response + """ super(RequestHistoryProperties, self).__init__(**kwargs) self.start_time = start_time self.end_time = end_time @@ -5633,12 +7483,12 @@ def __init__( class Response(msrest.serialization.Model): """A response. - :param headers: A list of all the headers attached to the response. - :type headers: object - :param status_code: The status code of the response. - :type status_code: int - :param body_link: Details on the location of the body content. - :type body_link: ~azure.mgmt.logic.models.ContentLink + :ivar headers: A list of all the headers attached to the response. + :vartype headers: any + :ivar status_code: The status code of the response. + :vartype status_code: int + :ivar body_link: Details on the location of the body content. + :vartype body_link: ~azure.mgmt.logic.models.ContentLink """ _attribute_map = { @@ -5650,11 +7500,19 @@ class Response(msrest.serialization.Model): def __init__( self, *, - headers: Optional[object] = None, + headers: Optional[Any] = None, status_code: Optional[int] = None, body_link: Optional["ContentLink"] = None, **kwargs ): + """ + :keyword headers: A list of all the headers attached to the response. + :paramtype headers: any + :keyword status_code: The status code of the response. + :paramtype status_code: int + :keyword body_link: Details on the location of the body content. + :paramtype body_link: ~azure.mgmt.logic.models.ContentLink + """ super(Response, self).__init__(**kwargs) self.headers = headers self.status_code = status_code @@ -5664,18 +7522,18 @@ def __init__( class RetryHistory(msrest.serialization.Model): """The retry history. - :param start_time: Gets the start time. - :type start_time: ~datetime.datetime - :param end_time: Gets the end time. - :type end_time: ~datetime.datetime - :param code: Gets the status code. - :type code: str - :param client_request_id: Gets the client request Id. - :type client_request_id: str - :param service_request_id: Gets the service request Id. - :type service_request_id: str - :param error: Gets the error response. - :type error: ~azure.mgmt.logic.models.ErrorResponse + :ivar start_time: Gets the start time. + :vartype start_time: ~datetime.datetime + :ivar end_time: Gets the end time. + :vartype end_time: ~datetime.datetime + :ivar code: Gets the status code. + :vartype code: str + :ivar client_request_id: Gets the client request Id. + :vartype client_request_id: str + :ivar service_request_id: Gets the service request Id. + :vartype service_request_id: str + :ivar error: Gets the error response. + :vartype error: ~azure.mgmt.logic.models.ErrorResponse """ _attribute_map = { @@ -5698,6 +7556,20 @@ def __init__( error: Optional["ErrorResponse"] = None, **kwargs ): + """ + :keyword start_time: Gets the start time. + :paramtype start_time: ~datetime.datetime + :keyword end_time: Gets the end time. + :paramtype end_time: ~datetime.datetime + :keyword code: Gets the status code. + :paramtype code: str + :keyword client_request_id: Gets the client request Id. + :paramtype client_request_id: str + :keyword service_request_id: Gets the service request Id. + :paramtype service_request_id: str + :keyword error: Gets the error response. + :paramtype error: ~azure.mgmt.logic.models.ErrorResponse + """ super(RetryHistory, self).__init__(**kwargs) self.start_time = start_time self.end_time = end_time @@ -5710,10 +7582,10 @@ def __init__( class RunCorrelation(msrest.serialization.Model): """The correlation properties. - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] + :ivar client_tracking_id: The client tracking identifier. + :vartype client_tracking_id: str + :ivar client_keywords: The client keywords. + :vartype client_keywords: list[str] """ _attribute_map = { @@ -5728,6 +7600,12 @@ def __init__( client_keywords: Optional[List[str]] = None, **kwargs ): + """ + :keyword client_tracking_id: The client tracking identifier. + :paramtype client_tracking_id: str + :keyword client_keywords: The client keywords. + :paramtype client_keywords: list[str] + """ super(RunCorrelation, self).__init__(**kwargs) self.client_tracking_id = client_tracking_id self.client_keywords = client_keywords @@ -5736,12 +7614,12 @@ def __init__( class RunActionCorrelation(RunCorrelation): """The workflow run action correlation properties. - :param client_tracking_id: The client tracking identifier. - :type client_tracking_id: str - :param client_keywords: The client keywords. - :type client_keywords: list[str] - :param action_tracking_id: The action tracking identifier. - :type action_tracking_id: str + :ivar client_tracking_id: The client tracking identifier. + :vartype client_tracking_id: str + :ivar client_keywords: The client keywords. + :vartype client_keywords: list[str] + :ivar action_tracking_id: The action tracking identifier. + :vartype action_tracking_id: str """ _attribute_map = { @@ -5758,6 +7636,14 @@ def __init__( action_tracking_id: Optional[str] = None, **kwargs ): + """ + :keyword client_tracking_id: The client tracking identifier. + :paramtype client_tracking_id: str + :keyword client_keywords: The client keywords. + :paramtype client_keywords: list[str] + :keyword action_tracking_id: The action tracking identifier. + :paramtype action_tracking_id: str + """ super(RunActionCorrelation, self).__init__(client_tracking_id=client_tracking_id, client_keywords=client_keywords, **kwargs) self.action_tracking_id = action_tracking_id @@ -5767,8 +7653,8 @@ class SetTriggerStateActionDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param source: Required. The source. - :type source: ~azure.mgmt.logic.models.WorkflowTriggerReference + :ivar source: Required. The source. + :vartype source: ~azure.mgmt.logic.models.WorkflowTriggerReference """ _validation = { @@ -5785,6 +7671,10 @@ def __init__( source: "WorkflowTriggerReference", **kwargs ): + """ + :keyword source: Required. The source. + :paramtype source: ~azure.mgmt.logic.models.WorkflowTriggerReference + """ super(SetTriggerStateActionDefinition, self).__init__(**kwargs) self.source = source @@ -5794,11 +7684,11 @@ class Sku(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", + :ivar name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", "Basic", "Standard", "Premium". - :type name: str or ~azure.mgmt.logic.models.SkuName - :param plan: The reference to plan. - :type plan: ~azure.mgmt.logic.models.ResourceReference + :vartype name: str or ~azure.mgmt.logic.models.SkuName + :ivar plan: The reference to plan. + :vartype plan: ~azure.mgmt.logic.models.ResourceReference """ _validation = { @@ -5817,6 +7707,13 @@ def __init__( plan: Optional["ResourceReference"] = None, **kwargs ): + """ + :keyword name: Required. The name. Possible values include: "NotSpecified", "Free", "Shared", + "Basic", "Standard", "Premium". + :paramtype name: str or ~azure.mgmt.logic.models.SkuName + :keyword plan: The reference to plan. + :paramtype plan: ~azure.mgmt.logic.models.ResourceReference + """ super(Sku, self).__init__(**kwargs) self.name = name self.plan = plan @@ -5843,6 +7740,8 @@ def __init__( self, **kwargs ): + """ + """ super(SubResource, self).__init__(**kwargs) self.id = None @@ -5850,20 +7749,19 @@ def __init__( class SwaggerCustomDynamicList(msrest.serialization.Model): """The swagger custom dynamic list. - :param operation_id: The operation id to fetch dynamic schema. - :type operation_id: str - :param built_in_operation: The built in operation. - :type built_in_operation: str - :param items_path: The path to a response property (relative to the response object, not the + :ivar operation_id: The operation id to fetch dynamic schema. + :vartype operation_id: str + :ivar built_in_operation: The built in operation. + :vartype built_in_operation: str + :ivar items_path: The path to a response property (relative to the response object, not the response body) which contains an array of dynamic value items. - :type items_path: str - :param item_value_path: The path to a property which defines the value which should be used. - :type item_value_path: str - :param item_title_path: The path to an item property which defines the display name of the - item. - :type item_title_path: str - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + :vartype items_path: str + :ivar item_value_path: The path to a property which defines the value which should be used. + :vartype item_value_path: str + :ivar item_title_path: The path to an item property which defines the display name of the item. + :vartype item_title_path: str + :ivar parameters: The parameters. + :vartype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] """ _attribute_map = { @@ -5886,6 +7784,22 @@ def __init__( parameters: Optional[Dict[str, "SwaggerCustomDynamicProperties"]] = None, **kwargs ): + """ + :keyword operation_id: The operation id to fetch dynamic schema. + :paramtype operation_id: str + :keyword built_in_operation: The built in operation. + :paramtype built_in_operation: str + :keyword items_path: The path to a response property (relative to the response object, not the + response body) which contains an array of dynamic value items. + :paramtype items_path: str + :keyword item_value_path: The path to a property which defines the value which should be used. + :paramtype item_value_path: str + :keyword item_title_path: The path to an item property which defines the display name of the + item. + :paramtype item_title_path: str + :keyword parameters: The parameters. + :paramtype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + """ super(SwaggerCustomDynamicList, self).__init__(**kwargs) self.operation_id = operation_id self.built_in_operation = built_in_operation @@ -5898,12 +7812,12 @@ def __init__( class SwaggerCustomDynamicProperties(msrest.serialization.Model): """The swagger custom dynamic properties. - :param operation_id: The operation id to fetch dynamic schema. - :type operation_id: str - :param value_path: Json pointer to the dynamic schema on the response body. - :type value_path: str - :param parameters: The operation parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + :ivar operation_id: The operation id to fetch dynamic schema. + :vartype operation_id: str + :ivar value_path: Json pointer to the dynamic schema on the response body. + :vartype value_path: str + :ivar parameters: The operation parameters. + :vartype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] """ _attribute_map = { @@ -5920,6 +7834,14 @@ def __init__( parameters: Optional[Dict[str, "SwaggerCustomDynamicProperties"]] = None, **kwargs ): + """ + :keyword operation_id: The operation id to fetch dynamic schema. + :paramtype operation_id: str + :keyword value_path: Json pointer to the dynamic schema on the response body. + :paramtype value_path: str + :keyword parameters: The operation parameters. + :paramtype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties] + """ super(SwaggerCustomDynamicProperties, self).__init__(**kwargs) self.operation_id = operation_id self.value_path = value_path @@ -5929,12 +7851,12 @@ def __init__( class SwaggerCustomDynamicSchema(msrest.serialization.Model): """The swagger custom dynamic schema. - :param operation_id: The operation id to fetch dynamic schema. - :type operation_id: str - :param value_path: Json pointer to the dynamic schema on the response body. - :type value_path: str - :param parameters: The operation parameters. - :type parameters: dict[str, object] + :ivar operation_id: The operation id to fetch dynamic schema. + :vartype operation_id: str + :ivar value_path: Json pointer to the dynamic schema on the response body. + :vartype value_path: str + :ivar parameters: The operation parameters. + :vartype parameters: dict[str, any] """ _attribute_map = { @@ -5948,9 +7870,17 @@ def __init__( *, operation_id: Optional[str] = None, value_path: Optional[str] = None, - parameters: Optional[Dict[str, object]] = None, + parameters: Optional[Dict[str, Any]] = None, **kwargs ): + """ + :keyword operation_id: The operation id to fetch dynamic schema. + :paramtype operation_id: str + :keyword value_path: Json pointer to the dynamic schema on the response body. + :paramtype value_path: str + :keyword parameters: The operation parameters. + :paramtype parameters: dict[str, any] + """ super(SwaggerCustomDynamicSchema, self).__init__(**kwargs) self.operation_id = operation_id self.value_path = value_path @@ -5960,12 +7890,12 @@ def __init__( class SwaggerCustomDynamicTree(msrest.serialization.Model): """The swagger custom dynamic tree. - :param settings: The tree settings. - :type settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings - :param open: The tree on-open configuration. - :type open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand - :param browse: The tree on-browse configuration. - :type browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + :ivar settings: The tree settings. + :vartype settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings + :ivar open: The tree on-open configuration. + :vartype open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + :ivar browse: The tree on-browse configuration. + :vartype browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand """ _attribute_map = { @@ -5982,6 +7912,14 @@ def __init__( browse: Optional["SwaggerCustomDynamicTreeCommand"] = None, **kwargs ): + """ + :keyword settings: The tree settings. + :paramtype settings: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeSettings + :keyword open: The tree on-open configuration. + :paramtype open: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + :keyword browse: The tree on-browse configuration. + :paramtype browse: ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeCommand + """ super(SwaggerCustomDynamicTree, self).__init__(**kwargs) self.settings = settings self.open = open @@ -5991,26 +7929,24 @@ def __init__( class SwaggerCustomDynamicTreeCommand(msrest.serialization.Model): """The swagger tree command. - :param operation_id: The path to an item property which defines the display name of the item. - :type operation_id: str - :param items_path: The path to an item property which defines the display name of the item. - :type items_path: str - :param item_value_path: The path to an item property which defines the display name of the - item. - :type item_value_path: str - :param item_title_path: The path to an item property which defines the display name of the + :ivar operation_id: The path to an item property which defines the display name of the item. + :vartype operation_id: str + :ivar items_path: The path to an item property which defines the display name of the item. + :vartype items_path: str + :ivar item_value_path: The path to an item property which defines the display name of the item. + :vartype item_value_path: str + :ivar item_title_path: The path to an item property which defines the display name of the item. + :vartype item_title_path: str + :ivar item_full_title_path: The path to an item property which defines the display name of the item. - :type item_title_path: str - :param item_full_title_path: The path to an item property which defines the display name of the + :vartype item_full_title_path: str + :ivar item_is_parent: The path to an item property which defines the display name of the item. + :vartype item_is_parent: str + :ivar selectable_filter: The path to an item property which defines the display name of the item. - :type item_full_title_path: str - :param item_is_parent: The path to an item property which defines the display name of the item. - :type item_is_parent: str - :param selectable_filter: The path to an item property which defines the display name of the - item. - :type selectable_filter: str - :param parameters: Dictionary of :code:``. - :type parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] + :vartype selectable_filter: str + :ivar parameters: Dictionary of :code:``. + :vartype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] """ _attribute_map = { @@ -6037,6 +7973,29 @@ def __init__( parameters: Optional[Dict[str, "SwaggerCustomDynamicTreeParameter"]] = None, **kwargs ): + """ + :keyword operation_id: The path to an item property which defines the display name of the item. + :paramtype operation_id: str + :keyword items_path: The path to an item property which defines the display name of the item. + :paramtype items_path: str + :keyword item_value_path: The path to an item property which defines the display name of the + item. + :paramtype item_value_path: str + :keyword item_title_path: The path to an item property which defines the display name of the + item. + :paramtype item_title_path: str + :keyword item_full_title_path: The path to an item property which defines the display name of + the item. + :paramtype item_full_title_path: str + :keyword item_is_parent: The path to an item property which defines the display name of the + item. + :paramtype item_is_parent: str + :keyword selectable_filter: The path to an item property which defines the display name of the + item. + :paramtype selectable_filter: str + :keyword parameters: Dictionary of :code:``. + :paramtype parameters: dict[str, ~azure.mgmt.logic.models.SwaggerCustomDynamicTreeParameter] + """ super(SwaggerCustomDynamicTreeCommand, self).__init__(**kwargs) self.operation_id = operation_id self.items_path = items_path @@ -6051,15 +8010,15 @@ def __init__( class SwaggerCustomDynamicTreeParameter(msrest.serialization.Model): """The swagger custom dynamic tree parameter. - :param selected_item_value_path: Gets or sets a path to a property in the currently selected + :ivar selected_item_value_path: Gets or sets a path to a property in the currently selected item to pass as a value to a parameter for the given operation. - :type selected_item_value_path: str - :param value: The parameter value. - :type value: object - :param parameter_reference: The parameter reference. - :type parameter_reference: str - :param required: Indicates whether the parameter is required. - :type required: bool + :vartype selected_item_value_path: str + :ivar value: The parameter value. + :vartype value: any + :ivar parameter_reference: The parameter reference. + :vartype parameter_reference: str + :ivar required: Indicates whether the parameter is required. + :vartype required: bool """ _attribute_map = { @@ -6073,11 +8032,22 @@ def __init__( self, *, selected_item_value_path: Optional[str] = None, - value: Optional[object] = None, + value: Optional[Any] = None, parameter_reference: Optional[str] = None, required: Optional[bool] = None, **kwargs ): + """ + :keyword selected_item_value_path: Gets or sets a path to a property in the currently selected + item to pass as a value to a parameter for the given operation. + :paramtype selected_item_value_path: str + :keyword value: The parameter value. + :paramtype value: any + :keyword parameter_reference: The parameter reference. + :paramtype parameter_reference: str + :keyword required: Indicates whether the parameter is required. + :paramtype required: bool + """ super(SwaggerCustomDynamicTreeParameter, self).__init__(**kwargs) self.selected_item_value_path = selected_item_value_path self.value = value @@ -6088,10 +8058,10 @@ def __init__( class SwaggerCustomDynamicTreeSettings(msrest.serialization.Model): """The swagger custom dynamic tree settings. - :param can_select_parent_nodes: Indicates whether parent nodes can be selected. - :type can_select_parent_nodes: bool - :param can_select_leaf_nodes: Indicates whether leaf nodes can be selected. - :type can_select_leaf_nodes: bool + :ivar can_select_parent_nodes: Indicates whether parent nodes can be selected. + :vartype can_select_parent_nodes: bool + :ivar can_select_leaf_nodes: Indicates whether leaf nodes can be selected. + :vartype can_select_leaf_nodes: bool """ _attribute_map = { @@ -6106,6 +8076,12 @@ def __init__( can_select_leaf_nodes: Optional[bool] = None, **kwargs ): + """ + :keyword can_select_parent_nodes: Indicates whether parent nodes can be selected. + :paramtype can_select_parent_nodes: bool + :keyword can_select_leaf_nodes: Indicates whether leaf nodes can be selected. + :paramtype can_select_leaf_nodes: bool + """ super(SwaggerCustomDynamicTreeSettings, self).__init__(**kwargs) self.can_select_parent_nodes = can_select_parent_nodes self.can_select_leaf_nodes = can_select_leaf_nodes @@ -6114,12 +8090,12 @@ def __init__( class SwaggerExternalDocumentation(msrest.serialization.Model): """The swagger external documentation. - :param description: The document description. - :type description: str - :param uri: The documentation Uri. - :type uri: str - :param extensions: The vendor extensions. - :type extensions: dict[str, object] + :ivar description: The document description. + :vartype description: str + :ivar uri: The documentation Uri. + :vartype uri: str + :ivar extensions: The vendor extensions. + :vartype extensions: dict[str, any] """ _attribute_map = { @@ -6133,9 +8109,17 @@ def __init__( *, description: Optional[str] = None, uri: Optional[str] = None, - extensions: Optional[Dict[str, object]] = None, + extensions: Optional[Dict[str, Any]] = None, **kwargs ): + """ + :keyword description: The document description. + :paramtype description: str + :keyword uri: The documentation Uri. + :paramtype uri: str + :keyword extensions: The vendor extensions. + :paramtype extensions: dict[str, any] + """ super(SwaggerExternalDocumentation, self).__init__(**kwargs) self.description = description self.uri = uri @@ -6145,48 +8129,48 @@ def __init__( class SwaggerSchema(msrest.serialization.Model): """The swagger schema. - :param ref: The reference. - :type ref: str - :param type: The type. Possible values include: "String", "Number", "Integer", "Boolean", + :ivar ref: The reference. + :vartype ref: str + :ivar type: The type. Possible values include: "String", "Number", "Integer", "Boolean", "Array", "File", "Object", "Null". - :type type: str or ~azure.mgmt.logic.models.SwaggerSchemaType - :param title: The title. - :type title: str - :param items: The items schema. - :type items: ~azure.mgmt.logic.models.SwaggerSchema - :param properties: The object properties. - :type properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] - :param additional_properties: The additional properties. - :type additional_properties: object - :param required: The object required properties. - :type required: list[str] - :param max_properties: The maximum number of allowed properties. - :type max_properties: int - :param min_properties: The minimum number of allowed properties. - :type min_properties: int - :param all_of: The schemas which must pass validation when this schema is used. - :type all_of: list[~azure.mgmt.logic.models.SwaggerSchema] - :param discriminator: The discriminator. - :type discriminator: str - :param read_only: Indicates whether this property must be present in the a request. - :type read_only: bool - :param xml: The xml representation format for a property. - :type xml: ~azure.mgmt.logic.models.SwaggerXml - :param external_docs: The external documentation. - :type external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation - :param example: The example value. - :type example: object - :param notification_url_extension: Indicates the notification url extension. If this is set, - the property's value should be a callback url for a webhook. - :type notification_url_extension: bool - :param dynamic_schema_old: The dynamic schema configuration. - :type dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema - :param dynamic_schema_new: The dynamic schema configuration. - :type dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties - :param dynamic_list_new: The dynamic list. - :type dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList - :param dynamic_tree: The dynamic values tree configuration. - :type dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree + :vartype type: str or ~azure.mgmt.logic.models.SwaggerSchemaType + :ivar title: The title. + :vartype title: str + :ivar items: The items schema. + :vartype items: ~azure.mgmt.logic.models.SwaggerSchema + :ivar properties: The object properties. + :vartype properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :ivar additional_properties: The additional properties. + :vartype additional_properties: any + :ivar required: The object required properties. + :vartype required: list[str] + :ivar max_properties: The maximum number of allowed properties. + :vartype max_properties: int + :ivar min_properties: The minimum number of allowed properties. + :vartype min_properties: int + :ivar all_of: The schemas which must pass validation when this schema is used. + :vartype all_of: list[~azure.mgmt.logic.models.SwaggerSchema] + :ivar discriminator: The discriminator. + :vartype discriminator: str + :ivar read_only: Indicates whether this property must be present in the a request. + :vartype read_only: bool + :ivar xml: The xml representation format for a property. + :vartype xml: ~azure.mgmt.logic.models.SwaggerXml + :ivar external_docs: The external documentation. + :vartype external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation + :ivar example: The example value. + :vartype example: any + :ivar notification_url_extension: Indicates the notification url extension. If this is set, the + property's value should be a callback url for a webhook. + :vartype notification_url_extension: bool + :ivar dynamic_schema_old: The dynamic schema configuration. + :vartype dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema + :ivar dynamic_schema_new: The dynamic schema configuration. + :vartype dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties + :ivar dynamic_list_new: The dynamic list. + :vartype dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList + :ivar dynamic_tree: The dynamic values tree configuration. + :vartype dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree """ _attribute_map = { @@ -6220,7 +8204,7 @@ def __init__( title: Optional[str] = None, items: Optional["SwaggerSchema"] = None, properties: Optional[Dict[str, "SwaggerSchema"]] = None, - additional_properties: Optional[object] = None, + additional_properties: Optional[Any] = None, required: Optional[List[str]] = None, max_properties: Optional[int] = None, min_properties: Optional[int] = None, @@ -6229,7 +8213,7 @@ def __init__( read_only: Optional[bool] = None, xml: Optional["SwaggerXml"] = None, external_docs: Optional["SwaggerExternalDocumentation"] = None, - example: Optional[object] = None, + example: Optional[Any] = None, notification_url_extension: Optional[bool] = None, dynamic_schema_old: Optional["SwaggerCustomDynamicSchema"] = None, dynamic_schema_new: Optional["SwaggerCustomDynamicProperties"] = None, @@ -6237,6 +8221,50 @@ def __init__( dynamic_tree: Optional["SwaggerCustomDynamicTree"] = None, **kwargs ): + """ + :keyword ref: The reference. + :paramtype ref: str + :keyword type: The type. Possible values include: "String", "Number", "Integer", "Boolean", + "Array", "File", "Object", "Null". + :paramtype type: str or ~azure.mgmt.logic.models.SwaggerSchemaType + :keyword title: The title. + :paramtype title: str + :keyword items: The items schema. + :paramtype items: ~azure.mgmt.logic.models.SwaggerSchema + :keyword properties: The object properties. + :paramtype properties: dict[str, ~azure.mgmt.logic.models.SwaggerSchema] + :keyword additional_properties: The additional properties. + :paramtype additional_properties: any + :keyword required: The object required properties. + :paramtype required: list[str] + :keyword max_properties: The maximum number of allowed properties. + :paramtype max_properties: int + :keyword min_properties: The minimum number of allowed properties. + :paramtype min_properties: int + :keyword all_of: The schemas which must pass validation when this schema is used. + :paramtype all_of: list[~azure.mgmt.logic.models.SwaggerSchema] + :keyword discriminator: The discriminator. + :paramtype discriminator: str + :keyword read_only: Indicates whether this property must be present in the a request. + :paramtype read_only: bool + :keyword xml: The xml representation format for a property. + :paramtype xml: ~azure.mgmt.logic.models.SwaggerXml + :keyword external_docs: The external documentation. + :paramtype external_docs: ~azure.mgmt.logic.models.SwaggerExternalDocumentation + :keyword example: The example value. + :paramtype example: any + :keyword notification_url_extension: Indicates the notification url extension. If this is set, + the property's value should be a callback url for a webhook. + :paramtype notification_url_extension: bool + :keyword dynamic_schema_old: The dynamic schema configuration. + :paramtype dynamic_schema_old: ~azure.mgmt.logic.models.SwaggerCustomDynamicSchema + :keyword dynamic_schema_new: The dynamic schema configuration. + :paramtype dynamic_schema_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicProperties + :keyword dynamic_list_new: The dynamic list. + :paramtype dynamic_list_new: ~azure.mgmt.logic.models.SwaggerCustomDynamicList + :keyword dynamic_tree: The dynamic values tree configuration. + :paramtype dynamic_tree: ~azure.mgmt.logic.models.SwaggerCustomDynamicTree + """ super(SwaggerSchema, self).__init__(**kwargs) self.ref = ref self.type = type @@ -6263,18 +8291,18 @@ def __init__( class SwaggerXml(msrest.serialization.Model): """The Swagger XML. - :param name: The xml element or attribute name. - :type name: str - :param namespace: The xml namespace. - :type namespace: str - :param prefix: The name prefix. - :type prefix: str - :param attribute: Indicates whether the property should be an attribute instead of an element. - :type attribute: bool - :param wrapped: Indicates whether the array elements are wrapped in a container element. - :type wrapped: bool - :param extensions: The vendor extensions. - :type extensions: dict[str, object] + :ivar name: The xml element or attribute name. + :vartype name: str + :ivar namespace: The xml namespace. + :vartype namespace: str + :ivar prefix: The name prefix. + :vartype prefix: str + :ivar attribute: Indicates whether the property should be an attribute instead of an element. + :vartype attribute: bool + :ivar wrapped: Indicates whether the array elements are wrapped in a container element. + :vartype wrapped: bool + :ivar extensions: The vendor extensions. + :vartype extensions: dict[str, any] """ _attribute_map = { @@ -6294,9 +8322,24 @@ def __init__( prefix: Optional[str] = None, attribute: Optional[bool] = None, wrapped: Optional[bool] = None, - extensions: Optional[Dict[str, object]] = None, - **kwargs - ): + extensions: Optional[Dict[str, Any]] = None, + **kwargs + ): + """ + :keyword name: The xml element or attribute name. + :paramtype name: str + :keyword namespace: The xml namespace. + :paramtype namespace: str + :keyword prefix: The name prefix. + :paramtype prefix: str + :keyword attribute: Indicates whether the property should be an attribute instead of an + element. + :paramtype attribute: bool + :keyword wrapped: Indicates whether the array elements are wrapped in a container element. + :paramtype wrapped: bool + :keyword extensions: The vendor extensions. + :paramtype extensions: dict[str, any] + """ super(SwaggerXml, self).__init__(**kwargs) self.name = name self.namespace = namespace @@ -6311,22 +8354,22 @@ class TrackingEvent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param event_level: Required. The event level. Possible values include: "LogAlways", - "Critical", "Error", "Warning", "Informational", "Verbose". - :type event_level: str or ~azure.mgmt.logic.models.EventLevel - :param event_time: Required. The event time. - :type event_time: ~datetime.datetime - :param record_type: Required. The record type. Possible values include: "NotSpecified", + :ivar event_level: Required. The event level. Possible values include: "LogAlways", "Critical", + "Error", "Warning", "Informational", "Verbose". + :vartype event_level: str or ~azure.mgmt.logic.models.EventLevel + :ivar event_time: Required. The event time. + :vartype event_time: ~datetime.datetime + :ivar record_type: Required. The record type. Possible values include: "NotSpecified", "Custom", "AS2Message", "AS2MDN", "X12Interchange", "X12FunctionalGroup", "X12TransactionSet", "X12InterchangeAcknowledgment", "X12FunctionalGroupAcknowledgment", "X12TransactionSetAcknowledgment", "EdifactInterchange", "EdifactFunctionalGroup", "EdifactTransactionSet", "EdifactInterchangeAcknowledgment", "EdifactFunctionalGroupAcknowledgment", "EdifactTransactionSetAcknowledgment". - :type record_type: str or ~azure.mgmt.logic.models.TrackingRecordType - :param record: The record. - :type record: object - :param error: The error. - :type error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + :vartype record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :ivar record: The record. + :vartype record: any + :ivar error: The error. + :vartype error: ~azure.mgmt.logic.models.TrackingEventErrorInfo """ _validation = { @@ -6349,10 +8392,28 @@ def __init__( event_level: Union[str, "EventLevel"], event_time: datetime.datetime, record_type: Union[str, "TrackingRecordType"], - record: Optional[object] = None, + record: Optional[Any] = None, error: Optional["TrackingEventErrorInfo"] = None, **kwargs ): + """ + :keyword event_level: Required. The event level. Possible values include: "LogAlways", + "Critical", "Error", "Warning", "Informational", "Verbose". + :paramtype event_level: str or ~azure.mgmt.logic.models.EventLevel + :keyword event_time: Required. The event time. + :paramtype event_time: ~datetime.datetime + :keyword record_type: Required. The record type. Possible values include: "NotSpecified", + "Custom", "AS2Message", "AS2MDN", "X12Interchange", "X12FunctionalGroup", "X12TransactionSet", + "X12InterchangeAcknowledgment", "X12FunctionalGroupAcknowledgment", + "X12TransactionSetAcknowledgment", "EdifactInterchange", "EdifactFunctionalGroup", + "EdifactTransactionSet", "EdifactInterchangeAcknowledgment", + "EdifactFunctionalGroupAcknowledgment", "EdifactTransactionSetAcknowledgment". + :paramtype record_type: str or ~azure.mgmt.logic.models.TrackingRecordType + :keyword record: The record. + :paramtype record: any + :keyword error: The error. + :paramtype error: ~azure.mgmt.logic.models.TrackingEventErrorInfo + """ super(TrackingEvent, self).__init__(**kwargs) self.event_level = event_level self.event_time = event_time @@ -6364,10 +8425,10 @@ def __init__( class TrackingEventErrorInfo(msrest.serialization.Model): """The tracking event error info. - :param message: The message. - :type message: str - :param code: The code. - :type code: str + :ivar message: The message. + :vartype message: str + :ivar code: The code. + :vartype code: str """ _attribute_map = { @@ -6382,6 +8443,12 @@ def __init__( code: Optional[str] = None, **kwargs ): + """ + :keyword message: The message. + :paramtype message: str + :keyword code: The code. + :paramtype code: str + """ super(TrackingEventErrorInfo, self).__init__(**kwargs) self.message = message self.code = code @@ -6392,13 +8459,13 @@ class TrackingEventsDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param source_type: Required. The source type. - :type source_type: str - :param track_events_options: The track events options. Possible values include: "None", + :ivar source_type: Required. The source type. + :vartype source_type: str + :ivar track_events_options: The track events options. Possible values include: "None", "DisableSourceInfoEnrich". - :type track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions - :param events: Required. The events. - :type events: list[~azure.mgmt.logic.models.TrackingEvent] + :vartype track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions + :ivar events: Required. The events. + :vartype events: list[~azure.mgmt.logic.models.TrackingEvent] """ _validation = { @@ -6420,12 +8487,53 @@ def __init__( track_events_options: Optional[Union[str, "TrackEventsOperationOptions"]] = None, **kwargs ): + """ + :keyword source_type: Required. The source type. + :paramtype source_type: str + :keyword track_events_options: The track events options. Possible values include: "None", + "DisableSourceInfoEnrich". + :paramtype track_events_options: str or ~azure.mgmt.logic.models.TrackEventsOperationOptions + :keyword events: Required. The events. + :paramtype events: list[~azure.mgmt.logic.models.TrackingEvent] + """ super(TrackingEventsDefinition, self).__init__(**kwargs) self.source_type = source_type self.track_events_options = track_events_options self.events = events +class UserAssignedIdentity(msrest.serialization.Model): + """User Assigned identity properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: Principal Id of user assigned identity. + :vartype principal_id: str + :ivar client_id: Client Id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + class Workflow(Resource): """The workflow type. @@ -6437,10 +8545,12 @@ class Workflow(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar identity: Managed service identity properties. + :vartype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity :ivar provisioning_state: Gets the provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", @@ -6450,27 +8560,27 @@ class Workflow(Resource): :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime - :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", + :ivar state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :ivar endpoints_configuration: The endpoints configuration. + :vartype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :ivar access_control: The access control configuration. + :vartype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration :ivar sku: The sku. :vartype sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + :ivar integration_account: The integration account. + :vartype integration_account: ~azure.mgmt.logic.models.ResourceReference + :ivar integration_service_environment: The integration service environment. + :vartype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :ivar definition: The definition. + :vartype definition: any + :ivar parameters: The parameters. + :vartype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] """ _validation = { @@ -6491,6 +8601,7 @@ class Workflow(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'created_time': {'key': 'properties.createdTime', 'type': 'iso-8601'}, 'changed_time': {'key': 'properties.changedTime', 'type': 'iso-8601'}, @@ -6511,16 +8622,41 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, state: Optional[Union[str, "WorkflowState"]] = None, endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, access_control: Optional["FlowAccessControlConfiguration"] = None, integration_account: Optional["ResourceReference"] = None, integration_service_environment: Optional["ResourceReference"] = None, - definition: Optional[object] = None, + definition: Optional[Any] = None, parameters: Optional[Dict[str, "WorkflowParameter"]] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword identity: Managed service identity properties. + :paramtype identity: ~azure.mgmt.logic.models.ManagedServiceIdentity + :keyword state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", + "Disabled", "Deleted", "Suspended". + :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState + :keyword endpoints_configuration: The endpoints configuration. + :paramtype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :keyword access_control: The access control configuration. + :paramtype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :keyword integration_account: The integration account. + :paramtype integration_account: ~azure.mgmt.logic.models.ResourceReference + :keyword integration_service_environment: The integration service environment. + :paramtype integration_service_environment: ~azure.mgmt.logic.models.ResourceReference + :keyword definition: The definition. + :paramtype definition: any + :keyword parameters: The parameters. + :paramtype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ super(Workflow, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity self.provisioning_state = None self.created_time = None self.changed_time = None @@ -6539,9 +8675,9 @@ def __init__( class WorkflowFilter(msrest.serialization.Model): """The workflow filter. - :param state: The state of workflows. Possible values include: "NotSpecified", "Completed", + :ivar state: The state of workflows. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState """ _attribute_map = { @@ -6554,6 +8690,11 @@ def __init__( state: Optional[Union[str, "WorkflowState"]] = None, **kwargs ): + """ + :keyword state: The state of workflows. Possible values include: "NotSpecified", "Completed", + "Enabled", "Disabled", "Deleted", "Suspended". + :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState + """ super(WorkflowFilter, self).__init__(**kwargs) self.state = state @@ -6561,10 +8702,10 @@ def __init__( class WorkflowListResult(msrest.serialization.Model): """The list of workflows. - :param value: The list of workflows. - :type value: list[~azure.mgmt.logic.models.Workflow] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: The list of workflows. + :vartype value: list[~azure.mgmt.logic.models.Workflow] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -6579,6 +8720,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: The list of workflows. + :paramtype value: list[~azure.mgmt.logic.models.Workflow] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(WorkflowListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -6587,15 +8734,15 @@ def __init__( class WorkflowParameter(msrest.serialization.Model): """The workflow parameters. - :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", - "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str + :ivar type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", + "Float", "Bool", "Array", "Object", "SecureObject". + :vartype type: str or ~azure.mgmt.logic.models.ParameterType + :ivar value: The value. + :vartype value: any + :ivar metadata: The metadata. + :vartype metadata: any + :ivar description: The description. + :vartype description: str """ _attribute_map = { @@ -6609,11 +8756,22 @@ def __init__( self, *, type: Optional[Union[str, "ParameterType"]] = None, - value: Optional[object] = None, - metadata: Optional[object] = None, + value: Optional[Any] = None, + metadata: Optional[Any] = None, description: Optional[str] = None, **kwargs ): + """ + :keyword type: The type. Possible values include: "NotSpecified", "String", "SecureString", + "Int", "Float", "Bool", "Array", "Object", "SecureObject". + :paramtype type: str or ~azure.mgmt.logic.models.ParameterType + :keyword value: The value. + :paramtype value: any + :keyword metadata: The metadata. + :paramtype metadata: any + :keyword description: The description. + :paramtype description: str + """ super(WorkflowParameter, self).__init__(**kwargs) self.type = type self.value = value @@ -6626,17 +8784,17 @@ class WorkflowOutputParameter(WorkflowParameter): Variables are only populated by the server, and will be ignored when sending a request. - :param type: The type. Possible values include: "NotSpecified", "String", "SecureString", - "Int", "Float", "Bool", "Array", "Object", "SecureObject". - :type type: str or ~azure.mgmt.logic.models.ParameterType - :param value: The value. - :type value: object - :param metadata: The metadata. - :type metadata: object - :param description: The description. - :type description: str + :ivar type: The type. Possible values include: "NotSpecified", "String", "SecureString", "Int", + "Float", "Bool", "Array", "Object", "SecureObject". + :vartype type: str or ~azure.mgmt.logic.models.ParameterType + :ivar value: The value. + :vartype value: any + :ivar metadata: The metadata. + :vartype metadata: any + :ivar description: The description. + :vartype description: str :ivar error: Gets the error. - :vartype error: object + :vartype error: any """ _validation = { @@ -6655,11 +8813,22 @@ def __init__( self, *, type: Optional[Union[str, "ParameterType"]] = None, - value: Optional[object] = None, - metadata: Optional[object] = None, + value: Optional[Any] = None, + metadata: Optional[Any] = None, description: Optional[str] = None, **kwargs ): + """ + :keyword type: The type. Possible values include: "NotSpecified", "String", "SecureString", + "Int", "Float", "Bool", "Array", "Object", "SecureObject". + :paramtype type: str or ~azure.mgmt.logic.models.ParameterType + :keyword value: The value. + :paramtype value: any + :keyword metadata: The metadata. + :paramtype metadata: any + :keyword description: The description. + :paramtype description: str + """ super(WorkflowOutputParameter, self).__init__(type=type, value=value, metadata=metadata, description=description, **kwargs) self.error = None @@ -6669,33 +8838,36 @@ class WorkflowReference(ResourceReference): Variables are only populated by the server, and will be ignored when sending a request. - :param id: The resource id. - :type id: str + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The workflow name. - :type name: str """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, *, id: Optional[str] = None, - name: Optional[str] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + """ super(WorkflowReference, self).__init__(id=id, **kwargs) - self.name = name class WorkflowRun(SubResource): @@ -6722,11 +8894,11 @@ class WorkflowRun(SubResource): :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. - :vartype error: object + :vartype error: any :ivar correlation_id: Gets the correlation id. :vartype correlation_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar correlation: The run correlation. + :vartype correlation: ~azure.mgmt.logic.models.Correlation :ivar workflow: Gets the reference to workflow version. :vartype workflow: ~azure.mgmt.logic.models.ResourceReference :ivar trigger: Gets the fired trigger. @@ -6778,6 +8950,10 @@ def __init__( correlation: Optional["Correlation"] = None, **kwargs ): + """ + :keyword correlation: The run correlation. + :paramtype correlation: ~azure.mgmt.logic.models.Correlation + """ super(WorkflowRun, self).__init__(**kwargs) self.name = None self.type = None @@ -6817,19 +8993,19 @@ class WorkflowRunAction(SubResource): :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. - :vartype error: object + :vartype error: any :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :ivar correlation: The correlation properties. + :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation :ivar inputs_link: Gets the link to inputs. :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs_link: Gets the link to outputs. :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :vartype tracked_properties: any + :ivar retry_history: Gets the retry histories. + :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] """ _validation = { @@ -6871,6 +9047,12 @@ def __init__( retry_history: Optional[List["RetryHistory"]] = None, **kwargs ): + """ + :keyword correlation: The correlation properties. + :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :keyword retry_history: Gets the retry histories. + :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] + """ super(WorkflowRunAction, self).__init__(**kwargs) self.name = None self.type = None @@ -6890,10 +9072,10 @@ def __init__( class WorkflowRunActionFilter(msrest.serialization.Model): """The workflow run action filter. - :param status: The status of workflow run action. Possible values include: "NotSpecified", + :ivar status: The status of workflow run action. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { @@ -6906,6 +9088,12 @@ def __init__( status: Optional[Union[str, "WorkflowStatus"]] = None, **kwargs ): + """ + :keyword status: The status of workflow run action. Possible values include: "NotSpecified", + "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", + "Faulted", "TimedOut", "Aborted", "Ignored". + :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ super(WorkflowRunActionFilter, self).__init__(**kwargs) self.status = status @@ -6913,10 +9101,10 @@ def __init__( class WorkflowRunActionListResult(msrest.serialization.Model): """The list of workflow run actions. - :param value: A list of workflow run actions. - :type value: list[~azure.mgmt.logic.models.WorkflowRunAction] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: A list of workflow run actions. + :vartype value: list[~azure.mgmt.logic.models.WorkflowRunAction] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -6931,6 +9119,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: A list of workflow run actions. + :paramtype value: list[~azure.mgmt.logic.models.WorkflowRunAction] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(WorkflowRunActionListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -6947,42 +9141,42 @@ class WorkflowRunActionRepetitionDefinition(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] + :ivar start_time: The start time of the workflow scope repetition. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the workflow scope repetition. + :vartype end_time: ~datetime.datetime + :ivar correlation: The correlation properties. + :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :ivar status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: The workflow scope repetition code. + :vartype code: str + :ivar error: Anything. + :vartype error: any :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :ivar inputs: Gets the inputs. - :vartype inputs: object + :vartype inputs: any :ivar inputs_link: Gets the link to inputs. :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs: Gets the outputs. - :vartype outputs: object + :vartype outputs: any :ivar outputs_link: Gets the link to outputs. :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + :vartype tracked_properties: any + :ivar retry_history: Gets the retry histories. + :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :ivar iteration_count: + :vartype iteration_count: int + :ivar repetition_indexes: The repetition indexes. + :vartype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] """ _validation = { @@ -7030,12 +9224,38 @@ def __init__( correlation: Optional["RunActionCorrelation"] = None, status: Optional[Union[str, "WorkflowStatus"]] = None, code: Optional[str] = None, - error: Optional[object] = None, + error: Optional[Any] = None, retry_history: Optional[List["RetryHistory"]] = None, iteration_count: Optional[int] = None, repetition_indexes: Optional[List["RepetitionIndex"]] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword start_time: The start time of the workflow scope repetition. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time of the workflow scope repetition. + :paramtype end_time: ~datetime.datetime + :keyword correlation: The correlation properties. + :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :keyword status: The status of the workflow scope repetition. Possible values include: + "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", + "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". + :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :keyword code: The workflow scope repetition code. + :paramtype code: str + :keyword error: Anything. + :paramtype error: any + :keyword retry_history: Gets the retry histories. + :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :keyword iteration_count: + :paramtype iteration_count: int + :keyword repetition_indexes: The repetition indexes. + :paramtype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ super(WorkflowRunActionRepetitionDefinition, self).__init__(location=location, tags=tags, **kwargs) self.start_time = start_time self.end_time = end_time @@ -7057,10 +9277,10 @@ def __init__( class WorkflowRunActionRepetitionDefinitionCollection(msrest.serialization.Model): """A collection of workflow run action repetitions. - :param next_link: The link used to get the next page of recommendations. - :type next_link: str - :param value: - :type value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + :ivar next_link: The link used to get the next page of recommendations. + :vartype next_link: str + :ivar value: + :vartype value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] """ _attribute_map = { @@ -7075,6 +9295,12 @@ def __init__( value: Optional[List["WorkflowRunActionRepetitionDefinition"]] = None, **kwargs ): + """ + :keyword next_link: The link used to get the next page of recommendations. + :paramtype next_link: str + :keyword value: + :paramtype value: list[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition] + """ super(WorkflowRunActionRepetitionDefinitionCollection, self).__init__(**kwargs) self.next_link = next_link self.value = value @@ -7085,38 +9311,38 @@ class WorkflowRunActionRepetitionProperties(OperationResult): Variables are only populated by the server, and will be ignored when sending a request. - :param start_time: The start time of the workflow scope repetition. - :type start_time: ~datetime.datetime - :param end_time: The end time of the workflow scope repetition. - :type end_time: ~datetime.datetime - :param correlation: The correlation properties. - :type correlation: ~azure.mgmt.logic.models.RunActionCorrelation - :param status: The status of the workflow scope repetition. Possible values include: + :ivar start_time: The start time of the workflow scope repetition. + :vartype start_time: ~datetime.datetime + :ivar end_time: The end time of the workflow scope repetition. + :vartype end_time: ~datetime.datetime + :ivar correlation: The correlation properties. + :vartype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :ivar status: The status of the workflow scope repetition. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus - :param code: The workflow scope repetition code. - :type code: str - :param error: Any object. - :type error: object + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :ivar code: The workflow scope repetition code. + :vartype code: str + :ivar error: Anything. + :vartype error: any :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str :ivar inputs: Gets the inputs. - :vartype inputs: object + :vartype inputs: any :ivar inputs_link: Gets the link to inputs. :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs: Gets the outputs. - :vartype outputs: object + :vartype outputs: any :ivar outputs_link: Gets the link to outputs. :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object - :param retry_history: Gets the retry histories. - :type retry_history: list[~azure.mgmt.logic.models.RetryHistory] - :param iteration_count: - :type iteration_count: int - :param repetition_indexes: The repetition indexes. - :type repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + :vartype tracked_properties: any + :ivar retry_history: Gets the retry histories. + :vartype retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :ivar iteration_count: + :vartype iteration_count: int + :ivar repetition_indexes: The repetition indexes. + :vartype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] """ _validation = { @@ -7154,12 +9380,34 @@ def __init__( correlation: Optional["RunActionCorrelation"] = None, status: Optional[Union[str, "WorkflowStatus"]] = None, code: Optional[str] = None, - error: Optional[object] = None, + error: Optional[Any] = None, retry_history: Optional[List["RetryHistory"]] = None, iteration_count: Optional[int] = None, repetition_indexes: Optional[List["RepetitionIndex"]] = None, **kwargs ): + """ + :keyword start_time: The start time of the workflow scope repetition. + :paramtype start_time: ~datetime.datetime + :keyword end_time: The end time of the workflow scope repetition. + :paramtype end_time: ~datetime.datetime + :keyword correlation: The correlation properties. + :paramtype correlation: ~azure.mgmt.logic.models.RunActionCorrelation + :keyword status: The status of the workflow scope repetition. Possible values include: + "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", + "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". + :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus + :keyword code: The workflow scope repetition code. + :paramtype code: str + :keyword error: Anything. + :paramtype error: any + :keyword retry_history: Gets the retry histories. + :paramtype retry_history: list[~azure.mgmt.logic.models.RetryHistory] + :keyword iteration_count: + :paramtype iteration_count: int + :keyword repetition_indexes: The repetition indexes. + :paramtype repetition_indexes: list[~azure.mgmt.logic.models.RepetitionIndex] + """ super(WorkflowRunActionRepetitionProperties, self).__init__(start_time=start_time, end_time=end_time, correlation=correlation, status=status, code=code, error=error, retry_history=retry_history, iteration_count=iteration_count, **kwargs) self.repetition_indexes = repetition_indexes @@ -7167,10 +9415,10 @@ def __init__( class WorkflowRunFilter(msrest.serialization.Model): """The workflow run filter. - :param status: The status of workflow run. Possible values include: "NotSpecified", "Paused", + :ivar status: The status of workflow run. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { @@ -7183,6 +9431,12 @@ def __init__( status: Optional[Union[str, "WorkflowStatus"]] = None, **kwargs ): + """ + :keyword status: The status of workflow run. Possible values include: "NotSpecified", "Paused", + "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", + "TimedOut", "Aborted", "Ignored". + :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ super(WorkflowRunFilter, self).__init__(**kwargs) self.status = status @@ -7190,10 +9444,10 @@ def __init__( class WorkflowRunListResult(msrest.serialization.Model): """The list of workflow runs. - :param value: A list of workflow runs. - :type value: list[~azure.mgmt.logic.models.WorkflowRun] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: A list of workflow runs. + :vartype value: list[~azure.mgmt.logic.models.WorkflowRun] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -7208,6 +9462,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: A list of workflow runs. + :paramtype value: list[~azure.mgmt.logic.models.WorkflowRun] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(WorkflowRunListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -7221,11 +9481,11 @@ class WorkflowRunTrigger(msrest.serialization.Model): :ivar name: Gets the name. :vartype name: str :ivar inputs: Gets the inputs. - :vartype inputs: object + :vartype inputs: any :ivar inputs_link: Gets the link to inputs. :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs: Gets the outputs. - :vartype outputs: object + :vartype outputs: any :ivar outputs_link: Gets the link to outputs. :vartype outputs_link: ~azure.mgmt.logic.models.ContentLink :ivar scheduled_time: Gets the scheduled time. @@ -7236,8 +9496,8 @@ class WorkflowRunTrigger(msrest.serialization.Model): :vartype end_time: ~datetime.datetime :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar correlation: The run correlation. + :vartype correlation: ~azure.mgmt.logic.models.Correlation :ivar code: Gets the code. :vartype code: str :ivar status: Gets the status. Possible values include: "NotSpecified", "Paused", "Running", @@ -7245,9 +9505,9 @@ class WorkflowRunTrigger(msrest.serialization.Model): "Aborted", "Ignored". :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus :ivar error: Gets the error. - :vartype error: object + :vartype error: any :ivar tracked_properties: Gets the tracked properties. - :vartype tracked_properties: object + :vartype tracked_properties: any """ _validation = { @@ -7289,6 +9549,10 @@ def __init__( correlation: Optional["Correlation"] = None, **kwargs ): + """ + :keyword correlation: The run correlation. + :paramtype correlation: ~azure.mgmt.logic.models.Correlation + """ super(WorkflowRunTrigger, self).__init__(**kwargs) self.name = None self.inputs = None @@ -7377,6 +9641,8 @@ def __init__( self, **kwargs ): + """ + """ super(WorkflowTrigger, self).__init__(**kwargs) self.name = None self.type = None @@ -7404,11 +9670,11 @@ class WorkflowTriggerCallbackUrl(msrest.serialization.Model): :vartype base_path: str :ivar relative_path: Gets the workflow trigger callback URL relative path. :vartype relative_path: str - :param relative_path_parameters: Gets the workflow trigger callback URL relative path + :ivar relative_path_parameters: Gets the workflow trigger callback URL relative path parameters. - :type relative_path_parameters: list[str] - :param queries: Gets the workflow trigger callback URL query parameters. - :type queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + :vartype relative_path_parameters: list[str] + :ivar queries: Gets the workflow trigger callback URL query parameters. + :vartype queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries """ _validation = { @@ -7434,6 +9700,13 @@ def __init__( queries: Optional["WorkflowTriggerListCallbackUrlQueries"] = None, **kwargs ): + """ + :keyword relative_path_parameters: Gets the workflow trigger callback URL relative path + parameters. + :paramtype relative_path_parameters: list[str] + :keyword queries: Gets the workflow trigger callback URL query parameters. + :paramtype queries: ~azure.mgmt.logic.models.WorkflowTriggerListCallbackUrlQueries + """ super(WorkflowTriggerCallbackUrl, self).__init__(**kwargs) self.value = None self.method = None @@ -7446,9 +9719,9 @@ def __init__( class WorkflowTriggerFilter(msrest.serialization.Model): """The workflow trigger filter. - :param state: The state of workflow trigger. Possible values include: "NotSpecified", + :ivar state: The state of workflow trigger. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState """ _attribute_map = { @@ -7461,6 +9734,11 @@ def __init__( state: Optional[Union[str, "WorkflowState"]] = None, **kwargs ): + """ + :keyword state: The state of workflow trigger. Possible values include: "NotSpecified", + "Completed", "Enabled", "Disabled", "Deleted", "Suspended". + :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState + """ super(WorkflowTriggerFilter, self).__init__(**kwargs) self.state = state @@ -7489,11 +9767,11 @@ class WorkflowTriggerHistory(SubResource): :ivar code: Gets the code. :vartype code: str :ivar error: Gets the error. - :vartype error: object + :vartype error: any :ivar tracking_id: Gets the tracking id. :vartype tracking_id: str - :param correlation: The run correlation. - :type correlation: ~azure.mgmt.logic.models.Correlation + :ivar correlation: The run correlation. + :vartype correlation: ~azure.mgmt.logic.models.Correlation :ivar inputs_link: Gets the link to input parameters. :vartype inputs_link: ~azure.mgmt.logic.models.ContentLink :ivar outputs_link: Gets the link to output parameters. @@ -7545,6 +9823,10 @@ def __init__( correlation: Optional["Correlation"] = None, **kwargs ): + """ + :keyword correlation: The run correlation. + :paramtype correlation: ~azure.mgmt.logic.models.Correlation + """ super(WorkflowTriggerHistory, self).__init__(**kwargs) self.name = None self.type = None @@ -7565,10 +9847,10 @@ def __init__( class WorkflowTriggerHistoryFilter(msrest.serialization.Model): """The workflow trigger history filter. - :param status: The status of workflow trigger history. Possible values include: "NotSpecified", + :ivar status: The status of workflow trigger history. Possible values include: "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". - :type status: str or ~azure.mgmt.logic.models.WorkflowStatus + :vartype status: str or ~azure.mgmt.logic.models.WorkflowStatus """ _attribute_map = { @@ -7581,6 +9863,12 @@ def __init__( status: Optional[Union[str, "WorkflowStatus"]] = None, **kwargs ): + """ + :keyword status: The status of workflow trigger history. Possible values include: + "NotSpecified", "Paused", "Running", "Waiting", "Succeeded", "Skipped", "Suspended", + "Cancelled", "Failed", "Faulted", "TimedOut", "Aborted", "Ignored". + :paramtype status: str or ~azure.mgmt.logic.models.WorkflowStatus + """ super(WorkflowTriggerHistoryFilter, self).__init__(**kwargs) self.status = status @@ -7588,10 +9876,10 @@ def __init__( class WorkflowTriggerHistoryListResult(msrest.serialization.Model): """The list of workflow trigger histories. - :param value: A list of workflow trigger histories. - :type value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: A list of workflow trigger histories. + :vartype value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -7606,6 +9894,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: A list of workflow trigger histories. + :paramtype value: list[~azure.mgmt.logic.models.WorkflowTriggerHistory] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(WorkflowTriggerHistoryListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -7614,16 +9908,16 @@ def __init__( class WorkflowTriggerListCallbackUrlQueries(msrest.serialization.Model): """Gets the workflow trigger callback URL query parameters. - :param api_version: The api version. - :type api_version: str - :param sp: The SAS permissions. - :type sp: str - :param sv: The SAS version. - :type sv: str - :param sig: The SAS signature. - :type sig: str - :param se: The SAS timestamp. - :type se: str + :ivar api_version: The api version. + :vartype api_version: str + :ivar sp: The SAS permissions. + :vartype sp: str + :ivar sv: The SAS version. + :vartype sv: str + :ivar sig: The SAS signature. + :vartype sig: str + :ivar se: The SAS timestamp. + :vartype se: str """ _attribute_map = { @@ -7644,6 +9938,18 @@ def __init__( se: Optional[str] = None, **kwargs ): + """ + :keyword api_version: The api version. + :paramtype api_version: str + :keyword sp: The SAS permissions. + :paramtype sp: str + :keyword sv: The SAS version. + :paramtype sv: str + :keyword sig: The SAS signature. + :paramtype sig: str + :keyword se: The SAS timestamp. + :paramtype se: str + """ super(WorkflowTriggerListCallbackUrlQueries, self).__init__(**kwargs) self.api_version = api_version self.sp = sp @@ -7655,10 +9961,10 @@ def __init__( class WorkflowTriggerListResult(msrest.serialization.Model): """The list of workflow triggers. - :param value: A list of workflow triggers. - :type value: list[~azure.mgmt.logic.models.WorkflowTrigger] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: A list of workflow triggers. + :vartype value: list[~azure.mgmt.logic.models.WorkflowTrigger] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -7673,6 +9979,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: A list of workflow triggers. + :paramtype value: list[~azure.mgmt.logic.models.WorkflowTrigger] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(WorkflowTriggerListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -7681,19 +9993,19 @@ def __init__( class WorkflowTriggerRecurrence(msrest.serialization.Model): """The workflow trigger recurrence. - :param frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", + :ivar frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", "Hour", "Day", "Week", "Month", "Year". - :type frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency - :param interval: The interval. - :type interval: int - :param start_time: The start time. - :type start_time: str - :param end_time: The end time. - :type end_time: str - :param time_zone: The time zone. - :type time_zone: str - :param schedule: The recurrence schedule. - :type schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + :vartype frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :ivar interval: The interval. + :vartype interval: int + :ivar start_time: The start time. + :vartype start_time: str + :ivar end_time: The end time. + :vartype end_time: str + :ivar time_zone: The time zone. + :vartype time_zone: str + :ivar schedule: The recurrence schedule. + :vartype schedule: ~azure.mgmt.logic.models.RecurrenceSchedule """ _attribute_map = { @@ -7716,6 +10028,21 @@ def __init__( schedule: Optional["RecurrenceSchedule"] = None, **kwargs ): + """ + :keyword frequency: The frequency. Possible values include: "NotSpecified", "Second", "Minute", + "Hour", "Day", "Week", "Month", "Year". + :paramtype frequency: str or ~azure.mgmt.logic.models.RecurrenceFrequency + :keyword interval: The interval. + :paramtype interval: int + :keyword start_time: The start time. + :paramtype start_time: str + :keyword end_time: The end time. + :paramtype end_time: str + :keyword time_zone: The time zone. + :paramtype time_zone: str + :keyword schedule: The recurrence schedule. + :paramtype schedule: ~azure.mgmt.logic.models.RecurrenceSchedule + """ super(WorkflowTriggerRecurrence, self).__init__(**kwargs) self.frequency = frequency self.interval = interval @@ -7730,26 +10057,27 @@ class WorkflowTriggerReference(ResourceReference): Variables are only populated by the server, and will be ignored when sending a request. - :param id: The resource id. - :type id: str + :ivar id: The resource id. + :vartype id: str + :ivar name: Gets the resource name. + :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param name: The workflow trigger resource reference name. - :type name: str - :param flow_name: The workflow name. - :type flow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str + :ivar flow_name: The workflow name. + :vartype flow_name: str + :ivar trigger_name: The workflow trigger name. + :vartype trigger_name: str """ _validation = { + 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'flow_name': {'key': 'flowName', 'type': 'str'}, 'trigger_name': {'key': 'triggerName', 'type': 'str'}, } @@ -7758,13 +10086,19 @@ def __init__( self, *, id: Optional[str] = None, - name: Optional[str] = None, flow_name: Optional[str] = None, trigger_name: Optional[str] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + :keyword flow_name: The workflow name. + :paramtype flow_name: str + :keyword trigger_name: The workflow trigger name. + :paramtype trigger_name: str + """ super(WorkflowTriggerReference, self).__init__(id=id, **kwargs) - self.name = name self.flow_name = flow_name self.trigger_name = trigger_name @@ -7780,10 +10114,10 @@ class WorkflowVersion(Resource): :vartype name: str :ivar type: Gets the resource type. :vartype type: str - :param location: The resource location. - :type location: str - :param tags: A set of tags. The resource tags. - :type tags: dict[str, str] + :ivar location: The resource location. + :vartype location: str + :ivar tags: A set of tags. The resource tags. + :vartype tags: dict[str, str] :ivar provisioning_state: The provisioning state. Possible values include: "NotSpecified", "Accepted", "Running", "Ready", "Creating", "Created", "Deleting", "Deleted", "Canceled", "Failed", "Succeeded", "Moving", "Updating", "Registering", "Registered", "Unregistering", @@ -7793,25 +10127,25 @@ class WorkflowVersion(Resource): :vartype created_time: ~datetime.datetime :ivar changed_time: Gets the changed time. :vartype changed_time: ~datetime.datetime - :param state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", + :ivar state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", "Disabled", "Deleted", "Suspended". - :type state: str or ~azure.mgmt.logic.models.WorkflowState + :vartype state: str or ~azure.mgmt.logic.models.WorkflowState :ivar version: Gets the version. :vartype version: str :ivar access_endpoint: Gets the access endpoint. :vartype access_endpoint: str - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration - :param access_control: The access control configuration. - :type access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :ivar endpoints_configuration: The endpoints configuration. + :vartype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :ivar access_control: The access control configuration. + :vartype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration :ivar sku: The sku. :vartype sku: ~azure.mgmt.logic.models.Sku - :param integration_account: The integration account. - :type integration_account: ~azure.mgmt.logic.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + :ivar integration_account: The integration account. + :vartype integration_account: ~azure.mgmt.logic.models.ResourceReference + :ivar definition: The definition. + :vartype definition: any + :ivar parameters: The parameters. + :vartype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] """ _validation = { @@ -7855,10 +10189,29 @@ def __init__( endpoints_configuration: Optional["FlowEndpointsConfiguration"] = None, access_control: Optional["FlowAccessControlConfiguration"] = None, integration_account: Optional["ResourceReference"] = None, - definition: Optional[object] = None, + definition: Optional[Any] = None, parameters: Optional[Dict[str, "WorkflowParameter"]] = None, **kwargs ): + """ + :keyword location: The resource location. + :paramtype location: str + :keyword tags: A set of tags. The resource tags. + :paramtype tags: dict[str, str] + :keyword state: The state. Possible values include: "NotSpecified", "Completed", "Enabled", + "Disabled", "Deleted", "Suspended". + :paramtype state: str or ~azure.mgmt.logic.models.WorkflowState + :keyword endpoints_configuration: The endpoints configuration. + :paramtype endpoints_configuration: ~azure.mgmt.logic.models.FlowEndpointsConfiguration + :keyword access_control: The access control configuration. + :paramtype access_control: ~azure.mgmt.logic.models.FlowAccessControlConfiguration + :keyword integration_account: The integration account. + :paramtype integration_account: ~azure.mgmt.logic.models.ResourceReference + :keyword definition: The definition. + :paramtype definition: any + :keyword parameters: The parameters. + :paramtype parameters: dict[str, ~azure.mgmt.logic.models.WorkflowParameter] + """ super(WorkflowVersion, self).__init__(location=location, tags=tags, **kwargs) self.provisioning_state = None self.created_time = None @@ -7877,10 +10230,10 @@ def __init__( class WorkflowVersionListResult(msrest.serialization.Model): """The list of workflow versions. - :param value: A list of workflow versions. - :type value: list[~azure.mgmt.logic.models.WorkflowVersion] - :param next_link: The URL to get the next set of results. - :type next_link: str + :ivar value: A list of workflow versions. + :vartype value: list[~azure.mgmt.logic.models.WorkflowVersion] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str """ _attribute_map = { @@ -7895,6 +10248,12 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword value: A list of workflow versions. + :paramtype value: list[~azure.mgmt.logic.models.WorkflowVersion] + :keyword next_link: The URL to get the next set of results. + :paramtype next_link: str + """ super(WorkflowVersionListResult, self).__init__(**kwargs) self.value = value self.next_link = next_link @@ -7903,10 +10262,10 @@ def __init__( class WsdlService(msrest.serialization.Model): """The WSDL service. - :param qualified_name: The qualified name. - :type qualified_name: str - :param endpoint_qualified_names: The list of endpoints' qualified names. - :type endpoint_qualified_names: list[str] + :ivar qualified_name: The qualified name. + :vartype qualified_name: str + :ivar endpoint_qualified_names: The list of endpoints' qualified names. + :vartype endpoint_qualified_names: list[str] """ _attribute_map = { @@ -7921,6 +10280,12 @@ def __init__( endpoint_qualified_names: Optional[List[str]] = None, **kwargs ): + """ + :keyword qualified_name: The qualified name. + :paramtype qualified_name: str + :keyword endpoint_qualified_names: The list of endpoints' qualified names. + :paramtype endpoint_qualified_names: list[str] + """ super(WsdlService, self).__init__(**kwargs) self.qualified_name = qualified_name self.endpoint_qualified_names = endpoint_qualified_names @@ -7931,47 +10296,47 @@ class X12AcknowledgementSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param need_technical_acknowledgement: Required. The value indicating whether technical + :ivar need_technical_acknowledgement: Required. The value indicating whether technical acknowledgement is needed. - :type need_technical_acknowledgement: bool - :param batch_technical_acknowledgements: Required. The value indicating whether to batch the + :vartype need_technical_acknowledgement: bool + :ivar batch_technical_acknowledgements: Required. The value indicating whether to batch the technical acknowledgements. - :type batch_technical_acknowledgements: bool - :param need_functional_acknowledgement: Required. The value indicating whether functional + :vartype batch_technical_acknowledgements: bool + :ivar need_functional_acknowledgement: Required. The value indicating whether functional acknowledgement is needed. - :type need_functional_acknowledgement: bool - :param functional_acknowledgement_version: The functional acknowledgement version. - :type functional_acknowledgement_version: str - :param batch_functional_acknowledgements: Required. The value indicating whether to batch + :vartype need_functional_acknowledgement: bool + :ivar functional_acknowledgement_version: The functional acknowledgement version. + :vartype functional_acknowledgement_version: str + :ivar batch_functional_acknowledgements: Required. The value indicating whether to batch functional acknowledgements. - :type batch_functional_acknowledgements: bool - :param need_implementation_acknowledgement: Required. The value indicating whether + :vartype batch_functional_acknowledgements: bool + :ivar need_implementation_acknowledgement: Required. The value indicating whether implementation acknowledgement is needed. - :type need_implementation_acknowledgement: bool - :param implementation_acknowledgement_version: The implementation acknowledgement version. - :type implementation_acknowledgement_version: str - :param batch_implementation_acknowledgements: Required. The value indicating whether to batch + :vartype need_implementation_acknowledgement: bool + :ivar implementation_acknowledgement_version: The implementation acknowledgement version. + :vartype implementation_acknowledgement_version: str + :ivar batch_implementation_acknowledgements: Required. The value indicating whether to batch implementation acknowledgements. - :type batch_implementation_acknowledgements: bool - :param need_loop_for_valid_messages: Required. The value indicating whether a loop is needed - for valid messages. - :type need_loop_for_valid_messages: bool - :param send_synchronous_acknowledgement: Required. The value indicating whether to send + :vartype batch_implementation_acknowledgements: bool + :ivar need_loop_for_valid_messages: Required. The value indicating whether a loop is needed for + valid messages. + :vartype need_loop_for_valid_messages: bool + :ivar send_synchronous_acknowledgement: Required. The value indicating whether to send synchronous acknowledgement. - :type send_synchronous_acknowledgement: bool - :param acknowledgement_control_number_prefix: The acknowledgement control number prefix. - :type acknowledgement_control_number_prefix: str - :param acknowledgement_control_number_suffix: The acknowledgement control number suffix. - :type acknowledgement_control_number_suffix: str - :param acknowledgement_control_number_lower_bound: Required. The acknowledgement control number + :vartype send_synchronous_acknowledgement: bool + :ivar acknowledgement_control_number_prefix: The acknowledgement control number prefix. + :vartype acknowledgement_control_number_prefix: str + :ivar acknowledgement_control_number_suffix: The acknowledgement control number suffix. + :vartype acknowledgement_control_number_suffix: str + :ivar acknowledgement_control_number_lower_bound: Required. The acknowledgement control number lower bound. - :type acknowledgement_control_number_lower_bound: int - :param acknowledgement_control_number_upper_bound: Required. The acknowledgement control number + :vartype acknowledgement_control_number_lower_bound: int + :ivar acknowledgement_control_number_upper_bound: Required. The acknowledgement control number upper bound. - :type acknowledgement_control_number_upper_bound: int - :param rollover_acknowledgement_control_number: Required. The value indicating whether to + :vartype acknowledgement_control_number_upper_bound: int + :ivar rollover_acknowledgement_control_number: Required. The value indicating whether to rollover acknowledgement control number. - :type rollover_acknowledgement_control_number: bool + :vartype rollover_acknowledgement_control_number: bool """ _validation = { @@ -8026,6 +10391,49 @@ def __init__( acknowledgement_control_number_suffix: Optional[str] = None, **kwargs ): + """ + :keyword need_technical_acknowledgement: Required. The value indicating whether technical + acknowledgement is needed. + :paramtype need_technical_acknowledgement: bool + :keyword batch_technical_acknowledgements: Required. The value indicating whether to batch the + technical acknowledgements. + :paramtype batch_technical_acknowledgements: bool + :keyword need_functional_acknowledgement: Required. The value indicating whether functional + acknowledgement is needed. + :paramtype need_functional_acknowledgement: bool + :keyword functional_acknowledgement_version: The functional acknowledgement version. + :paramtype functional_acknowledgement_version: str + :keyword batch_functional_acknowledgements: Required. The value indicating whether to batch + functional acknowledgements. + :paramtype batch_functional_acknowledgements: bool + :keyword need_implementation_acknowledgement: Required. The value indicating whether + implementation acknowledgement is needed. + :paramtype need_implementation_acknowledgement: bool + :keyword implementation_acknowledgement_version: The implementation acknowledgement version. + :paramtype implementation_acknowledgement_version: str + :keyword batch_implementation_acknowledgements: Required. The value indicating whether to batch + implementation acknowledgements. + :paramtype batch_implementation_acknowledgements: bool + :keyword need_loop_for_valid_messages: Required. The value indicating whether a loop is needed + for valid messages. + :paramtype need_loop_for_valid_messages: bool + :keyword send_synchronous_acknowledgement: Required. The value indicating whether to send + synchronous acknowledgement. + :paramtype send_synchronous_acknowledgement: bool + :keyword acknowledgement_control_number_prefix: The acknowledgement control number prefix. + :paramtype acknowledgement_control_number_prefix: str + :keyword acknowledgement_control_number_suffix: The acknowledgement control number suffix. + :paramtype acknowledgement_control_number_suffix: str + :keyword acknowledgement_control_number_lower_bound: Required. The acknowledgement control + number lower bound. + :paramtype acknowledgement_control_number_lower_bound: int + :keyword acknowledgement_control_number_upper_bound: Required. The acknowledgement control + number upper bound. + :paramtype acknowledgement_control_number_upper_bound: int + :keyword rollover_acknowledgement_control_number: Required. The value indicating whether to + rollover acknowledgement control number. + :paramtype rollover_acknowledgement_control_number: bool + """ super(X12AcknowledgementSettings, self).__init__(**kwargs) self.need_technical_acknowledgement = need_technical_acknowledgement self.batch_technical_acknowledgements = batch_technical_acknowledgements @@ -8049,10 +10457,10 @@ class X12AgreementContent(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param receive_agreement: Required. The X12 one-way receive agreement. - :type receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement - :param send_agreement: Required. The X12 one-way send agreement. - :type send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :ivar receive_agreement: Required. The X12 one-way receive agreement. + :vartype receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :ivar send_agreement: Required. The X12 one-way send agreement. + :vartype send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement """ _validation = { @@ -8072,6 +10480,12 @@ def __init__( send_agreement: "X12OneWayAgreement", **kwargs ): + """ + :keyword receive_agreement: Required. The X12 one-way receive agreement. + :paramtype receive_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + :keyword send_agreement: Required. The X12 one-way send agreement. + :paramtype send_agreement: ~azure.mgmt.logic.models.X12OneWayAgreement + """ super(X12AgreementContent, self).__init__(**kwargs) self.receive_agreement = receive_agreement self.send_agreement = send_agreement @@ -8082,27 +10496,27 @@ class X12DelimiterOverrides(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param protocol_version: The protocol version. - :type protocol_version: str - :param message_id: The message id. - :type message_id: str - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values + :ivar protocol_version: The protocol version. + :vartype protocol_version: str + :ivar message_id: The message id. + :vartype message_id: str + :ivar data_element_separator: Required. The data element separator. + :vartype data_element_separator: int + :ivar component_separator: Required. The component separator. + :vartype component_separator: int + :ivar segment_terminator: Required. The segment terminator. + :vartype segment_terminator: int + :ivar segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix - :param replace_character: Required. The replacement character. - :type replace_character: int - :param replace_separators_in_payload: Required. The value indicating whether to replace + :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :ivar replace_character: Required. The replacement character. + :vartype replace_character: int + :ivar replace_separators_in_payload: Required. The value indicating whether to replace separators in payload. - :type replace_separators_in_payload: bool - :param target_namespace: The target namespace on which this delimiter settings has to be + :vartype replace_separators_in_payload: bool + :ivar target_namespace: The target namespace on which this delimiter settings has to be applied. - :type target_namespace: str + :vartype target_namespace: str """ _validation = { @@ -8140,6 +10554,29 @@ def __init__( target_namespace: Optional[str] = None, **kwargs ): + """ + :keyword protocol_version: The protocol version. + :paramtype protocol_version: str + :keyword message_id: The message id. + :paramtype message_id: str + :keyword data_element_separator: Required. The data element separator. + :paramtype data_element_separator: int + :keyword component_separator: Required. The component separator. + :paramtype component_separator: int + :keyword segment_terminator: Required. The segment terminator. + :paramtype segment_terminator: int + :keyword segment_terminator_suffix: Required. The segment terminator suffix. Possible values + include: "NotSpecified", "None", "CR", "LF", "CRLF". + :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :keyword replace_character: Required. The replacement character. + :paramtype replace_character: int + :keyword replace_separators_in_payload: Required. The value indicating whether to replace + separators in payload. + :paramtype replace_separators_in_payload: bool + :keyword target_namespace: The target namespace on which this delimiter settings has to be + applied. + :paramtype target_namespace: str + """ super(X12DelimiterOverrides, self).__init__(**kwargs) self.protocol_version = protocol_version self.message_id = message_id @@ -8157,30 +10594,30 @@ class X12EnvelopeOverride(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param target_namespace: Required. The target namespace on which this envelope settings has to + :ivar target_namespace: Required. The target namespace on which this envelope settings has to be applied. - :type target_namespace: str - :param protocol_version: Required. The protocol version on which this envelope settings has to + :vartype target_namespace: str + :ivar protocol_version: Required. The protocol version on which this envelope settings has to be applied. - :type protocol_version: str - :param message_id: Required. The message id on which this envelope settings has to be applied. - :type message_id: str - :param responsible_agency_code: Required. The responsible agency code. - :type responsible_agency_code: str - :param header_version: Required. The header version. - :type header_version: str - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param functional_identifier_code: The functional identifier code. - :type functional_identifier_code: str - :param date_format: Required. The date format. Possible values include: "NotSpecified", + :vartype protocol_version: str + :ivar message_id: Required. The message id on which this envelope settings has to be applied. + :vartype message_id: str + :ivar responsible_agency_code: Required. The responsible agency code. + :vartype responsible_agency_code: str + :ivar header_version: Required. The header version. + :vartype header_version: str + :ivar sender_application_id: Required. The sender application id. + :vartype sender_application_id: str + :ivar receiver_application_id: Required. The receiver application id. + :vartype receiver_application_id: str + :ivar functional_identifier_code: The functional identifier code. + :vartype functional_identifier_code: str + :ivar date_format: Required. The date format. Possible values include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :type date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :param time_format: Required. The time format. Possible values include: "NotSpecified", "HHMM", + :vartype date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :ivar time_format: Required. The time format. Possible values include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + :vartype time_format: str or ~azure.mgmt.logic.models.X12TimeFormat """ _validation = { @@ -8223,6 +10660,33 @@ def __init__( functional_identifier_code: Optional[str] = None, **kwargs ): + """ + :keyword target_namespace: Required. The target namespace on which this envelope settings has + to be applied. + :paramtype target_namespace: str + :keyword protocol_version: Required. The protocol version on which this envelope settings has + to be applied. + :paramtype protocol_version: str + :keyword message_id: Required. The message id on which this envelope settings has to be + applied. + :paramtype message_id: str + :keyword responsible_agency_code: Required. The responsible agency code. + :paramtype responsible_agency_code: str + :keyword header_version: Required. The header version. + :paramtype header_version: str + :keyword sender_application_id: Required. The sender application id. + :paramtype sender_application_id: str + :keyword receiver_application_id: Required. The receiver application id. + :paramtype receiver_application_id: str + :keyword functional_identifier_code: The functional identifier code. + :paramtype functional_identifier_code: str + :keyword date_format: Required. The date format. Possible values include: "NotSpecified", + "CCYYMMDD", "YYMMDD". + :paramtype date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :keyword time_format: Required. The time format. Possible values include: "NotSpecified", + "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". + :paramtype time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + """ super(X12EnvelopeOverride, self).__init__(**kwargs) self.target_namespace = target_namespace self.protocol_version = protocol_version @@ -8241,67 +10705,67 @@ class X12EnvelopeSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param control_standards_id: Required. The controls standards id. - :type control_standards_id: int - :param use_control_standards_id_as_repetition_character: Required. The value indicating whether + :ivar control_standards_id: Required. The controls standards id. + :vartype control_standards_id: int + :ivar use_control_standards_id_as_repetition_character: Required. The value indicating whether to use control standards id as repetition character. - :type use_control_standards_id_as_repetition_character: bool - :param sender_application_id: Required. The sender application id. - :type sender_application_id: str - :param receiver_application_id: Required. The receiver application id. - :type receiver_application_id: str - :param control_version_number: Required. The control version number. - :type control_version_number: str - :param interchange_control_number_lower_bound: Required. The interchange control number lower + :vartype use_control_standards_id_as_repetition_character: bool + :ivar sender_application_id: Required. The sender application id. + :vartype sender_application_id: str + :ivar receiver_application_id: Required. The receiver application id. + :vartype receiver_application_id: str + :ivar control_version_number: Required. The control version number. + :vartype control_version_number: str + :ivar interchange_control_number_lower_bound: Required. The interchange control number lower bound. - :type interchange_control_number_lower_bound: int - :param interchange_control_number_upper_bound: Required. The interchange control number upper + :vartype interchange_control_number_lower_bound: int + :ivar interchange_control_number_upper_bound: Required. The interchange control number upper bound. - :type interchange_control_number_upper_bound: int - :param rollover_interchange_control_number: Required. The value indicating whether to rollover + :vartype interchange_control_number_upper_bound: int + :ivar rollover_interchange_control_number: Required. The value indicating whether to rollover interchange control number. - :type rollover_interchange_control_number: bool - :param enable_default_group_headers: Required. The value indicating whether to enable default + :vartype rollover_interchange_control_number: bool + :ivar enable_default_group_headers: Required. The value indicating whether to enable default group headers. - :type enable_default_group_headers: bool - :param functional_group_id: The functional group id. - :type functional_group_id: str - :param group_control_number_lower_bound: Required. The group control number lower bound. - :type group_control_number_lower_bound: int - :param group_control_number_upper_bound: Required. The group control number upper bound. - :type group_control_number_upper_bound: int - :param rollover_group_control_number: Required. The value indicating whether to rollover group + :vartype enable_default_group_headers: bool + :ivar functional_group_id: The functional group id. + :vartype functional_group_id: str + :ivar group_control_number_lower_bound: Required. The group control number lower bound. + :vartype group_control_number_lower_bound: int + :ivar group_control_number_upper_bound: Required. The group control number upper bound. + :vartype group_control_number_upper_bound: int + :ivar rollover_group_control_number: Required. The value indicating whether to rollover group control number. - :type rollover_group_control_number: bool - :param group_header_agency_code: Required. The group header agency code. - :type group_header_agency_code: str - :param group_header_version: Required. The group header version. - :type group_header_version: str - :param transaction_set_control_number_lower_bound: Required. The transaction set control number + :vartype rollover_group_control_number: bool + :ivar group_header_agency_code: Required. The group header agency code. + :vartype group_header_agency_code: str + :ivar group_header_version: Required. The group header version. + :vartype group_header_version: str + :ivar transaction_set_control_number_lower_bound: Required. The transaction set control number lower bound. - :type transaction_set_control_number_lower_bound: int - :param transaction_set_control_number_upper_bound: Required. The transaction set control number + :vartype transaction_set_control_number_lower_bound: int + :ivar transaction_set_control_number_upper_bound: Required. The transaction set control number upper bound. - :type transaction_set_control_number_upper_bound: int - :param rollover_transaction_set_control_number: Required. The value indicating whether to + :vartype transaction_set_control_number_upper_bound: int + :ivar rollover_transaction_set_control_number: Required. The value indicating whether to rollover transaction set control number. - :type rollover_transaction_set_control_number: bool - :param transaction_set_control_number_prefix: The transaction set control number prefix. - :type transaction_set_control_number_prefix: str - :param transaction_set_control_number_suffix: The transaction set control number suffix. - :type transaction_set_control_number_suffix: str - :param overwrite_existing_transaction_set_control_number: Required. The value indicating - whether to overwrite existing transaction set control number. - :type overwrite_existing_transaction_set_control_number: bool - :param group_header_date_format: Required. The group header date format. Possible values + :vartype rollover_transaction_set_control_number: bool + :ivar transaction_set_control_number_prefix: The transaction set control number prefix. + :vartype transaction_set_control_number_prefix: str + :ivar transaction_set_control_number_suffix: The transaction set control number suffix. + :vartype transaction_set_control_number_suffix: str + :ivar overwrite_existing_transaction_set_control_number: Required. The value indicating whether + to overwrite existing transaction set control number. + :vartype overwrite_existing_transaction_set_control_number: bool + :ivar group_header_date_format: Required. The group header date format. Possible values include: "NotSpecified", "CCYYMMDD", "YYMMDD". - :type group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat - :param group_header_time_format: Required. The group header time format. Possible values + :vartype group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :ivar group_header_time_format: Required. The group header time format. Possible values include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". - :type group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat - :param usage_indicator: Required. The usage indicator. Possible values include: "NotSpecified", + :vartype group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + :ivar usage_indicator: Required. The usage indicator. Possible values include: "NotSpecified", "Test", "Information", "Production". - :type usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + :vartype usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator """ _validation = { @@ -8384,6 +10848,69 @@ def __init__( transaction_set_control_number_suffix: Optional[str] = None, **kwargs ): + """ + :keyword control_standards_id: Required. The controls standards id. + :paramtype control_standards_id: int + :keyword use_control_standards_id_as_repetition_character: Required. The value indicating + whether to use control standards id as repetition character. + :paramtype use_control_standards_id_as_repetition_character: bool + :keyword sender_application_id: Required. The sender application id. + :paramtype sender_application_id: str + :keyword receiver_application_id: Required. The receiver application id. + :paramtype receiver_application_id: str + :keyword control_version_number: Required. The control version number. + :paramtype control_version_number: str + :keyword interchange_control_number_lower_bound: Required. The interchange control number + lower bound. + :paramtype interchange_control_number_lower_bound: int + :keyword interchange_control_number_upper_bound: Required. The interchange control number + upper bound. + :paramtype interchange_control_number_upper_bound: int + :keyword rollover_interchange_control_number: Required. The value indicating whether to + rollover interchange control number. + :paramtype rollover_interchange_control_number: bool + :keyword enable_default_group_headers: Required. The value indicating whether to enable default + group headers. + :paramtype enable_default_group_headers: bool + :keyword functional_group_id: The functional group id. + :paramtype functional_group_id: str + :keyword group_control_number_lower_bound: Required. The group control number lower bound. + :paramtype group_control_number_lower_bound: int + :keyword group_control_number_upper_bound: Required. The group control number upper bound. + :paramtype group_control_number_upper_bound: int + :keyword rollover_group_control_number: Required. The value indicating whether to rollover + group control number. + :paramtype rollover_group_control_number: bool + :keyword group_header_agency_code: Required. The group header agency code. + :paramtype group_header_agency_code: str + :keyword group_header_version: Required. The group header version. + :paramtype group_header_version: str + :keyword transaction_set_control_number_lower_bound: Required. The transaction set control + number lower bound. + :paramtype transaction_set_control_number_lower_bound: int + :keyword transaction_set_control_number_upper_bound: Required. The transaction set control + number upper bound. + :paramtype transaction_set_control_number_upper_bound: int + :keyword rollover_transaction_set_control_number: Required. The value indicating whether to + rollover transaction set control number. + :paramtype rollover_transaction_set_control_number: bool + :keyword transaction_set_control_number_prefix: The transaction set control number prefix. + :paramtype transaction_set_control_number_prefix: str + :keyword transaction_set_control_number_suffix: The transaction set control number suffix. + :paramtype transaction_set_control_number_suffix: str + :keyword overwrite_existing_transaction_set_control_number: Required. The value indicating + whether to overwrite existing transaction set control number. + :paramtype overwrite_existing_transaction_set_control_number: bool + :keyword group_header_date_format: Required. The group header date format. Possible values + include: "NotSpecified", "CCYYMMDD", "YYMMDD". + :paramtype group_header_date_format: str or ~azure.mgmt.logic.models.X12DateFormat + :keyword group_header_time_format: Required. The group header time format. Possible values + include: "NotSpecified", "HHMM", "HHMMSS", "HHMMSSdd", "HHMMSSd". + :paramtype group_header_time_format: str or ~azure.mgmt.logic.models.X12TimeFormat + :keyword usage_indicator: Required. The usage indicator. Possible values include: + "NotSpecified", "Test", "Information", "Production". + :paramtype usage_indicator: str or ~azure.mgmt.logic.models.UsageIndicator + """ super(X12EnvelopeSettings, self).__init__(**kwargs) self.control_standards_id = control_standards_id self.use_control_standards_id_as_repetition_character = use_control_standards_id_as_repetition_character @@ -8416,23 +10943,23 @@ class X12FramingSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param data_element_separator: Required. The data element separator. - :type data_element_separator: int - :param component_separator: Required. The component separator. - :type component_separator: int - :param replace_separators_in_payload: Required. The value indicating whether to replace + :ivar data_element_separator: Required. The data element separator. + :vartype data_element_separator: int + :ivar component_separator: Required. The component separator. + :vartype component_separator: int + :ivar replace_separators_in_payload: Required. The value indicating whether to replace separators in payload. - :type replace_separators_in_payload: bool - :param replace_character: Required. The replacement character. - :type replace_character: int - :param segment_terminator: Required. The segment terminator. - :type segment_terminator: int - :param character_set: Required. The X12 character set. Possible values include: "NotSpecified", + :vartype replace_separators_in_payload: bool + :ivar replace_character: Required. The replacement character. + :vartype replace_character: int + :ivar segment_terminator: Required. The segment terminator. + :vartype segment_terminator: int + :ivar character_set: Required. The X12 character set. Possible values include: "NotSpecified", "Basic", "Extended", "UTF8". - :type character_set: str or ~azure.mgmt.logic.models.X12CharacterSet - :param segment_terminator_suffix: Required. The segment terminator suffix. Possible values + :vartype character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :ivar segment_terminator_suffix: Required. The segment terminator suffix. Possible values include: "NotSpecified", "None", "CR", "LF", "CRLF". - :type segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + :vartype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix """ _validation = { @@ -8467,6 +10994,25 @@ def __init__( segment_terminator_suffix: Union[str, "SegmentTerminatorSuffix"], **kwargs ): + """ + :keyword data_element_separator: Required. The data element separator. + :paramtype data_element_separator: int + :keyword component_separator: Required. The component separator. + :paramtype component_separator: int + :keyword replace_separators_in_payload: Required. The value indicating whether to replace + separators in payload. + :paramtype replace_separators_in_payload: bool + :keyword replace_character: Required. The replacement character. + :paramtype replace_character: int + :keyword segment_terminator: Required. The segment terminator. + :paramtype segment_terminator: int + :keyword character_set: Required. The X12 character set. Possible values include: + "NotSpecified", "Basic", "Extended", "UTF8". + :paramtype character_set: str or ~azure.mgmt.logic.models.X12CharacterSet + :keyword segment_terminator_suffix: Required. The segment terminator suffix. Possible values + include: "NotSpecified", "None", "CR", "LF", "CRLF". + :paramtype segment_terminator_suffix: str or ~azure.mgmt.logic.models.SegmentTerminatorSuffix + """ super(X12FramingSettings, self).__init__(**kwargs) self.data_element_separator = data_element_separator self.component_separator = component_separator @@ -8482,9 +11028,9 @@ class X12MessageFilter(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_filter_type: Required. The message filter type. Possible values include: + :ivar message_filter_type: Required. The message filter type. Possible values include: "NotSpecified", "Include", "Exclude". - :type message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + :vartype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType """ _validation = { @@ -8501,6 +11047,11 @@ def __init__( message_filter_type: Union[str, "MessageFilterType"], **kwargs ): + """ + :keyword message_filter_type: Required. The message filter type. Possible values include: + "NotSpecified", "Include", "Exclude". + :paramtype message_filter_type: str or ~azure.mgmt.logic.models.MessageFilterType + """ super(X12MessageFilter, self).__init__(**kwargs) self.message_filter_type = message_filter_type @@ -8510,8 +11061,8 @@ class X12MessageIdentifier(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_id: Required. The message id. - :type message_id: str + :ivar message_id: Required. The message id. + :vartype message_id: str """ _validation = { @@ -8528,6 +11079,10 @@ def __init__( message_id: str, **kwargs ): + """ + :keyword message_id: Required. The message id. + :paramtype message_id: str + """ super(X12MessageIdentifier, self).__init__(**kwargs) self.message_id = message_id @@ -8537,12 +11092,12 @@ class X12OneWayAgreement(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sender_business_identity: Required. The sender business identity. - :type sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param receiver_business_identity: Required. The receiver business identity. - :type receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity - :param protocol_settings: Required. The X12 protocol settings. - :type protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + :ivar sender_business_identity: Required. The sender business identity. + :vartype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar receiver_business_identity: Required. The receiver business identity. + :vartype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :ivar protocol_settings: Required. The X12 protocol settings. + :vartype protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings """ _validation = { @@ -8565,6 +11120,14 @@ def __init__( protocol_settings: "X12ProtocolSettings", **kwargs ): + """ + :keyword sender_business_identity: Required. The sender business identity. + :paramtype sender_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword receiver_business_identity: Required. The receiver business identity. + :paramtype receiver_business_identity: ~azure.mgmt.logic.models.BusinessIdentity + :keyword protocol_settings: Required. The X12 protocol settings. + :paramtype protocol_settings: ~azure.mgmt.logic.models.X12ProtocolSettings + """ super(X12OneWayAgreement, self).__init__(**kwargs) self.sender_business_identity = sender_business_identity self.receiver_business_identity = receiver_business_identity @@ -8576,22 +11139,22 @@ class X12ProcessingSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param mask_security_info: Required. The value indicating whether to mask security information. - :type mask_security_info: bool - :param convert_implied_decimal: Required. The value indicating whether to convert numerical - type to implied decimal. - :type convert_implied_decimal: bool - :param preserve_interchange: Required. The value indicating whether to preserve interchange. - :type preserve_interchange: bool - :param suspend_interchange_on_error: Required. The value indicating whether to suspend + :ivar mask_security_info: Required. The value indicating whether to mask security information. + :vartype mask_security_info: bool + :ivar convert_implied_decimal: Required. The value indicating whether to convert numerical type + to implied decimal. + :vartype convert_implied_decimal: bool + :ivar preserve_interchange: Required. The value indicating whether to preserve interchange. + :vartype preserve_interchange: bool + :ivar suspend_interchange_on_error: Required. The value indicating whether to suspend interchange on error. - :type suspend_interchange_on_error: bool - :param create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to + :vartype suspend_interchange_on_error: bool + :ivar create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether to create empty xml tags for trailing separators. - :type create_empty_xml_tags_for_trailing_separators: bool - :param use_dot_as_decimal_separator: Required. The value indicating whether to use dot as + :vartype create_empty_xml_tags_for_trailing_separators: bool + :ivar use_dot_as_decimal_separator: Required. The value indicating whether to use dot as decimal separator. - :type use_dot_as_decimal_separator: bool + :vartype use_dot_as_decimal_separator: bool """ _validation = { @@ -8623,6 +11186,25 @@ def __init__( use_dot_as_decimal_separator: bool, **kwargs ): + """ + :keyword mask_security_info: Required. The value indicating whether to mask security + information. + :paramtype mask_security_info: bool + :keyword convert_implied_decimal: Required. The value indicating whether to convert numerical + type to implied decimal. + :paramtype convert_implied_decimal: bool + :keyword preserve_interchange: Required. The value indicating whether to preserve interchange. + :paramtype preserve_interchange: bool + :keyword suspend_interchange_on_error: Required. The value indicating whether to suspend + interchange on error. + :paramtype suspend_interchange_on_error: bool + :keyword create_empty_xml_tags_for_trailing_separators: Required. The value indicating whether + to create empty xml tags for trailing separators. + :paramtype create_empty_xml_tags_for_trailing_separators: bool + :keyword use_dot_as_decimal_separator: Required. The value indicating whether to use dot as + decimal separator. + :paramtype use_dot_as_decimal_separator: bool + """ super(X12ProcessingSettings, self).__init__(**kwargs) self.mask_security_info = mask_security_info self.convert_implied_decimal = convert_implied_decimal @@ -8637,30 +11219,30 @@ class X12ProtocolSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param validation_settings: Required. The X12 validation settings. - :type validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings - :param framing_settings: Required. The X12 framing settings. - :type framing_settings: ~azure.mgmt.logic.models.X12FramingSettings - :param envelope_settings: Required. The X12 envelope settings. - :type envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings - :param acknowledgement_settings: Required. The X12 acknowledgment settings. - :type acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings - :param message_filter: Required. The X12 message filter. - :type message_filter: ~azure.mgmt.logic.models.X12MessageFilter - :param security_settings: Required. The X12 security settings. - :type security_settings: ~azure.mgmt.logic.models.X12SecuritySettings - :param processing_settings: Required. The X12 processing settings. - :type processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings - :param envelope_overrides: The X12 envelope override settings. - :type envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] - :param validation_overrides: The X12 validation override settings. - :type validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] - :param message_filter_list: The X12 message filter list. - :type message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] - :param schema_references: Required. The X12 schema references. - :type schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] - :param x12_delimiter_overrides: The X12 delimiter override settings. - :type x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] + :ivar validation_settings: Required. The X12 validation settings. + :vartype validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :ivar framing_settings: Required. The X12 framing settings. + :vartype framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :ivar envelope_settings: Required. The X12 envelope settings. + :vartype envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :ivar acknowledgement_settings: Required. The X12 acknowledgment settings. + :vartype acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings + :ivar message_filter: Required. The X12 message filter. + :vartype message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :ivar security_settings: Required. The X12 security settings. + :vartype security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :ivar processing_settings: Required. The X12 processing settings. + :vartype processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :ivar envelope_overrides: The X12 envelope override settings. + :vartype envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :ivar validation_overrides: The X12 validation override settings. + :vartype validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] + :ivar message_filter_list: The X12 message filter list. + :vartype message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] + :ivar schema_references: Required. The X12 schema references. + :vartype schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :ivar x12_delimiter_overrides: The X12 delimiter override settings. + :vartype x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] """ _validation = { @@ -8706,6 +11288,32 @@ def __init__( x12_delimiter_overrides: Optional[List["X12DelimiterOverrides"]] = None, **kwargs ): + """ + :keyword validation_settings: Required. The X12 validation settings. + :paramtype validation_settings: ~azure.mgmt.logic.models.X12ValidationSettings + :keyword framing_settings: Required. The X12 framing settings. + :paramtype framing_settings: ~azure.mgmt.logic.models.X12FramingSettings + :keyword envelope_settings: Required. The X12 envelope settings. + :paramtype envelope_settings: ~azure.mgmt.logic.models.X12EnvelopeSettings + :keyword acknowledgement_settings: Required. The X12 acknowledgment settings. + :paramtype acknowledgement_settings: ~azure.mgmt.logic.models.X12AcknowledgementSettings + :keyword message_filter: Required. The X12 message filter. + :paramtype message_filter: ~azure.mgmt.logic.models.X12MessageFilter + :keyword security_settings: Required. The X12 security settings. + :paramtype security_settings: ~azure.mgmt.logic.models.X12SecuritySettings + :keyword processing_settings: Required. The X12 processing settings. + :paramtype processing_settings: ~azure.mgmt.logic.models.X12ProcessingSettings + :keyword envelope_overrides: The X12 envelope override settings. + :paramtype envelope_overrides: list[~azure.mgmt.logic.models.X12EnvelopeOverride] + :keyword validation_overrides: The X12 validation override settings. + :paramtype validation_overrides: list[~azure.mgmt.logic.models.X12ValidationOverride] + :keyword message_filter_list: The X12 message filter list. + :paramtype message_filter_list: list[~azure.mgmt.logic.models.X12MessageIdentifier] + :keyword schema_references: Required. The X12 schema references. + :paramtype schema_references: list[~azure.mgmt.logic.models.X12SchemaReference] + :keyword x12_delimiter_overrides: The X12 delimiter override settings. + :paramtype x12_delimiter_overrides: list[~azure.mgmt.logic.models.X12DelimiterOverrides] + """ super(X12ProtocolSettings, self).__init__(**kwargs) self.validation_settings = validation_settings self.framing_settings = framing_settings @@ -8726,14 +11334,14 @@ class X12SchemaReference(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_id: Required. The message id. - :type message_id: str - :param sender_application_id: The sender application id. - :type sender_application_id: str - :param schema_version: Required. The schema version. - :type schema_version: str - :param schema_name: Required. The schema name. - :type schema_name: str + :ivar message_id: Required. The message id. + :vartype message_id: str + :ivar sender_application_id: The sender application id. + :vartype sender_application_id: str + :ivar schema_version: Required. The schema version. + :vartype schema_version: str + :ivar schema_name: Required. The schema name. + :vartype schema_name: str """ _validation = { @@ -8758,6 +11366,16 @@ def __init__( sender_application_id: Optional[str] = None, **kwargs ): + """ + :keyword message_id: Required. The message id. + :paramtype message_id: str + :keyword sender_application_id: The sender application id. + :paramtype sender_application_id: str + :keyword schema_version: Required. The schema version. + :paramtype schema_version: str + :keyword schema_name: Required. The schema name. + :paramtype schema_name: str + """ super(X12SchemaReference, self).__init__(**kwargs) self.message_id = message_id self.sender_application_id = sender_application_id @@ -8770,14 +11388,14 @@ class X12SecuritySettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param authorization_qualifier: Required. The authorization qualifier. - :type authorization_qualifier: str - :param authorization_value: The authorization value. - :type authorization_value: str - :param security_qualifier: Required. The security qualifier. - :type security_qualifier: str - :param password_value: The password value. - :type password_value: str + :ivar authorization_qualifier: Required. The authorization qualifier. + :vartype authorization_qualifier: str + :ivar authorization_value: The authorization value. + :vartype authorization_value: str + :ivar security_qualifier: Required. The security qualifier. + :vartype security_qualifier: str + :ivar password_value: The password value. + :vartype password_value: str """ _validation = { @@ -8801,6 +11419,16 @@ def __init__( password_value: Optional[str] = None, **kwargs ): + """ + :keyword authorization_qualifier: Required. The authorization qualifier. + :paramtype authorization_qualifier: str + :keyword authorization_value: The authorization value. + :paramtype authorization_value: str + :keyword security_qualifier: Required. The security qualifier. + :paramtype security_qualifier: str + :keyword password_value: The password value. + :paramtype password_value: str + """ super(X12SecuritySettings, self).__init__(**kwargs) self.authorization_qualifier = authorization_qualifier self.authorization_value = authorization_value @@ -8813,24 +11441,23 @@ class X12ValidationOverride(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param message_id: Required. The message id on which the validation settings has to be applied. - :type message_id: str - :param validate_edi_types: Required. The value indicating whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :ivar message_id: Required. The message id on which the validation settings has to be applied. + :vartype message_id: str + :ivar validate_edi_types: Required. The value indicating whether to validate EDI types. + :vartype validate_edi_types: bool + :ivar validate_xsd_types: Required. The value indicating whether to validate XSD types. + :vartype validate_xsd_types: bool + :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param validate_character_set: Required. The value indicating whether to validate character - Set. - :type validate_character_set: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :vartype allow_leading_and_trailing_spaces_and_zeroes: bool + :ivar validate_character_set: Required. The value indicating whether to validate character Set. + :vartype validate_character_set: bool + :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values + :vartype trim_leading_and_trailing_spaces_and_zeroes: bool + :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -8865,6 +11492,27 @@ def __init__( trailing_separator_policy: Union[str, "TrailingSeparatorPolicy"], **kwargs ): + """ + :keyword message_id: Required. The message id on which the validation settings has to be + applied. + :paramtype message_id: str + :keyword validate_edi_types: Required. The value indicating whether to validate EDI types. + :paramtype validate_edi_types: bool + :keyword validate_xsd_types: Required. The value indicating whether to validate XSD types. + :paramtype validate_xsd_types: bool + :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether + to allow leading and trailing spaces and zeroes. + :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool + :keyword validate_character_set: Required. The value indicating whether to validate character + Set. + :paramtype validate_character_set: bool + :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + trim leading and trailing spaces and zeroes. + :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool + :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values + include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". + :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ super(X12ValidationOverride, self).__init__(**kwargs) self.message_id = message_id self.validate_edi_types = validate_edi_types @@ -8880,36 +11528,36 @@ class X12ValidationSettings(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param validate_character_set: Required. The value indicating whether to validate character set + :ivar validate_character_set: Required. The value indicating whether to validate character set in the message. - :type validate_character_set: bool - :param check_duplicate_interchange_control_number: Required. The value indicating whether to + :vartype validate_character_set: bool + :ivar check_duplicate_interchange_control_number: Required. The value indicating whether to check for duplicate interchange control number. - :type check_duplicate_interchange_control_number: bool - :param interchange_control_number_validity_days: Required. The validity period of interchange + :vartype check_duplicate_interchange_control_number: bool + :ivar interchange_control_number_validity_days: Required. The validity period of interchange control number. - :type interchange_control_number_validity_days: int - :param check_duplicate_group_control_number: Required. The value indicating whether to check - for duplicate group control number. - :type check_duplicate_group_control_number: bool - :param check_duplicate_transaction_set_control_number: Required. The value indicating whether - to check for duplicate transaction set control number. - :type check_duplicate_transaction_set_control_number: bool - :param validate_edi_types: Required. The value indicating whether to Whether to validate EDI + :vartype interchange_control_number_validity_days: int + :ivar check_duplicate_group_control_number: Required. The value indicating whether to check for + duplicate group control number. + :vartype check_duplicate_group_control_number: bool + :ivar check_duplicate_transaction_set_control_number: Required. The value indicating whether to + check for duplicate transaction set control number. + :vartype check_duplicate_transaction_set_control_number: bool + :ivar validate_edi_types: Required. The value indicating whether to Whether to validate EDI types. - :type validate_edi_types: bool - :param validate_xsd_types: Required. The value indicating whether to Whether to validate XSD + :vartype validate_edi_types: bool + :ivar validate_xsd_types: Required. The value indicating whether to Whether to validate XSD types. - :type validate_xsd_types: bool - :param allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :vartype validate_xsd_types: bool + :ivar allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to allow leading and trailing spaces and zeroes. - :type allow_leading_and_trailing_spaces_and_zeroes: bool - :param trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + :vartype allow_leading_and_trailing_spaces_and_zeroes: bool + :ivar trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to trim leading and trailing spaces and zeroes. - :type trim_leading_and_trailing_spaces_and_zeroes: bool - :param trailing_separator_policy: Required. The trailing separator policy. Possible values + :vartype trim_leading_and_trailing_spaces_and_zeroes: bool + :ivar trailing_separator_policy: Required. The trailing separator policy. Possible values include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". - :type trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + :vartype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy """ _validation = { @@ -8953,6 +11601,38 @@ def __init__( trailing_separator_policy: Union[str, "TrailingSeparatorPolicy"], **kwargs ): + """ + :keyword validate_character_set: Required. The value indicating whether to validate character + set in the message. + :paramtype validate_character_set: bool + :keyword check_duplicate_interchange_control_number: Required. The value indicating whether to + check for duplicate interchange control number. + :paramtype check_duplicate_interchange_control_number: bool + :keyword interchange_control_number_validity_days: Required. The validity period of interchange + control number. + :paramtype interchange_control_number_validity_days: int + :keyword check_duplicate_group_control_number: Required. The value indicating whether to check + for duplicate group control number. + :paramtype check_duplicate_group_control_number: bool + :keyword check_duplicate_transaction_set_control_number: Required. The value indicating whether + to check for duplicate transaction set control number. + :paramtype check_duplicate_transaction_set_control_number: bool + :keyword validate_edi_types: Required. The value indicating whether to Whether to validate EDI + types. + :paramtype validate_edi_types: bool + :keyword validate_xsd_types: Required. The value indicating whether to Whether to validate XSD + types. + :paramtype validate_xsd_types: bool + :keyword allow_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether + to allow leading and trailing spaces and zeroes. + :paramtype allow_leading_and_trailing_spaces_and_zeroes: bool + :keyword trim_leading_and_trailing_spaces_and_zeroes: Required. The value indicating whether to + trim leading and trailing spaces and zeroes. + :paramtype trim_leading_and_trailing_spaces_and_zeroes: bool + :keyword trailing_separator_policy: Required. The trailing separator policy. Possible values + include: "NotSpecified", "NotAllowed", "Optional", "Mandatory". + :paramtype trailing_separator_policy: str or ~azure.mgmt.logic.models.TrailingSeparatorPolicy + """ super(X12ValidationSettings, self).__init__(**kwargs) self.validate_character_set = validate_character_set self.check_duplicate_interchange_control_number = check_duplicate_interchange_control_number diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py b/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py index c3673ac689e..5c557560db0 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/__init__.py @@ -6,60 +6,60 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._workflow_operations import WorkflowOperations -from ._workflow_version_operations import WorkflowVersionOperations -from ._workflow_trigger_operations import WorkflowTriggerOperations -from ._workflow_version_trigger_operations import WorkflowVersionTriggerOperations -from ._workflow_trigger_history_operations import WorkflowTriggerHistoryOperations -from ._workflow_run_operations import WorkflowRunOperations -from ._workflow_run_action_operations import WorkflowRunActionOperations -from ._workflow_run_action_repetition_operations import WorkflowRunActionRepetitionOperations -from ._workflow_run_action_repetition_request_history_operations import WorkflowRunActionRepetitionRequestHistoryOperations -from ._workflow_run_action_request_history_operations import WorkflowRunActionRequestHistoryOperations -from ._workflow_run_action_scope_repetition_operations import WorkflowRunActionScopeRepetitionOperations -from ._workflow_run_operation_operations import WorkflowRunOperationOperations -from ._integration_account_operations import IntegrationAccountOperations -from ._integration_account_assembly_operations import IntegrationAccountAssemblyOperations -from ._integration_account_batch_configuration_operations import IntegrationAccountBatchConfigurationOperations -from ._integration_account_schema_operations import IntegrationAccountSchemaOperations -from ._integration_account_map_operations import IntegrationAccountMapOperations -from ._integration_account_partner_operations import IntegrationAccountPartnerOperations -from ._integration_account_agreement_operations import IntegrationAccountAgreementOperations -from ._integration_account_certificate_operations import IntegrationAccountCertificateOperations -from ._integration_account_session_operations import IntegrationAccountSessionOperations -from ._integration_service_environment_operations import IntegrationServiceEnvironmentOperations -from ._integration_service_environment_sku_operations import IntegrationServiceEnvironmentSkuOperations +from ._workflows_operations import WorkflowsOperations +from ._workflow_versions_operations import WorkflowVersionsOperations +from ._workflow_triggers_operations import WorkflowTriggersOperations +from ._workflow_version_triggers_operations import WorkflowVersionTriggersOperations +from ._workflow_trigger_histories_operations import WorkflowTriggerHistoriesOperations +from ._workflow_runs_operations import WorkflowRunsOperations +from ._workflow_run_actions_operations import WorkflowRunActionsOperations +from ._workflow_run_action_repetitions_operations import WorkflowRunActionRepetitionsOperations +from ._workflow_run_action_repetitions_request_histories_operations import WorkflowRunActionRepetitionsRequestHistoriesOperations +from ._workflow_run_action_request_histories_operations import WorkflowRunActionRequestHistoriesOperations +from ._workflow_run_action_scope_repetitions_operations import WorkflowRunActionScopeRepetitionsOperations +from ._workflow_run_operations_operations import WorkflowRunOperationsOperations +from ._integration_accounts_operations import IntegrationAccountsOperations +from ._integration_account_assemblies_operations import IntegrationAccountAssembliesOperations +from ._integration_account_batch_configurations_operations import IntegrationAccountBatchConfigurationsOperations +from ._integration_account_schemas_operations import IntegrationAccountSchemasOperations +from ._integration_account_maps_operations import IntegrationAccountMapsOperations +from ._integration_account_partners_operations import IntegrationAccountPartnersOperations +from ._integration_account_agreements_operations import IntegrationAccountAgreementsOperations +from ._integration_account_certificates_operations import IntegrationAccountCertificatesOperations +from ._integration_account_sessions_operations import IntegrationAccountSessionsOperations +from ._integration_service_environments_operations import IntegrationServiceEnvironmentsOperations +from ._integration_service_environment_skus_operations import IntegrationServiceEnvironmentSkusOperations from ._integration_service_environment_network_health_operations import IntegrationServiceEnvironmentNetworkHealthOperations -from ._integration_service_environment_managed_api_operations import IntegrationServiceEnvironmentManagedApiOperations -from ._integration_service_environment_managed_api_operation_operations import IntegrationServiceEnvironmentManagedApiOperationOperations -from ._operation_operations import OperationOperations +from ._integration_service_environment_managed_apis_operations import IntegrationServiceEnvironmentManagedApisOperations +from ._integration_service_environment_managed_api_operations_operations import IntegrationServiceEnvironmentManagedApiOperationsOperations +from ._operations import Operations __all__ = [ - 'WorkflowOperations', - 'WorkflowVersionOperations', - 'WorkflowTriggerOperations', - 'WorkflowVersionTriggerOperations', - 'WorkflowTriggerHistoryOperations', - 'WorkflowRunOperations', - 'WorkflowRunActionOperations', - 'WorkflowRunActionRepetitionOperations', - 'WorkflowRunActionRepetitionRequestHistoryOperations', - 'WorkflowRunActionRequestHistoryOperations', - 'WorkflowRunActionScopeRepetitionOperations', - 'WorkflowRunOperationOperations', - 'IntegrationAccountOperations', - 'IntegrationAccountAssemblyOperations', - 'IntegrationAccountBatchConfigurationOperations', - 'IntegrationAccountSchemaOperations', - 'IntegrationAccountMapOperations', - 'IntegrationAccountPartnerOperations', - 'IntegrationAccountAgreementOperations', - 'IntegrationAccountCertificateOperations', - 'IntegrationAccountSessionOperations', - 'IntegrationServiceEnvironmentOperations', - 'IntegrationServiceEnvironmentSkuOperations', + 'WorkflowsOperations', + 'WorkflowVersionsOperations', + 'WorkflowTriggersOperations', + 'WorkflowVersionTriggersOperations', + 'WorkflowTriggerHistoriesOperations', + 'WorkflowRunsOperations', + 'WorkflowRunActionsOperations', + 'WorkflowRunActionRepetitionsOperations', + 'WorkflowRunActionRepetitionsRequestHistoriesOperations', + 'WorkflowRunActionRequestHistoriesOperations', + 'WorkflowRunActionScopeRepetitionsOperations', + 'WorkflowRunOperationsOperations', + 'IntegrationAccountsOperations', + 'IntegrationAccountAssembliesOperations', + 'IntegrationAccountBatchConfigurationsOperations', + 'IntegrationAccountSchemasOperations', + 'IntegrationAccountMapsOperations', + 'IntegrationAccountPartnersOperations', + 'IntegrationAccountAgreementsOperations', + 'IntegrationAccountCertificatesOperations', + 'IntegrationAccountSessionsOperations', + 'IntegrationServiceEnvironmentsOperations', + 'IntegrationServiceEnvironmentSkusOperations', 'IntegrationServiceEnvironmentNetworkHealthOperations', - 'IntegrationServiceEnvironmentManagedApiOperations', - 'IntegrationServiceEnvironmentManagedApiOperationOperations', - 'OperationOperations', + 'IntegrationServiceEnvironmentManagedApisOperations', + 'IntegrationServiceEnvironmentManagedApiOperationsOperations', + 'Operations', ] diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py deleted file mode 100644 index 38198c748a4..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreement_operations.py +++ /dev/null @@ -1,421 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountAgreementOperations(object): - """IntegrationAccountAgreementOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountAgreementListResult" - """Gets a list of integration account agreements. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: - AgreementType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreementListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreementListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreementListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountAgreementListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - agreement_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountAgreement" - """Gets an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreement - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - agreement_name, # type: str - agreement_type, # type: Union[str, "models.AgreementType"] - host_partner, # type: str - guest_partner, # type: str - host_identity, # type: "models.BusinessIdentity" - guest_identity, # type: "models.BusinessIdentity" - content, # type: "models.AgreementContent" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - metadata=None, # type: Optional[object] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountAgreement" - """Creates or updates an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param agreement_type: The agreement type. - :type agreement_type: str or ~logic_management_client.models.AgreementType - :param host_partner: The integration account partner that is set as host partner for this - agreement. - :type host_partner: str - :param guest_partner: The integration account partner that is set as guest partner for this - agreement. - :type guest_partner: str - :param host_identity: The business identity of the host partner. - :type host_identity: ~logic_management_client.models.BusinessIdentity - :param guest_identity: The business identity of the guest partner. - :type guest_identity: ~logic_management_client.models.BusinessIdentity - :param content: The agreement content. - :type content: ~logic_management_client.models.AgreementContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountAgreement or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountAgreement or ~logic_management_client.models.IntegrationAccountAgreement - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountAgreement"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _agreement = models.IntegrationAccountAgreement(location=location, tags=tags, metadata=metadata, agreement_type=agreement_type, host_partner=host_partner, guest_partner=guest_partner, host_identity=host_identity, guest_identity=guest_identity, content=content) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_agreement, 'IntegrationAccountAgreement') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - agreement_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration account agreement. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}'} - - def list_content_callback_url( - self, - resource_group_name, # type: str - integration_account_name, # type: str - agreement_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param agreement_name: The integration account agreement name. - :type agreement_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'agreementName': self._serialize.url("agreement_name", agreement_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py new file mode 100644 index 00000000000..f372c09328f --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_agreements_operations.py @@ -0,0 +1,621 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_content_callback_url_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "agreementName": _SERIALIZER.url("agreement_name", agreement_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + +class IntegrationAccountAgreementsOperations(object): + """IntegrationAccountAgreementsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountAgreementListResult"]: + """Gets a list of integration account agreements. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: + AgreementType. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountAgreementListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountAgreementListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreementListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountAgreementListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountAgreement": + """Gets an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountAgreement, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreement"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + agreement: "_models.IntegrationAccountAgreement", + **kwargs: Any + ) -> "_models.IntegrationAccountAgreement": + """Creates or updates an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param agreement: The integration account agreement. + :type agreement: ~azure.mgmt.logic.models.IntegrationAccountAgreement + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountAgreement, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountAgreement + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreement"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(agreement, 'IntegrationAccountAgreement') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account agreement. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}"} # type: ignore + + + @distributed_trace + def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + agreement_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param agreement_name: The integration account agreement name. + :type agreement_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + agreement_name=agreement_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py new file mode 100644 index 00000000000..dbd34a4f7f8 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assemblies_operations.py @@ -0,0 +1,586 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_content_callback_url_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "assemblyArtifactName": _SERIALIZER.url("assembly_artifact_name", assembly_artifact_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationAccountAssembliesOperations(object): + """IntegrationAccountAssembliesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> Iterable["_models.AssemblyCollection"]: + """List the assemblies for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AssemblyCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.AssemblyCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("AssemblyCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any + ) -> "_models.AssemblyDefinition": + """Get an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssemblyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + assembly_artifact: "_models.AssemblyDefinition", + **kwargs: Any + ) -> "_models.AssemblyDefinition": + """Create or update an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :param assembly_artifact: The assembly artifact. + :type assembly_artifact: ~azure.mgmt.logic.models.AssemblyDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssemblyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.AssemblyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AssemblyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(assembly_artifact, 'AssemblyDefinition') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AssemblyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any + ) -> None: + """Delete an assembly for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}"} # type: ignore + + + @distributed_trace + def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + assembly_artifact_name: str, + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url for an integration account assembly. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param assembly_artifact_name: The assembly artifact name. + :type assembly_artifact_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + assembly_artifact_name=assembly_artifact_name, + api_version=api_version, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assembly_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assembly_operations.py deleted file mode 100644 index c33801e9f97..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_assembly_operations.py +++ /dev/null @@ -1,375 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountAssemblyOperations(object): - """IntegrationAccountAssemblyOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.AssemblyCollection" - """List the assemblies for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('AssemblyCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.AssemblyDefinition" - """Get an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('AssemblyDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - properties, # type: "models.AssemblyProperties" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - **kwargs # type: Any - ): - # type: (...) -> "models.AssemblyDefinition" - """Create or update an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :param properties: The assembly properties. - :type properties: ~logic_management_client.models.AssemblyProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: AssemblyDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.AssemblyDefinition or ~logic_management_client.models.AssemblyDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AssemblyDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _assembly_artifact = models.AssemblyDefinition(location=location, tags=tags, properties=properties) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_assembly_artifact, 'AssemblyDefinition') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('AssemblyDefinition', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('AssemblyDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Delete an assembly for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}'} - - def list_content_callback_url( - self, - resource_group_name, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the content callback url for an integration account assembly. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param assembly_artifact_name: The assembly artifact name. - :type assembly_artifact_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'assemblyArtifactName': self._serialize.url("assembly_artifact_name", assembly_artifact_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configuration_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configuration_operations.py deleted file mode 100644 index acde6505e62..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configuration_operations.py +++ /dev/null @@ -1,314 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountBatchConfigurationOperations(object): - """IntegrationAccountBatchConfigurationOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.BatchConfigurationCollection" - """List the batch configurations for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfigurationCollection or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfigurationCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfigurationCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('BatchConfigurationCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - batch_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.BatchConfiguration" - """Get a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('BatchConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - batch_configuration_name, # type: str - properties, # type: "models.BatchConfigurationProperties" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - **kwargs # type: Any - ): - # type: (...) -> "models.BatchConfiguration" - """Create or update a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :param properties: The batch configuration properties. - :type properties: ~logic_management_client.models.BatchConfigurationProperties - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BatchConfiguration or the result of cls(response) - :rtype: ~logic_management_client.models.BatchConfiguration or ~logic_management_client.models.BatchConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.BatchConfiguration"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _batch_configuration = models.BatchConfiguration(location=location, tags=tags, properties=properties) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_batch_configuration, 'BatchConfiguration') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BatchConfiguration', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('BatchConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - batch_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Delete a batch configuration for an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param batch_configuration_name: The batch configuration name. - :type batch_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'batchConfigurationName': self._serialize.url("batch_configuration_name", batch_configuration_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py new file mode 100644 index 00000000000..4e1e4c5c0ec --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_batch_configurations_operations.py @@ -0,0 +1,486 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "batchConfigurationName": _SERIALIZER.url("batch_configuration_name", batch_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "batchConfigurationName": _SERIALIZER.url("batch_configuration_name", batch_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "batchConfigurationName": _SERIALIZER.url("batch_configuration_name", batch_configuration_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationAccountBatchConfigurationsOperations(object): + """IntegrationAccountBatchConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> Iterable["_models.BatchConfigurationCollection"]: + """List the batch configurations for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BatchConfigurationCollection or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.BatchConfigurationCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfigurationCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("BatchConfigurationCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs: Any + ) -> "_models.BatchConfiguration": + """Get a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.BatchConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + batch_configuration: "_models.BatchConfiguration", + **kwargs: Any + ) -> "_models.BatchConfiguration": + """Create or update a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :param batch_configuration: The batch configuration. + :type batch_configuration: ~azure.mgmt.logic.models.BatchConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BatchConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.BatchConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(batch_configuration, 'BatchConfiguration') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BatchConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + batch_configuration_name: str, + **kwargs: Any + ) -> None: + """Delete a batch configuration for an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param batch_configuration_name: The batch configuration name. + :type batch_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + batch_configuration_name=batch_configuration_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificate_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificate_operations.py deleted file mode 100644 index 4222becf4b2..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificate_operations.py +++ /dev/null @@ -1,325 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountCertificateOperations(object): - """IntegrationAccountCertificateOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountCertificateListResult" - """Gets a list of integration account certificates. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificateListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificateListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificateListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountCertificateListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - certificate_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountCertificate" - """Gets an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificate - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - certificate_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - metadata=None, # type: Optional[object] - key=None, # type: Optional["models.KeyVaultKeyReference"] - public_certificate=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountCertificate" - """Creates or updates an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :param key: The key details in the key vault. - :type key: ~logic_management_client.models.KeyVaultKeyReference - :param public_certificate: The public certificate. - :type public_certificate: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountCertificate or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountCertificate or ~logic_management_client.models.IntegrationAccountCertificate - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountCertificate"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _certificate = models.IntegrationAccountCertificate(location=location, tags=tags, metadata=metadata, key=key, public_certificate=public_certificate) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_certificate, 'IntegrationAccountCertificate') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - certificate_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration account certificate. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param certificate_name: The integration account certificate name. - :type certificate_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'certificateName': self._serialize.url("certificate_name", certificate_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py new file mode 100644 index 00000000000..f7c31d7ddc9 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_certificates_operations.py @@ -0,0 +1,496 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "certificateName": _SERIALIZER.url("certificate_name", certificate_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationAccountCertificatesOperations(object): + """IntegrationAccountCertificatesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountCertificateListResult"]: + """Gets a list of integration account certificates. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountCertificateListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountCertificateListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificateListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountCertificateListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountCertificate": + """Gets an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + certificate: "_models.IntegrationAccountCertificate", + **kwargs: Any + ) -> "_models.IntegrationAccountCertificate": + """Creates or updates an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :param certificate: The integration account certificate. + :type certificate: ~azure.mgmt.logic.models.IntegrationAccountCertificate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountCertificate, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountCertificate + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificate"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(certificate, 'IntegrationAccountCertificate') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + certificate_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account certificate. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param certificate_name: The integration account certificate name. + :type certificate_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + certificate_name=certificate_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_map_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_map_operations.py deleted file mode 100644 index 4969a4a989c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_map_operations.py +++ /dev/null @@ -1,412 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountMapOperations(object): - """IntegrationAccountMapOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountMapListResult" - """Gets a list of integration account maps. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: MapType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMapListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMapListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMapListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountMapListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - map_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountMap" - """Gets an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMap - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - map_name, # type: str - map_type, # type: Union[str, "models.MapType"] - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - parameters_schema=None, # type: Optional["models.IntegrationAccountMapPropertiesParametersSchema"] - content=None, # type: Optional[str] - content_type_parameter=None, # type: Optional[str] - metadata=None, # type: Optional[object] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountMap" - """Creates or updates an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param map_type: The map type. - :type map_type: str or ~logic_management_client.models.MapType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param parameters_schema: The parameters schema of integration account map. - :type parameters_schema: ~logic_management_client.models.IntegrationAccountMapPropertiesParametersSchema - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str - :param metadata: The metadata. - :type metadata: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountMap or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountMap or ~logic_management_client.models.IntegrationAccountMap - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountMap"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _map = models.IntegrationAccountMap(location=location, tags=tags, map_type=map_type, parameters_schema=parameters_schema, content=content, content_type=content_type_parameter, metadata=metadata) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_map, 'IntegrationAccountMap') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - map_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration account map. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}'} - - def list_content_callback_url( - self, - resource_group_name, # type: str - integration_account_name, # type: str - map_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param map_name: The integration account map name. - :type map_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'mapName': self._serialize.url("map_name", map_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py new file mode 100644 index 00000000000..a3a26e51174 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_maps_operations.py @@ -0,0 +1,622 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "mapName": _SERIALIZER.url("map_name", map_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + map_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "mapName": _SERIALIZER.url("map_name", map_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "mapName": _SERIALIZER.url("map_name", map_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_content_callback_url_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + map_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "mapName": _SERIALIZER.url("map_name", map_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + +class IntegrationAccountMapsOperations(object): + """IntegrationAccountMapsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountMapListResult"]: + """Gets a list of integration account maps. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: MapType. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountMapListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountMapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMapListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountMapListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountMap": + """Gets an integration account map. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountMap, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + map: "_models.IntegrationAccountMap", + **kwargs: Any + ) -> "_models.IntegrationAccountMap": + """Creates or updates an integration account map. If the map is larger than 4 MB, you need to + store the map in an Azure blob and use the blob's Shared Access Signature (SAS) URL as the + 'contentLink' property value. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param map: The integration account map. + :type map: ~azure.mgmt.logic.models.IntegrationAccountMap + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountMap, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountMap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(map, 'IntegrationAccountMap') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account map. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}"} # type: ignore + + + @distributed_trace + def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + map_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param map_name: The integration account map name. + :type map_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + map_name=map_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py deleted file mode 100644 index c353a90a19d..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_operations.py +++ /dev/null @@ -1,753 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountOperations(object): - """IntegrationAccountOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountListResult" - """Gets a list of integration accounts by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts'} - - def list_by_resource_group( - self, - resource_group_name, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountListResult" - """Gets a list of integration accounts by resource group. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccount" - """Gets an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - sku=None, # type: Optional["models.IntegrationAccountSku"] - integration_service_environment=None, # type: Optional["models.IntegrationServiceEnvironment"] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccount" - """Creates or updates an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount or ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - sku=None, # type: Optional["models.IntegrationAccountSku"] - integration_service_environment=None, # type: Optional["models.IntegrationServiceEnvironment"] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccount" - """Updates an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationAccountSku - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.IntegrationServiceEnvironment - :param state: The workflow state. - :type state: str or ~logic_management_client.models.WorkflowState - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_account = models.IntegrationAccount(location=location, tags=tags, sku=sku, integration_service_environment=integration_service_environment, state=state) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_account, 'IntegrationAccount') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration account. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} - - def list_callback_url( - self, - resource_group_name, # type: str - integration_account_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.CallbackUrl" - """Gets the integration account callback URL. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.CallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.CallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('CallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl'} - - def list_key_vault_key( - self, - resource_group_name, # type: str - integration_account_name, # type: str - key_vault, # type: "models.KeyVaultReference" - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.KeyVaultKeyCollection" - """Gets the integration account's Key Vault keys. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param key_vault: The key vault reference. - :type key_vault: ~logic_management_client.models.KeyVaultReference - :param skip_token: The skip token. - :type skip_token: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: KeyVaultKeyCollection or the result of cls(response) - :rtype: ~logic_management_client.models.KeyVaultKeyCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.KeyVaultKeyCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - _list_key_vault_keys = models.ListKeyVaultKeysDefinition(key_vault=key_vault, skip_token=skip_token) - api_version = "2019-05-01" - content_type = "application/json" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_key_vault_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_key_vault_keys, 'ListKeyVaultKeysDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('KeyVaultKeyCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_key_vault_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys'} - - def log_tracking_event( - self, - resource_group_name, # type: str - integration_account_name, # type: str - source_type, # type: str - events, # type: List["TrackingEvent"] - track_events_options=None, # type: Optional[Union[str, "models.TrackEventsOperationOptions"]] - **kwargs # type: Any - ): - # type: (...) -> None - """Logs the integration account's tracking events. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param source_type: The source type. - :type source_type: str - :param events: The events. - :type events: list[~logic_management_client.models.TrackingEvent] - :param track_events_options: The track events options. - :type track_events_options: str or ~logic_management_client.models.TrackEventsOperationOptions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _log_tracking_events = models.TrackingEventsDefinition(source_type=source_type, track_events_options=track_events_options, events=events) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.log_tracking_event.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_log_tracking_events, 'TrackingEventsDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - log_tracking_event.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents'} - - def regenerate_access_key( - self, - resource_group_name, # type: str - integration_account_name, # type: str - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccount" - """Regenerates the integration account access key. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccount or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccount - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccount"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _regenerate_access_key = models.RegenerateActionParameter(key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.regenerate_access_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_regenerate_access_key, 'RegenerateActionParameter') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccount', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py deleted file mode 100644 index 3919f8083b0..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partner_operations.py +++ /dev/null @@ -1,406 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountPartnerOperations(object): - """IntegrationAccountPartnerOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountPartnerListResult" - """Gets a list of integration account partners. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: PartnerType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartnerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartnerListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartnerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountPartnerListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - partner_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountPartner" - """Gets an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartner - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - partner_name, # type: str - partner_type, # type: Union[str, "models.PartnerType"] - content, # type: "models.PartnerContent" - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - metadata=None, # type: Optional[object] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountPartner" - """Creates or updates an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param partner_type: The partner type. - :type partner_type: str or ~logic_management_client.models.PartnerType - :param content: The partner content. - :type content: ~logic_management_client.models.PartnerContent - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param metadata: The metadata. - :type metadata: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountPartner or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountPartner or ~logic_management_client.models.IntegrationAccountPartner - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountPartner"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _partner = models.IntegrationAccountPartner(location=location, tags=tags, partner_type=partner_type, metadata=metadata, content=content) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_partner, 'IntegrationAccountPartner') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - partner_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration account partner. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}'} - - def list_content_callback_url( - self, - resource_group_name, # type: str - integration_account_name, # type: str - partner_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param partner_name: The integration account partner name. - :type partner_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'partnerName': self._serialize.url("partner_name", partner_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py new file mode 100644 index 00000000000..e8eacf36762 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_partners_operations.py @@ -0,0 +1,621 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_content_callback_url_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "partnerName": _SERIALIZER.url("partner_name", partner_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + +class IntegrationAccountPartnersOperations(object): + """IntegrationAccountPartnersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountPartnerListResult"]: + """Gets a list of integration account partners. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: PartnerType. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountPartnerListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountPartnerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartnerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountPartnerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountPartner": + """Gets an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountPartner, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartner"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + partner: "_models.IntegrationAccountPartner", + **kwargs: Any + ) -> "_models.IntegrationAccountPartner": + """Creates or updates an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param partner: The integration account partner. + :type partner: ~azure.mgmt.logic.models.IntegrationAccountPartner + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountPartner, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountPartner + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartner"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(partner, 'IntegrationAccountPartner') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account partner. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}"} # type: ignore + + + @distributed_trace + def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + partner_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param partner_name: The integration account partner name. + :type partner_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + partner_name=partner_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schema_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schema_operations.py deleted file mode 100644 index 2cc9b609d90..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schema_operations.py +++ /dev/null @@ -1,418 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountSchemaOperations(object): - """IntegrationAccountSchemaOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountSchemaListResult" - """Gets a list of integration account schemas. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: SchemaType. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchemaListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchemaListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchemaListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountSchemaListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - schema_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountSchema" - """Gets an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchema - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - schema_name, # type: str - schema_type, # type: Union[str, "models.SchemaType"] - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - target_namespace=None, # type: Optional[str] - document_name=None, # type: Optional[str] - file_name=None, # type: Optional[str] - metadata=None, # type: Optional[object] - content=None, # type: Optional[str] - content_type_parameter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountSchema" - """Creates or updates an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param schema_type: The schema type. - :type schema_type: str or ~logic_management_client.models.SchemaType - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param target_namespace: The target namespace of the schema. - :type target_namespace: str - :param document_name: The document name. - :type document_name: str - :param file_name: The file name. - :type file_name: str - :param metadata: The metadata. - :type metadata: object - :param content: The content. - :type content: str - :param content_type_parameter: The content type. - :type content_type_parameter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSchema or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSchema or ~logic_management_client.models.IntegrationAccountSchema - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _schema = models.IntegrationAccountSchema(location=location, tags=tags, schema_type=schema_type, target_namespace=target_namespace, document_name=document_name, file_name=file_name, metadata=metadata, content=content, content_type=content_type_parameter) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_schema, 'IntegrationAccountSchema') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - schema_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration account schema. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}'} - - def list_content_callback_url( - self, - resource_group_name, # type: str - integration_account_name, # type: str - schema_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the content callback url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param schema_name: The integration account schema name. - :type schema_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_content_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_content_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'schemaName': self._serialize.url("schema_name", schema_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_content_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_content_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py new file mode 100644 index 00000000000..44ba9f683ee --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_schemas_operations.py @@ -0,0 +1,621 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_content_callback_url_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + +class IntegrationAccountSchemasOperations(object): + """IntegrationAccountSchemasOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountSchemaListResult"]: + """Gets a list of integration account schemas. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: SchemaType. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountSchemaListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountSchemaListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchemaListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountSchemaListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountSchema": + """Gets an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSchema, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchema"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + schema: "_models.IntegrationAccountSchema", + **kwargs: Any + ) -> "_models.IntegrationAccountSchema": + """Creates or updates an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param schema: The integration account schema. + :type schema: ~azure.mgmt.logic.models.IntegrationAccountSchema + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSchema, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchema"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(schema, 'IntegrationAccountSchema') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account schema. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}"} # type: ignore + + + @distributed_trace + def list_content_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + schema_name: str, + list_content_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the content callback url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param schema_name: The integration account schema name. + :type schema_name: str + :param list_content_callback_url: + :type list_content_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') + + request = build_list_content_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + schema_name=schema_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_content_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_session_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_session_operations.py deleted file mode 100644 index 45c1becc47a..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_session_operations.py +++ /dev/null @@ -1,324 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationAccountSessionOperations(object): - """IntegrationAccountSessionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - integration_account_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountSessionListResult" - """Gets a list of integration account sessions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSessionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSessionListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSessionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationAccountSessionListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions'} - - def get( - self, - resource_group_name, # type: str - integration_account_name, # type: str - session_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountSession" - """Gets an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} - - def create_or_update( - self, - resource_group_name, # type: str - integration_account_name, # type: str - session_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - content=None, # type: Optional[object] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationAccountSession" - """Creates or updates an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param content: The session content. - :type content: object - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationAccountSession or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationAccountSession or ~logic_management_client.models.IntegrationAccountSession - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationAccountSession"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _session = models.IntegrationAccountSession(location=location, tags=tags, content=content) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_session, 'IntegrationAccountSession') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} - - def delete( - self, - resource_group_name, # type: str - integration_account_name, # type: str - session_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration account session. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param integration_account_name: The integration account name. - :type integration_account_name: str - :param session_name: The integration account session name. - :type session_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'integrationAccountName': self._serialize.url("integration_account_name", integration_account_name, 'str'), - 'sessionName': self._serialize.url("session_name", session_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py new file mode 100644 index 00000000000..f2c15ac68ca --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_account_sessions_operations.py @@ -0,0 +1,505 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "sessionName": _SERIALIZER.url("session_name", session_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + session_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "sessionName": _SERIALIZER.url("session_name", session_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + "sessionName": _SERIALIZER.url("session_name", session_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationAccountSessionsOperations(object): + """IntegrationAccountSessionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + integration_account_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountSessionListResult"]: + """Gets a list of integration account sessions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: ChangedTime. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountSessionListResult or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountSessionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSessionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountSessionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccountSession": + """Gets an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSession, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + session: "_models.IntegrationAccountSession", + **kwargs: Any + ) -> "_models.IntegrationAccountSession": + """Creates or updates an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :param session: The integration account session. + :type session: ~azure.mgmt.logic.models.IntegrationAccountSession + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccountSession, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccountSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(session, 'IntegrationAccountSession') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + session_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account session. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param session_name: The integration account session name. + :type session_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + session_name=session_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py new file mode 100644 index 00000000000..d416bc47bfe --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_accounts_operations.py @@ -0,0 +1,1157 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_by_subscription_request( + subscription_id: str, + *, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + *, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_update_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_callback_url_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_list_key_vault_keys_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_log_tracking_events_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_regenerate_access_key_request( + subscription_id: str, + resource_group_name: str, + integration_account_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "integrationAccountName": _SERIALIZER.url("integration_account_name", integration_account_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + +class IntegrationAccountsOperations(object): + """IntegrationAccountsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_subscription( + self, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountListResult"]: + """Gets a list of integration accounts by subscription. + + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationAccounts"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationAccountListResult"]: + """Gets a list of integration accounts by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationAccountListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Gets an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + integration_account_name: str, + integration_account: "_models.IntegrationAccount", + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Creates or updates an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_account, 'IntegrationAccount') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace + def update( + self, + resource_group_name: str, + integration_account_name: str, + integration_account: "_models.IntegrationAccount", + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Updates an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param integration_account: The integration account. + :type integration_account: ~azure.mgmt.logic.models.IntegrationAccount + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_account, 'IntegrationAccount') + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}"} # type: ignore + + + @distributed_trace + def list_callback_url( + self, + resource_group_name: str, + integration_account_name: str, + parameters: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.CallbackUrl": + """Gets the integration account callback URL. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param parameters: The callback URL parameters. + :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.CallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl"} # type: ignore + + + @distributed_trace + def list_key_vault_keys( + self, + resource_group_name: str, + integration_account_name: str, + list_key_vault_keys: "_models.ListKeyVaultKeysDefinition", + **kwargs: Any + ) -> Iterable["_models.KeyVaultKeyCollection"]: + """Gets the integration account's Key Vault keys. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param list_key_vault_keys: The key vault parameters. + :type list_key_vault_keys: ~azure.mgmt.logic.models.ListKeyVaultKeysDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyVaultKeyCollection or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.KeyVaultKeyCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyVaultKeyCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + + request = build_list_key_vault_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_key_vault_keys.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + _json = self._serialize.body(list_key_vault_keys, 'ListKeyVaultKeysDefinition') + + request = build_list_key_vault_keys_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("KeyVaultKeyCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_key_vault_keys.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys"} # type: ignore + + @distributed_trace + def log_tracking_events( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + integration_account_name: str, + log_tracking_events: "_models.TrackingEventsDefinition", + **kwargs: Any + ) -> None: + """Logs the integration account's tracking events. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param log_tracking_events: The callback URL parameters. + :type log_tracking_events: ~azure.mgmt.logic.models.TrackingEventsDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') + + request = build_log_tracking_events_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.log_tracking_events.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + log_tracking_events.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents"} # type: ignore + + + @distributed_trace + def regenerate_access_key( + self, + resource_group_name: str, + integration_account_name: str, + regenerate_access_key: "_models.RegenerateActionParameter", + **kwargs: Any + ) -> "_models.IntegrationAccount": + """Regenerates the integration account access key. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param integration_account_name: The integration account name. + :type integration_account_name: str + :param regenerate_access_key: The access key type. + :type regenerate_access_key: ~azure.mgmt.logic.models.RegenerateActionParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationAccount, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationAccount + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccount"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') + + request = build_regenerate_access_key_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.regenerate_access_key.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationAccount', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + regenerate_access_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py deleted file mode 100644 index 7b803cec812..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operation_operations.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentManagedApiOperationOperations(object): - """IntegrationServiceEnvironmentManagedApiOperationOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.ApiOperationListResult" - """Gets the managed Api operations. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApiOperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ApiOperationListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ApiOperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ApiOperationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations.py deleted file mode 100644 index 288f9ca1d56..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations.py +++ /dev/null @@ -1,373 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentManagedApiOperations(object): - """IntegrationServiceEnvironmentManagedApiOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.ManagedApiListResult" - """Gets the integration service environment managed Apis. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApiListResult or the result of cls(response) - :rtype: ~logic_management_client.models.ManagedApiListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApiListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ManagedApiListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis'} - - def get( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.ManagedApi" - """Gets the integration service environment managed Api. - - :param resource_group: The resource group name. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ManagedApi or the result of cls(response) - :rtype: ~logic_management_client.models.ManagedApi - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - def _put_initial( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.ManagedApi" - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self._put_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _put_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - def begin_put( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.ManagedApi" - """Puts the integration service environment managed Api. - - :param resource_group: The resource group name. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns ManagedApi - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.ManagedApi] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedApi"] - raw_result = self._put_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ManagedApi', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - def _delete_initial( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self._delete_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - 'apiName': self._serialize.url("api_name", api_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} - - def begin_delete( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the integration service environment managed Api. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param api_name: The api name. - :type api_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = self._delete_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - api_name=api_name, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py new file mode 100644 index 00000000000..84c1a24d6c3 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_api_operations_operations.py @@ -0,0 +1,174 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + "apiName": _SERIALIZER.url("api_name", api_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationServiceEnvironmentManagedApiOperationsOperations(object): + """IntegrationServiceEnvironmentManagedApiOperationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> Iterable["_models.ApiOperationListResult"]: + """Gets the managed Api operations. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApiOperationListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.ApiOperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiOperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ApiOperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py new file mode 100644 index 00000000000..606b55a1957 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_managed_apis_operations.py @@ -0,0 +1,602 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + "apiName": _SERIALIZER.url("api_name", api_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_put_request_initial( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + "apiName": _SERIALIZER.url("api_name", api_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request_initial( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + "apiName": _SERIALIZER.url("api_name", api_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationServiceEnvironmentManagedApisOperations(object): + """IntegrationServiceEnvironmentManagedApisOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> Iterable["_models.IntegrationServiceEnvironmentManagedApiListResult"]: + """Gets the integration service environment managed Apis. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentManagedApiListResult + or the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApiListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApiListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentManagedApiListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis"} # type: ignore + + @distributed_trace + def get( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironmentManagedApi": + """Gets the integration service environment managed Api. + + :param resource_group: The resource group name. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationServiceEnvironmentManagedApi, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + + def _put_initial( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironmentManagedApi": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment_managed_api, 'IntegrationServiceEnvironmentManagedApi') + + request = build_put_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._put_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _put_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + + @distributed_trace + def begin_put( + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + integration_service_environment_managed_api: "_models.IntegrationServiceEnvironmentManagedApi", + **kwargs: Any + ) -> LROPoller["_models.IntegrationServiceEnvironmentManagedApi"]: + """Puts the integration service environment managed Api. + + :param resource_group: The resource group name. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :param integration_service_environment_managed_api: The integration service environment managed + api. + :type integration_service_environment_managed_api: + ~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either IntegrationServiceEnvironmentManagedApi + or the result of cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironmentManagedApi] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._put_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + integration_service_environment_managed_api=integration_service_environment_managed_api, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_put.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + def _delete_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore + + + @distributed_trace + def begin_delete( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + api_name: str, + **kwargs: Any + ) -> LROPoller[None]: + """Deletes the integration service environment managed Api. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param api_name: The api name. + :type api_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_name=api_name, + api_version=api_version, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py index f43562abb72..f29dca2895b 100644 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_network_health_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,18 +6,60 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings +from typing import Any, Callable, Dict, Optional, TypeVar -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from msrest import Serializer -from .. import models +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from .. import models as _models +from .._vendor import _convert_request, _format_url_section T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_get_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + class IntegrationServiceEnvironmentNetworkHealthOperations(object): """IntegrationServiceEnvironmentNetworkHealthOperations operations. @@ -24,14 +67,14 @@ class IntegrationServiceEnvironmentNetworkHealthOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models + :type models: ~azure.mgmt.logic.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -39,13 +82,13 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get( self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"] + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> Dict[str, "_models.IntegrationServiceEnvironmentSubnetNetworkHealth"]: """Gets the integration service environment network health. :param resource_group: The resource group. @@ -53,45 +96,48 @@ def get( :param integration_service_environment_name: The integration service environment name. :type integration_service_environment_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: dict or the result of cls(response) - :rtype: dict[str, ~logic_management_client.models.IntegrationServiceEnvironmentSubnetNetworkHealth] + :return: dict mapping str to IntegrationServiceEnvironmentSubnetNetworkHealth, or the result of + cls(response) + :rtype: dict[str, ~azure.mgmt.logic.models.IntegrationServiceEnvironmentSubnetNetworkHealth] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "IntegrationServiceEnvironmentSubnetNetworkHealth"]] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), + cls = kwargs.pop('cls', None) # type: ClsType[Dict[str, "_models.IntegrationServiceEnvironmentSubnetNetworkHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('{IntegrationServiceEnvironmentSubnetNetworkHealth}', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py deleted file mode 100644 index 9b2eeda72aa..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_operations.py +++ /dev/null @@ -1,596 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentOperations(object): - """IntegrationServiceEnvironmentOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironmentListResult" - """Gets a list of integration service environments by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironmentListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments'} - - def list_by_resource_group( - self, - resource_group, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironmentListResult" - """Gets a list of integration service environments by resource group. - - :param resource_group: The resource group. - :type resource_group: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironmentListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments'} - - def get( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironment" - """Gets an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironment or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironment - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - def _create_or_update_initial( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironment" - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self._create_or_update_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - def begin_create_or_update( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironment" - """Creates or updates an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = self._create_or_update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - def _update_initial( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironment" - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _integration_service_environment = models.IntegrationServiceEnvironment(location=location, tags=tags, properties=properties, sku=sku) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self._update_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_integration_service_environment, 'IntegrationServiceEnvironment') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - def begin_update( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - properties=None, # type: Optional["models.IntegrationServiceEnvironmentProperties"] - sku=None, # type: Optional["models.IntegrationServiceEnvironmentSku"] - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironment" - """Updates an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param properties: The integration service environment properties. - :type properties: ~logic_management_client.models.IntegrationServiceEnvironmentProperties - :param sku: The sku. - :type sku: ~logic_management_client.models.IntegrationServiceEnvironmentSku - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns IntegrationServiceEnvironment - :rtype: ~azure.core.polling.LROPoller[~logic_management_client.models.IntegrationServiceEnvironment] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironment"] - raw_result = self._update_initial( - resource_group=resource_group, - integration_service_environment_name=integration_service_environment_name, - location=location, - tags=tags, - properties=properties, - sku=sku, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - def delete( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} - - def restart( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Restarts an integration service environment. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.restart.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py deleted file mode 100644 index 2a8d954b363..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_sku_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class IntegrationServiceEnvironmentSkuOperations(object): - """IntegrationServiceEnvironmentSkuOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.IntegrationServiceEnvironmentSkuList" - """Gets a list of integration service environment Skus. - - :param resource_group: The resource group. - :type resource_group: str - :param integration_service_environment_name: The integration service environment name. - :type integration_service_environment_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IntegrationServiceEnvironmentSkuList or the result of cls(response) - :rtype: ~logic_management_client.models.IntegrationServiceEnvironmentSkuList - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.IntegrationServiceEnvironmentSkuList"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroup': self._serialize.url("resource_group", resource_group, 'str'), - 'integrationServiceEnvironmentName': self._serialize.url("integration_service_environment_name", integration_service_environment_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('IntegrationServiceEnvironmentSkuList', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py new file mode 100644 index 00000000000..1e4f51eb454 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environment_skus_operations.py @@ -0,0 +1,168 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationServiceEnvironmentSkusOperations(object): + """IntegrationServiceEnvironmentSkusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> Iterable["_models.IntegrationServiceEnvironmentSkuList"]: + """Gets a list of integration service environment Skus. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentSkuList or the result + of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentSkuList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentSkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentSkuList", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py new file mode 100644 index 00000000000..ba39412535c --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_integration_service_environments_operations.py @@ -0,0 +1,903 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_by_subscription_request( + subscription_id: str, + *, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_resource_group_request( + subscription_id: str, + resource_group: str, + *, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request_initial( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_update_request_initial( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_restart_request( + subscription_id: str, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroup": _SERIALIZER.url("resource_group", resource_group, 'str'), + "integrationServiceEnvironmentName": _SERIALIZER.url("integration_service_environment_name", integration_service_environment_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class IntegrationServiceEnvironmentsOperations(object): + """IntegrationServiceEnvironmentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_subscription( + self, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationServiceEnvironmentListResult"]: + """Gets a list of integration service environments by subscription. + + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group: str, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.IntegrationServiceEnvironmentListResult"]: + """Gets a list of integration service environments by resource group. + + :param resource_group: The resource group. + :type resource_group: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IntegrationServiceEnvironmentListResult or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + api_version=api_version, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments"} # type: ignore + + @distributed_trace + def get( + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironment": + """Gets an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IntegrationServiceEnvironment, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + def _create_or_update_initial( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') + + request = build_create_or_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._create_or_update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + @distributed_trace + def begin_create_or_update( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> LROPoller["_models.IntegrationServiceEnvironment"]: + """Creates or updates an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either IntegrationServiceEnvironment or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + def _update_initial( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') + + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._update_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + @distributed_trace + def begin_update( + self, + resource_group: str, + integration_service_environment_name: str, + integration_service_environment: "_models.IntegrationServiceEnvironment", + **kwargs: Any + ) -> LROPoller["_models.IntegrationServiceEnvironment"]: + """Updates an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :param integration_service_environment: The integration service environment. + :type integration_service_environment: ~azure.mgmt.logic.models.IntegrationServiceEnvironment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either IntegrationServiceEnvironment or the + result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.logic.models.IntegrationServiceEnvironment] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + integration_service_environment=integration_service_environment, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> None: + """Deletes an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}"} # type: ignore + + + @distributed_trace + def restart( # pylint: disable=inconsistent-return-statements + self, + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> None: + """Restarts an integration service environment. + + :param resource_group: The resource group. + :type resource_group: str + :param integration_service_environment_name: The integration service environment name. + :type integration_service_environment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_restart_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + api_version=api_version, + template_url=self.restart.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + restart.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py deleted file mode 100644 index 549f969dc54..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_operation_operations.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class OperationOperations(object): - """OperationOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> "models.OperationListResult" - """Lists all of the available Logic REST API operations. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: OperationListResult or the result of cls(response) - :rtype: ~logic_management_client.models.OperationListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('OperationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/providers/Microsoft.Logic/operations'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py new file mode 100644 index 00000000000..910e567678e --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_operations.py @@ -0,0 +1,144 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/providers/Microsoft.Logic/operations") + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> Iterable["_models.OperationListResult"]: + """Lists all of the available Logic REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("OperationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/providers/Microsoft.Logic/operations"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py deleted file mode 100644 index 51d901031df..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_operations.py +++ /dev/null @@ -1,1135 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowOperations(object): - """WorkflowOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_by_subscription( - self, - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowListResult" - """Gets a list of workflows by subscription. - - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows'} - - def list_by_resource_group( - self, - resource_group_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowListResult" - """Gets a list of workflows by resource group. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: State, - Trigger, and ReferencedResourceId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.Workflow" - """Gets a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Workflow', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def create_or_update( - self, - resource_group_name, # type: str - workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - access_control=None, # type: Optional["models.FlowAccessControlConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] - **kwargs # type: Any - ): - # type: (...) -> "models.Workflow" - """Creates or updates a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow or ~logic_management_client.models.Workflow - :raises: ~azure.core.exceptions.HttpResponseError - """ - - cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, access_control=access_control, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.create_or_update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('Workflow', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Workflow', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def update( - self, - resource_group_name, # type: str - workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] - **kwargs # type: Any - ): - # type: (...) -> "models.Workflow" - """Updates a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Workflow or the result of cls(response) - :rtype: ~logic_management_client.models.Workflow - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.Workflow"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _workflow = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.update.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_workflow, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('Workflow', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def delete( - self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.delete.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} - - def disable( - self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Disables a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.disable.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} - - def enable( - self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Enables a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.enable.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - enable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable'} - - def generate_upgraded_definition( - self, - resource_group_name, # type: str - workflow_name, # type: str - target_schema_version=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> object - """Generates the upgraded definition for a workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param target_schema_version: The target schema version. - :type target_schema_version: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) - :rtype: object - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GenerateUpgradedDefinitionParameters(target_schema_version=target_schema_version) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.generate_upgraded_definition.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_parameters, 'GenerateUpgradedDefinitionParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('object', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - generate_upgraded_definition.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition'} - - def list_callback_url( - self, - resource_group_name, # type: str - workflow_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the workflow callback Url. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _list_callback_url = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_list_callback_url, 'GetCallbackUrlParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl'} - - def list_swagger( - self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> object - """Gets an OpenAPI definition for the workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: object or the result of cls(response) - :rtype: object - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[object] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.list_swagger.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('object', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_swagger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger'} - - def _move_initial( - self, - resource_group_name, # type: str - workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _move = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self._move_initial.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_move, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - _move_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} - - def begin_move( - self, - resource_group_name, # type: str - workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] - **kwargs # type: Any - ): - # type: (...) -> None - """Moves an existing workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :return: An instance of LROPoller that returns None - :rtype: ~azure.core.polling.LROPoller[None] - - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', False) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - raw_result = self._move_initial( - resource_group_name=resource_group_name, - workflow_name=workflow_name, - location=location, - tags=tags, - state=state, - endpoints_configuration=endpoints_configuration, - integration_account=integration_account, - integration_service_environment=integration_service_environment, - definition=definition, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - lro_delay = kwargs.get( - 'polling_interval', - self._config.polling_interval - ) - if polling is True: raise ValueError("polling being True is not valid because no default polling implemetation has been defined.") - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_move.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move'} - - def regenerate_access_key( - self, - resource_group_name, # type: str - workflow_name, # type: str - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> None - """Regenerates the callback URL access key for request triggers. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _key_type = models.RegenerateActionParameter(key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.regenerate_access_key.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_key_type, 'RegenerateActionParameter') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} - - def validate_by_resource_group( - self, - resource_group_name, # type: str - workflow_name, # type: str - location=None, # type: Optional[str] - tags=None, # type: Optional[Dict[str, str]] - state=None, # type: Optional[Union[str, "models.WorkflowState"]] - endpoints_configuration=None, # type: Optional["models.FlowEndpointsConfiguration"] - integration_account=None, # type: Optional["models.ResourceReference"] - integration_service_environment=None, # type: Optional["models.ResourceReference"] - definition=None, # type: Optional[object] - parameters=None, # type: Optional[Dict[str, "WorkflowParameter"]] - **kwargs # type: Any - ): - # type: (...) -> None - """Validates the workflow. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param location: The resource location. - :type location: str - :param tags: The resource tags. - :type tags: dict[str, str] - :param state: The state. - :type state: str or ~logic_management_client.models.WorkflowState - :param endpoints_configuration: The endpoints configuration. - :type endpoints_configuration: ~logic_management_client.models.FlowEndpointsConfiguration - :param integration_account: The integration account. - :type integration_account: ~logic_management_client.models.ResourceReference - :param integration_service_environment: The integration service environment. - :type integration_service_environment: ~logic_management_client.models.ResourceReference - :param definition: The definition. - :type definition: object - :param parameters: The parameters. - :type parameters: dict[str, ~logic_management_client.models.WorkflowParameter] - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _validate = models.Workflow(location=location, tags=tags, state=state, endpoints_configuration=endpoints_configuration, integration_account=integration_account, integration_service_environment=integration_service_environment, definition=definition, parameters=parameters) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.validate_by_resource_group.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_validate, 'Workflow') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} - - def validate_by_location( - self, - resource_group_name, # type: str - location, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Validates the workflow definition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param location: The workflow location. - :type location: str - :param workflow_name: The workflow name. - :type workflow_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.validate_by_location.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'location': self._serialize.url("location", location, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - validate_by_location.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py deleted file mode 100644 index 98c083e7b5b..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_operations.py +++ /dev/null @@ -1,272 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionOperations(object): - """WorkflowRunActionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRunActionListResult" - """Gets a list of workflow run actions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunActionListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRunAction" - """Gets a workflow run action. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunAction or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunAction - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunAction"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRunAction', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}'} - - def list_expression_trace( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.ExpressionTraces" - """Lists a workflow run expression trace. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_expression_trace.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressionTraces', pipeline_response) - list_of_elem = deserialized.inputs - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py deleted file mode 100644 index 920ba54db8c..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_operations.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRepetitionOperations(object): - """WorkflowRunActionRepetitionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRunActionRepetitionDefinitionCollection" - """Get all of a workflow run action repetitions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRunActionRepetitionDefinition" - """Get a workflow run action repetition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}'} - - def list_expression_trace( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.ExpressionTraces" - """Lists a workflow run expression trace. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressionTraces or the result of cls(response) - :rtype: ~logic_management_client.models.ExpressionTraces - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.ExpressionTraces"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_expression_trace.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressionTraces', pipeline_response) - list_of_elem = deserialized.inputs - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_expression_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_request_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_request_history_operations.py deleted file mode 100644 index 86fa5de0eb5..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetition_request_history_operations.py +++ /dev/null @@ -1,198 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRepetitionRequestHistoryOperations(object): - """WorkflowRunActionRepetitionRequestHistoryOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.RequestHistoryListResult" - """List a workflow run repetition request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RequestHistoryListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - request_history_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.RequestHistory" - """Gets a workflow run repetition request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :param request_history_name: The request history name. - :type request_history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistory - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('RequestHistory', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py new file mode 100644 index 00000000000..9d6c7a9938a --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_operations.py @@ -0,0 +1,434 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_expression_traces_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowRunActionRepetitionsOperations(object): + """WorkflowRunActionRepetitionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> Iterable["_models.WorkflowRunActionRepetitionDefinitionCollection"]: + """Get all of a workflow run action repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> "_models.WorkflowRunActionRepetitionDefinition": + """Get a workflow run action repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}"} # type: ignore + + + @distributed_trace + def list_expression_traces( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressionTraces"]: + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.ExpressionTraces] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressionTraces", pipeline_response) + list_of_elem = deserialized.inputs + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py new file mode 100644 index 00000000000..58e08e200e2 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py @@ -0,0 +1,307 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + request_history_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), + "requestHistoryName": _SERIALIZER.url("request_history_name", request_history_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowRunActionRepetitionsRequestHistoriesOperations(object): + """WorkflowRunActionRepetitionsRequestHistoriesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> Iterable["_models.RequestHistoryListResult"]: + """List a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RequestHistoryListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.RequestHistoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + request_history_name: str, + **kwargs: Any + ) -> "_models.RequestHistory": + """Gets a workflow run repetition request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :param request_history_name: The request history name. + :type request_history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RequestHistory, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.RequestHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + request_history_name=request_history_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RequestHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py new file mode 100644 index 00000000000..908eb9943df --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_histories_operations.py @@ -0,0 +1,294 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + request_history_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + "requestHistoryName": _SERIALIZER.url("request_history_name", request_history_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowRunActionRequestHistoriesOperations(object): + """WorkflowRunActionRequestHistoriesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> Iterable["_models.RequestHistoryListResult"]: + """List a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RequestHistoryListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.RequestHistoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + request_history_name: str, + **kwargs: Any + ) -> "_models.RequestHistory": + """Gets a workflow run request history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param request_history_name: The request history name. + :type request_history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RequestHistory, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.RequestHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + request_history_name=request_history_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RequestHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_history_operations.py deleted file mode 100644 index f558cef9f46..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_request_history_operations.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionRequestHistoryOperations(object): - """WorkflowRunActionRequestHistoryOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.RequestHistoryListResult" - """List a workflow run request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistoryListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RequestHistoryListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - request_history_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.RequestHistory" - """Gets a workflow run request history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param request_history_name: The request history name. - :type request_history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RequestHistory or the result of cls(response) - :rtype: ~logic_management_client.models.RequestHistory - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.RequestHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'requestHistoryName': self._serialize.url("request_history_name", request_history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('RequestHistory', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetition_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetition_operations.py deleted file mode 100644 index 8bd48b1fae4..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetition_operations.py +++ /dev/null @@ -1,190 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunActionScopeRepetitionOperations(object): - """WorkflowRunActionScopeRepetitionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRunActionRepetitionDefinitionCollection" - """List the workflow run action scoped repetitions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinitionCollection or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinitionCollection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinitionCollection"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinitionCollection', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRunActionRepetitionDefinition" - """Get a workflow run action scoped repetition. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param action_name: The workflow action name. - :type action_name: str - :param repetition_name: The workflow repetition. - :type repetition_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunActionRepetitionDefinition or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunActionRepetitionDefinition - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunActionRepetitionDefinition"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'actionName': self._serialize.url("action_name", action_name, 'str'), - 'repetitionName': self._serialize.url("repetition_name", repetition_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py new file mode 100644 index 00000000000..af2a611309b --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_action_scope_repetitions_operations.py @@ -0,0 +1,295 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + "repetitionName": _SERIALIZER.url("repetition_name", repetition_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowRunActionScopeRepetitionsOperations(object): + """WorkflowRunActionScopeRepetitionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> Iterable["_models.WorkflowRunActionRepetitionDefinitionCollection"]: + """List the workflow run action scoped repetitions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunActionRepetitionDefinitionCollection or + the result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + repetition_name: str, + **kwargs: Any + ) -> "_models.WorkflowRunActionRepetitionDefinition": + """Get a workflow run action scoped repetition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :param repetition_name: The workflow repetition. + :type repetition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRunActionRepetitionDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRunActionRepetitionDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + repetition_name=repetition_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions/{repetitionName}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py new file mode 100644 index 00000000000..7bc663fef43 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_actions_operations.py @@ -0,0 +1,431 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_expression_traces_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "actionName": _SERIALIZER.url("action_name", action_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowRunActionsOperations(object): + """WorkflowRunActionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.WorkflowRunActionListResult"]: + """Gets a list of workflow run actions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: Status. + Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunActionListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunActionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunActionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> "_models.WorkflowRunAction": + """Gets a workflow run action. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRunAction, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRunAction + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunAction"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRunAction', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}"} # type: ignore + + + @distributed_trace + def list_expression_traces( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + action_name: str, + **kwargs: Any + ) -> Iterable["_models.ExpressionTraces"]: + """Lists a workflow run expression trace. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param action_name: The workflow action name. + :type action_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressionTraces or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.ExpressionTraces] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressionTraces"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_expression_traces_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + action_name=action_name, + api_version=api_version, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("ExpressionTraces", pipeline_response) + list_of_elem = deserialized.inputs + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_expression_traces.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces"} # type: ignore diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py deleted file mode 100644 index c0c609527f9..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operation_operations.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunOperationOperations(object): - """WorkflowRunOperationOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - operation_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRun" - """Gets an operation for a run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :param operation_id: The workflow operation id. - :type operation_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRun - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRun', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py deleted file mode 100644 index 44bd25c0029..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations.py +++ /dev/null @@ -1,242 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowRunOperations(object): - """WorkflowRunOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRunListResult" - """Gets a list of workflow runs. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRunListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRunListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRunListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowRunListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowRun" - """Gets a workflow run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowRun or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowRun - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowRun"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowRun', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}'} - - def cancel( - self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Cancels a workflow run. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param run_name: The workflow run name. - :type run_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.cancel.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'runName': self._serialize.url("run_name", run_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py new file mode 100644 index 00000000000..188c400fa26 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_run_operations_operations.py @@ -0,0 +1,154 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + operation_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + "operationId": _SERIALIZER.url("operation_id", operation_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowRunOperationsOperations(object): + """WorkflowRunOperationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.WorkflowRun": + """Gets an operation for a run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :param operation_id: The workflow operation id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRun, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRun + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + operation_id=operation_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py new file mode 100644 index 00000000000..912ab0782a5 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_runs_operations.py @@ -0,0 +1,383 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_cancel_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "runName": _SERIALIZER.url("run_name", run_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowRunsOperations(object): + """WorkflowRunsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.WorkflowRunListResult"]: + """Gets a list of workflow runs. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: Status, + StartTime, and ClientTrackingId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowRunListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowRunListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowRunListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs: Any + ) -> "_models.WorkflowRun": + """Gets a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowRun, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowRun + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}"} # type: ignore + + + @distributed_trace + def cancel( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + run_name: str, + **kwargs: Any + ) -> None: + """Cancels a workflow run. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param run_name: The workflow run name. + :type run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_cancel_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + api_version=api_version, + template_url=self.cancel.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + cancel.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py new file mode 100644 index 00000000000..273c5b79946 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_histories_operations.py @@ -0,0 +1,404 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + "historyName": _SERIALIZER.url("history_name", history_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_resubmit_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + "historyName": _SERIALIZER.url("history_name", history_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowTriggerHistoriesOperations(object): + """WorkflowTriggerHistoriesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.WorkflowTriggerHistoryListResult"]: + """Gets a list of workflow trigger histories. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: Status, + StartTime, and ClientTrackingId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowTriggerHistoryListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowTriggerHistoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerHistoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowTriggerHistoryListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs: Any + ) -> "_models.WorkflowTriggerHistory": + """Gets a workflow trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to the run name for + triggers that resulted in a run. + :type history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerHistory, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerHistory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerHistory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + history_name=history_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}"} # type: ignore + + + @distributed_trace + def resubmit( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + history_name: str, + **kwargs: Any + ) -> None: + """Resubmits a workflow run based on the trigger history. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param history_name: The workflow trigger history name. Corresponds to the run name for + triggers that resulted in a run. + :type history_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_resubmit_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + history_name=history_name, + api_version=api_version, + template_url=self.resubmit.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + resubmit.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_history_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_history_operations.py deleted file mode 100644 index f23446ceddc..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_history_operations.py +++ /dev/null @@ -1,256 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowTriggerHistoryOperations(object): - """WorkflowTriggerHistoryOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerHistoryListResult" - """Gets a list of workflow trigger histories. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. Options for filters include: Status, - StartTime, and ClientTrackingId. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistoryListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerHistoryListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistoryListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowTriggerHistoryListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - history_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerHistory" - """Gets a workflow trigger history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param history_name: The workflow trigger history name. Corresponds to the run name for - triggers that resulted in a run. - :type history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerHistory or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerHistory - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerHistory"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - 'historyName': self._serialize.url("history_name", history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}'} - - def resubmit( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - history_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Resubmits a workflow run based on the trigger history. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param history_name: The workflow trigger history name. Corresponds to the run name for - triggers that resulted in a run. - :type history_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.resubmit.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - 'historyName': self._serialize.url("history_name", history_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - resubmit.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py deleted file mode 100644 index b12fbd43f9e..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_trigger_operations.py +++ /dev/null @@ -1,488 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowTriggerOperations(object): - """WorkflowTriggerOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerListResult" - """Gets a list of workflow triggers. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :param filter: The filter to apply on the operation. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowTriggerListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTrigger" - """Gets a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTrigger or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTrigger - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTrigger"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTrigger', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}'} - - def reset( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Resets a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.reset.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} - - def run( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - """Runs a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.run.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in []: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize('object', response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - run.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run'} - - def get_schema_json( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.JsonSchema" - """Get the trigger schema as JSON. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: JsonSchema or the result of cls(response) - :rtype: ~logic_management_client.models.JsonSchema - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.JsonSchema"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get_schema_json.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('JsonSchema', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_schema_json.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json'} - - def set_state( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - source, # type: "models.WorkflowTrigger" - **kwargs # type: Any - ): - # type: (...) -> None - """Sets the state of a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param source: The source. - :type source: ~logic_management_client.models.WorkflowTrigger - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _set_state = models.SetTriggerStateActionDefinition(source=source) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.set_state.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_set_state, 'SetTriggerStateActionDefinition') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - if cls: - return cls(pipeline_response, None, {}) - - set_state.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState'} - - def list_callback_url( - self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the callback URL for a workflow trigger. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py new file mode 100644 index 00000000000..e8390689bcb --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_triggers_operations.py @@ -0,0 +1,794 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_reset_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_run_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_schema_json_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_set_state_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_list_callback_url_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowTriggersOperations(object): + """WorkflowTriggersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.WorkflowTriggerListResult"]: + """Gets a list of workflow triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowTriggerListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowTriggerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowTriggerListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> "_models.WorkflowTrigger": + """Gets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTrigger, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTrigger + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTrigger"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTrigger', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}"} # type: ignore + + + @distributed_trace + def reset( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> None: + """Resets a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_reset_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.reset.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + reset.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset"} # type: ignore + + + @distributed_trace + def run( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> None: + """Runs a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_run_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.run.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + run.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run"} # type: ignore + + + @distributed_trace + def get_schema_json( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> "_models.JsonSchema": + """Get the trigger schema as JSON. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: JsonSchema, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.JsonSchema + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.JsonSchema"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_schema_json_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.get_schema_json.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('JsonSchema', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_schema_json.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json"} # type: ignore + + + @distributed_trace + def set_state( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + set_state: "_models.SetTriggerStateActionDefinition", + **kwargs: Any + ) -> None: + """Sets the state of a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param set_state: The workflow trigger state. + :type set_state: ~azure.mgmt.logic.models.SetTriggerStateActionDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(set_state, 'SetTriggerStateActionDefinition') + + request = build_set_state_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.set_state.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + set_state.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState"} # type: ignore + + + @distributed_trace + def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + trigger_name: str, + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the callback URL for a workflow trigger. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + api_version=api_version, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py deleted file mode 100644 index f6a72051320..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_operations.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowVersionOperations(object): - """WorkflowVersionOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - workflow_name, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowVersionListResult" - """Gets a list of workflow versions. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param top: The number of items to be included in the result. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersionListResult or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowVersionListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersionListResult"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - else: - url = next_link - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('WorkflowVersionListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions'} - - def get( - self, - resource_group_name, # type: str - workflow_name, # type: str - version_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowVersion" - """Gets a workflow version. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param version_id: The workflow versionId. - :type version_id: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowVersion or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowVersion - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowVersion"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - api_version = "2019-05-01" - - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'versionId': self._serialize.url("version_id", version_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowVersion', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py deleted file mode 100644 index 6a3515447af..00000000000 --- a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_trigger_operations.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class WorkflowVersionTriggerOperations(object): - """WorkflowVersionTriggerOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~logic_management_client.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list_callback_url( - self, - resource_group_name, # type: str - workflow_name, # type: str - version_id, # type: str - trigger_name, # type: str - not_after=None, # type: Optional[datetime.datetime] - key_type=None, # type: Optional[Union[str, "models.KeyType"]] - **kwargs # type: Any - ): - # type: (...) -> "models.WorkflowTriggerCallbackUrl" - """Get the callback url for a trigger of a workflow version. - - :param resource_group_name: The resource group name. - :type resource_group_name: str - :param workflow_name: The workflow name. - :type workflow_name: str - :param version_id: The workflow versionId. - :type version_id: str - :param trigger_name: The workflow trigger name. - :type trigger_name: str - :param not_after: The expiry time. - :type not_after: ~datetime.datetime - :param key_type: The key type. - :type key_type: str or ~logic_management_client.models.KeyType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: WorkflowTriggerCallbackUrl or the result of cls(response) - :rtype: ~logic_management_client.models.WorkflowTriggerCallbackUrl - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["models.WorkflowTriggerCallbackUrl"] - error_map = kwargs.pop('error_map', {404: ResourceNotFoundError, 409: ResourceExistsError}) - - _parameters = models.GetCallbackUrlParameters(not_after=not_after, key_type=key_type) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - - # Construct URL - url = self.list_callback_url.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'workflowName': self._serialize.url("workflow_name", workflow_name, 'str'), - 'versionId': self._serialize.url("version_id", version_id, 'str'), - 'triggerName': self._serialize.url("trigger_name", trigger_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' - - # Construct and send request - body_content_kwargs = {} # type: Dict[str, Any] - if _parameters is not None: - body_content = self._serialize.body(_parameters, 'GetCallbackUrlParameters') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) - - deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_callback_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl'} diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py new file mode 100644 index 00000000000..152e2aea24a --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_version_triggers_operations.py @@ -0,0 +1,173 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_callback_url_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + version_id: str, + trigger_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "versionId": _SERIALIZER.url("version_id", version_id, 'str'), + "triggerName": _SERIALIZER.url("trigger_name", trigger_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + +class WorkflowVersionTriggersOperations(object): + """WorkflowVersionTriggersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + version_id: str, + trigger_name: str, + parameters: Optional["_models.GetCallbackUrlParameters"] = None, + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the callback url for a trigger of a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param version_id: The workflow versionId. + :type version_id: str + :param trigger_name: The workflow trigger name. + :type trigger_name: str + :param parameters: The callback URL parameters. Default value is None. + :type parameters: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if parameters is not None: + _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') + else: + _json = None + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + version_id=version_id, + trigger_name=trigger_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py new file mode 100644 index 00000000000..8b0e2802a12 --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflow_versions_operations.py @@ -0,0 +1,277 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + version_id: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + "versionId": _SERIALIZER.url("version_id", version_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + +class WorkflowVersionsOperations(object): + """WorkflowVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + resource_group_name: str, + workflow_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> Iterable["_models.WorkflowVersionListResult"]: + """Gets a list of workflow versions. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowVersionListResult or the result of + cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowVersionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowVersionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + top=top, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowVersionListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + version_id: str, + **kwargs: Any + ) -> "_models.WorkflowVersion": + """Gets a workflow version. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param version_id: The workflow versionId. + :type version_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowVersion, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + version_id=version_id, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}"} # type: ignore + diff --git a/src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py new file mode 100644 index 00000000000..8aaa77ccc7c --- /dev/null +++ b/src/logic/azext_logic/vendored_sdks/logic/operations/_workflows_operations.py @@ -0,0 +1,1677 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + +from msrest import Serializer + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._vendor import _convert_request, _format_url_section +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +def build_list_by_subscription_request( + subscription_id: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows") + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_list_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + *, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if top is not None: + _query_parameters['$top'] = _SERIALIZER.query("top", top, 'int') + if filter is not None: + _query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_get_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_create_or_update_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_update_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_delete_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_disable_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_enable_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_generate_upgraded_definition_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_list_callback_url_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_list_swagger_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + **kwargs + ) + + +def build_move_request_initial( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_regenerate_access_key_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_validate_by_resource_group_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + + +def build_validate_by_location_request( + subscription_id: str, + resource_group_name: str, + location: str, + workflow_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate") # pylint: disable=line-too-long + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str'), + "location": _SERIALIZER.url("location", location, 'str'), + "workflowName": _SERIALIZER.url("workflow_name", workflow_name, 'str'), + } + + _url = _format_url_section(_url, **path_format_arguments) + + # Construct parameters + _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=_url, + params=_query_parameters, + headers=_header_parameters, + json=json, + content=content, + **kwargs + ) + +class WorkflowsOperations(object): + """WorkflowsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.logic.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_by_subscription( + self, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.WorkflowListResult"]: + """Gets a list of workflows by subscription. + + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: State, + Trigger, and ReferencedResourceId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.Logic/workflows"} # type: ignore + + @distributed_trace + def list_by_resource_group( + self, + resource_group_name: str, + top: Optional[int] = None, + filter: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.WorkflowListResult"]: + """Gets a list of workflows by resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param top: The number of items to be included in the result. Default value is None. + :type top: int + :param filter: The filter to apply on the operation. Options for filters include: State, + Trigger, and ReferencedResourceId. Default value is None. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkflowListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.WorkflowListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + filter=filter, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + api_version=api_version, + top=top, + filter=filter, + template_url=next_link, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("WorkflowListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows"} # type: ignore + + @distributed_trace + def get( + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> "_models.Workflow": + """Gets a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workflow, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workflow"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace + def create_or_update( + self, + resource_group_name: str, + workflow_name: str, + workflow: "_models.Workflow", + **kwargs: Any + ) -> "_models.Workflow": + """Creates or updates a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param workflow: The workflow. + :type workflow: ~azure.mgmt.logic.models.Workflow + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workflow, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workflow"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(workflow, 'Workflow') + + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.create_or_update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Workflow', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace + def update( + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> "_models.Workflow": + """Updates a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workflow, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.Workflow + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workflow"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workflow', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace + def delete( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: + """Deletes a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}"} # type: ignore + + + @distributed_trace + def disable( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: + """Disables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_disable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.disable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable"} # type: ignore + + + @distributed_trace + def enable( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: + """Enables a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_enable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.enable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable"} # type: ignore + + + @distributed_trace + def generate_upgraded_definition( + self, + resource_group_name: str, + workflow_name: str, + parameters: "_models.GenerateUpgradedDefinitionParameters", + **kwargs: Any + ) -> Any: + """Generates the upgraded definition for a workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param parameters: Parameters for generating an upgraded definition. + :type parameters: ~azure.mgmt.logic.models.GenerateUpgradedDefinitionParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') + + request = build_generate_upgraded_definition_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.generate_upgraded_definition.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + generate_upgraded_definition.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition"} # type: ignore + + + @distributed_trace + def list_callback_url( + self, + resource_group_name: str, + workflow_name: str, + list_callback_url: "_models.GetCallbackUrlParameters", + **kwargs: Any + ) -> "_models.WorkflowTriggerCallbackUrl": + """Get the workflow callback Url. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param list_callback_url: Which callback url to list. + :type list_callback_url: ~azure.mgmt.logic.models.GetCallbackUrlParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WorkflowTriggerCallbackUrl, or the result of cls(response) + :rtype: ~azure.mgmt.logic.models.WorkflowTriggerCallbackUrl + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerCallbackUrl"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') + + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_callback_url.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl"} # type: ignore + + + @distributed_trace + def list_swagger( + self, + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> Any: + """Gets an OpenAPI definition for the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: any, or the result of cls(response) + :rtype: any + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + + + request = build_list_swagger_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + template_url=self.list_swagger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('object', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + list_swagger.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger"} # type: ignore + + + def _move_initial( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + move: "_models.WorkflowReference", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(move, 'WorkflowReference') + + request = build_move_request_initial( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self._move_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _move_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move"} # type: ignore + + + @distributed_trace + def begin_move( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + move: "_models.WorkflowReference", + **kwargs: Any + ) -> LROPoller[None]: + """Moves an existing workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param move: The workflow to move. + :type move: ~azure.mgmt.logic.models.WorkflowReference + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._move_initial( + resource_group_name=resource_group_name, + workflow_name=workflow_name, + move=move, + api_version=api_version, + content_type=content_type, + cls=lambda x,y,z: x, + **kwargs + ) + kwargs.pop('error_map', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + + begin_move.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move"} # type: ignore + + @distributed_trace + def regenerate_access_key( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + key_type: "_models.RegenerateActionParameter", + **kwargs: Any + ) -> None: + """Regenerates the callback URL access key for request triggers. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param key_type: The access key type. + :type key_type: ~azure.mgmt.logic.models.RegenerateActionParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(key_type, 'RegenerateActionParameter') + + request = build_regenerate_access_key_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.regenerate_access_key.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + regenerate_access_key.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey"} # type: ignore + + + @distributed_trace + def validate_by_resource_group( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + workflow_name: str, + validate: "_models.Workflow", + **kwargs: Any + ) -> None: + """Validates the workflow. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param validate: The workflow. + :type validate: ~azure.mgmt.logic.models.Workflow + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(validate, 'Workflow') + + request = build_validate_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate"} # type: ignore + + + @distributed_trace + def validate_by_location( # pylint: disable=inconsistent-return-statements + self, + resource_group_name: str, + location: str, + workflow_name: str, + validate: "_models.Workflow", + **kwargs: Any + ) -> None: + """Validates the workflow definition. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param location: The workflow location. + :type location: str + :param workflow_name: The workflow name. + :type workflow_name: str + :param validate: The workflow. + :type validate: ~azure.mgmt.logic.models.Workflow + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2019-05-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(validate, 'Workflow') + + request = build_validate_by_location_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + workflow_name=workflow_name, + api_version=api_version, + content_type=content_type, + json=_json, + template_url=self.validate_by_location.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access + request, + stream=False, + **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + validate_by_location.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate"} # type: ignore + diff --git a/src/logic/setup.py b/src/logic/setup.py index aef7c7afe66..740fdae8157 100644 --- a/src/logic/setup.py +++ b/src/logic/setup.py @@ -16,7 +16,7 @@ # TODO: Confirm this is the right version number you want and it matches your # HISTORY.rst entry. -VERSION = '0.1.6' +VERSION = '0.1.7' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers