diff --git a/sdk/logic/azure-mgmt-logic/_meta.json b/sdk/logic/azure-mgmt-logic/_meta.json new file mode 100644 index 000000000000..e555100e2c0d --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.7.2", + "use": [ + "@autorest/python@5.12.0", + "@autorest/modelerfour@4.19.3" + ], + "commit": "e7da1b7cefd3d42a4d97145ffe9e0336da08cea0", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/logic/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "readme": "specification/logic/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py index 4cae4a689506..ff14d90f5571 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/__init__.py @@ -12,8 +12,7 @@ __version__ = VERSION __all__ = ['LogicManagementClient'] -try: - from ._patch import patch_sdk # type: ignore - patch_sdk() -except ImportError: - pass +# `._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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py index 42adaf981857..731bb386a878 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_configuration.py @@ -6,18 +6,16 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import TYPE_CHECKING +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 +from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy from ._version import VERSION if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any - from azure.core.credentials import TokenCredential @@ -35,16 +33,15 @@ class LogicManagementClientConfiguration(Configuration): 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) 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 @@ -68,4 +65,4 @@ def _configure( 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, *self.credential_scopes, **kwargs) + self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_logic_management_client.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_logic_management_client.py index 0cd3153bba30..94172304db65 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_logic_management_client.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_logic_management_client.py @@ -6,49 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import TYPE_CHECKING +from copy import deepcopy +from typing import Any, Optional, TYPE_CHECKING +from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer +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 typing import Any, Optional - from azure.core.credentials import TokenCredential -from ._configuration import LogicManagementClientConfiguration -from .operations import WorkflowsOperations -from .operations import WorkflowVersionsOperations -from .operations import WorkflowTriggersOperations -from .operations import WorkflowVersionTriggersOperations -from .operations import WorkflowTriggerHistoriesOperations -from .operations import WorkflowRunsOperations -from .operations import WorkflowRunActionsOperations -from .operations import WorkflowRunActionRepetitionsOperations -from .operations import WorkflowRunActionRepetitionsRequestHistoriesOperations -from .operations import WorkflowRunActionRequestHistoriesOperations -from .operations import WorkflowRunActionScopeRepetitionsOperations -from .operations import WorkflowRunOperationsOperations -from .operations import IntegrationAccountsOperations -from .operations import IntegrationAccountAssembliesOperations -from .operations import IntegrationAccountBatchConfigurationsOperations -from .operations import IntegrationAccountSchemasOperations -from .operations import IntegrationAccountMapsOperations -from .operations import IntegrationAccountPartnersOperations -from .operations import IntegrationAccountAgreementsOperations -from .operations import IntegrationAccountCertificatesOperations -from .operations import IntegrationAccountSessionsOperations -from .operations import IntegrationServiceEnvironmentsOperations -from .operations import IntegrationServiceEnvironmentSkusOperations -from .operations import IntegrationServiceEnvironmentNetworkHealthOperations -from .operations import IntegrationServiceEnvironmentManagedApisOperations -from .operations import IntegrationServiceEnvironmentManagedApiOperationsOperations -from .operations import Operations -from . import models - - -class LogicManagementClient(object): +class LogicManagementClient: """REST API for Azure Logic Apps. :ivar workflows: WorkflowsOperations operations @@ -58,133 +31,157 @@ class LogicManagementClient(object): :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 + :vartype workflow_version_triggers: + azure.mgmt.logic.operations.WorkflowVersionTriggersOperations :ivar workflow_trigger_histories: WorkflowTriggerHistoriesOperations operations - :vartype workflow_trigger_histories: azure.mgmt.logic.operations.WorkflowTriggerHistoriesOperations + :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 + :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 + :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 + :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 + :vartype integration_account_partners: + azure.mgmt.logic.operations.IntegrationAccountPartnersOperations :ivar integration_account_agreements: IntegrationAccountAgreementsOperations operations - :vartype integration_account_agreements: azure.mgmt.logic.operations.IntegrationAccountAgreementsOperations + :vartype integration_account_agreements: + azure.mgmt.logic.operations.IntegrationAccountAgreementsOperations :ivar integration_account_certificates: IntegrationAccountCertificatesOperations operations - :vartype integration_account_certificates: azure.mgmt.logic.operations.IntegrationAccountCertificatesOperations + :vartype integration_account_certificates: + azure.mgmt.logic.operations.IntegrationAccountCertificatesOperations :ivar integration_account_sessions: IntegrationAccountSessionsOperations operations - :vartype integration_account_sessions: azure.mgmt.logic.operations.IntegrationAccountSessionsOperations + :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 + :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 :param subscription_id: The subscription id. :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: 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) + 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._serialize.client_side_validation = False 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, # type: 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.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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_metadata.json b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_metadata.json new file mode 100644 index 000000000000..20335cf74980 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_metadata.json @@ -0,0 +1,128 @@ +{ + "chosen_version": "2019-05-01", + "total_api_version_list": ["2019-05-01"], + "client": { + "name": "LogicManagementClient", + "filename": "_logic_management_client", + "description": "REST API for Azure Logic Apps.", + "host_value": "\"https://management.azure.com\"", + "parameterized_host_template": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"LogicManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"LogicManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The subscription id.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The subscription id.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=\"https://management.azure.com\", # type: str", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: str = \"https://management.azure.com\",", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "workflows": "WorkflowsOperations", + "workflow_versions": "WorkflowVersionsOperations", + "workflow_triggers": "WorkflowTriggersOperations", + "workflow_version_triggers": "WorkflowVersionTriggersOperations", + "workflow_trigger_histories": "WorkflowTriggerHistoriesOperations", + "workflow_runs": "WorkflowRunsOperations", + "workflow_run_actions": "WorkflowRunActionsOperations", + "workflow_run_action_repetitions": "WorkflowRunActionRepetitionsOperations", + "workflow_run_action_repetitions_request_histories": "WorkflowRunActionRepetitionsRequestHistoriesOperations", + "workflow_run_action_request_histories": "WorkflowRunActionRequestHistoriesOperations", + "workflow_run_action_scope_repetitions": "WorkflowRunActionScopeRepetitionsOperations", + "workflow_run_operations": "WorkflowRunOperationsOperations", + "integration_accounts": "IntegrationAccountsOperations", + "integration_account_assemblies": "IntegrationAccountAssembliesOperations", + "integration_account_batch_configurations": "IntegrationAccountBatchConfigurationsOperations", + "integration_account_schemas": "IntegrationAccountSchemasOperations", + "integration_account_maps": "IntegrationAccountMapsOperations", + "integration_account_partners": "IntegrationAccountPartnersOperations", + "integration_account_agreements": "IntegrationAccountAgreementsOperations", + "integration_account_certificates": "IntegrationAccountCertificatesOperations", + "integration_account_sessions": "IntegrationAccountSessionsOperations", + "integration_service_environments": "IntegrationServiceEnvironmentsOperations", + "integration_service_environment_skus": "IntegrationServiceEnvironmentSkusOperations", + "integration_service_environment_network_health": "IntegrationServiceEnvironmentNetworkHealthOperations", + "integration_service_environment_managed_apis": "IntegrationServiceEnvironmentManagedApisOperations", + "integration_service_environment_managed_api_operations": "IntegrationServiceEnvironmentManagedApiOperationsOperations", + "operations": "Operations" + } +} \ No newline at end of file diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_patch.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_vendor.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_version.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_version.py index b77ac9246082..e5754a47ce68 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_version.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/__init__.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/__init__.py index 6763259b4b00..23b8536c72c8 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/__init__.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/__init__.py @@ -8,3 +8,8 @@ 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_configuration.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_configuration.py index 239e45624b73..8e0d6c3c181c 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_configuration.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_configuration.py @@ -10,7 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy from .._version import VERSION @@ -37,11 +37,11 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: + super(LogicManagementClientConfiguration, self).__init__(**kwargs) 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 @@ -64,4 +64,4 @@ def _configure( 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, *self.credential_scopes, **kwargs) + self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_logic_management_client.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_logic_management_client.py index 085283195460..143f4ceda4d7 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_logic_management_client.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_logic_management_client.py @@ -6,47 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional, TYPE_CHECKING +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer +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 -from ._configuration import LogicManagementClientConfiguration -from .operations import WorkflowsOperations -from .operations import WorkflowVersionsOperations -from .operations import WorkflowTriggersOperations -from .operations import WorkflowVersionTriggersOperations -from .operations import WorkflowTriggerHistoriesOperations -from .operations import WorkflowRunsOperations -from .operations import WorkflowRunActionsOperations -from .operations import WorkflowRunActionRepetitionsOperations -from .operations import WorkflowRunActionRepetitionsRequestHistoriesOperations -from .operations import WorkflowRunActionRequestHistoriesOperations -from .operations import WorkflowRunActionScopeRepetitionsOperations -from .operations import WorkflowRunOperationsOperations -from .operations import IntegrationAccountsOperations -from .operations import IntegrationAccountAssembliesOperations -from .operations import IntegrationAccountBatchConfigurationsOperations -from .operations import IntegrationAccountSchemasOperations -from .operations import IntegrationAccountMapsOperations -from .operations import IntegrationAccountPartnersOperations -from .operations import IntegrationAccountAgreementsOperations -from .operations import IntegrationAccountCertificatesOperations -from .operations import IntegrationAccountSessionsOperations -from .operations import IntegrationServiceEnvironmentsOperations -from .operations import IntegrationServiceEnvironmentSkusOperations -from .operations import IntegrationServiceEnvironmentNetworkHealthOperations -from .operations import IntegrationServiceEnvironmentManagedApisOperations -from .operations import IntegrationServiceEnvironmentManagedApiOperationsOperations -from .operations import Operations -from .. import models - - -class LogicManagementClient(object): +class LogicManagementClient: """REST API for Azure Logic Apps. :ivar workflows: WorkflowsOperations operations @@ -56,132 +31,159 @@ class LogicManagementClient(object): :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 + :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 + :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 + :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 + :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 + :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 + :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 + :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 + :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 + :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 + :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 + :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 + :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 str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: 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: Optional[str] = None, + base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = LogicManagementClientConfiguration(credential, subscription_id, **kwargs) + 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._serialize.client_side_validation = False 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 + """ - 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) + 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() diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_patch.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/_patch.py new file mode 100644 index 000000000000..74e48ecd07cf --- /dev/null +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_agreements_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_agreements_operations.py index c0df41361ac3..7bc79fddd519 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_agreements_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_agreements_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.IntegrationAccountAgreementListResult"]: """Gets a list of integration account agreements. @@ -61,8 +67,10 @@ def list( AgreementType. :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreementListResult"] @@ -70,40 +78,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountAgreementListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -116,23 +121,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationAccountAgreement": """Gets an integration account agreement. @@ -152,34 +159,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) @@ -188,15 +185,18 @@ async def get( 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 + **kwargs: Any ) -> "_models.IntegrationAccountAgreement": """Creates or updates an integration account agreement. @@ -218,39 +218,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(agreement, 'IntegrationAccountAgreement') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -263,14 +253,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, agreement_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration account agreement. @@ -290,34 +283,24 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -325,13 +308,15 @@ async def delete( 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 + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -353,39 +338,29 @@ async def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + agreement_name=agreement_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -394,4 +369,6 @@ async def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_assemblies_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_assemblies_operations.py index 5d3df83244e4..0c76a45a5634 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_assemblies_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_assemblies_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,11 +46,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group_name: str, integration_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AssemblyCollection"]: """List the assemblies for an integration account. @@ -63,36 +69,33 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("AssemblyCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -105,23 +108,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.AssemblyDefinition": """Get an assembly for an integration account. @@ -141,34 +146,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AssemblyDefinition', pipeline_response) @@ -177,15 +172,18 @@ async def get( 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 + **kwargs: Any ) -> "_models.AssemblyDefinition": """Create or update an assembly for an integration account. @@ -207,39 +205,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(assembly_artifact, 'AssemblyDefinition') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -252,14 +240,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, assembly_artifact_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an assembly for an integration account. @@ -279,34 +270,24 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -314,12 +295,14 @@ async def delete( 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 + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the content callback url for an integration account assembly. @@ -339,34 +322,24 @@ async def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -375,4 +348,6 @@ async def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_batch_configurations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_batch_configurations_operations.py index 73798fc2bbde..8fcd7d4eae2a 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_batch_configurations_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_batch_configurations_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,11 +46,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group_name: str, integration_account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.BatchConfigurationCollection"]: """List the batch configurations for an integration account. @@ -54,8 +60,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BatchConfigurationCollection"] @@ -63,36 +71,33 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("BatchConfigurationCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -105,23 +110,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.BatchConfiguration": """Get a batch configuration for an integration account. @@ -141,34 +148,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BatchConfiguration', pipeline_response) @@ -177,15 +174,18 @@ async def get( 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 + **kwargs: Any ) -> "_models.BatchConfiguration": """Create or update a batch configuration for an integration account. @@ -207,39 +207,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(batch_configuration, 'BatchConfiguration') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -252,14 +242,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, batch_configuration_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete a batch configuration for an integration account. @@ -279,37 +272,28 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_certificates_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_certificates_operations.py index 8de1fd4badf7..49d675f7749e 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_certificates_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_certificates_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,12 +46,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group_name: str, integration_account_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IntegrationAccountCertificateListResult"]: """Gets a list of integration account certificates. @@ -57,8 +63,10 @@ def list( :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: An iterator like instance of either IntegrationAccountCertificateListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountCertificateListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificateListResult"] @@ -66,38 +74,35 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountCertificateListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,23 +115,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationAccountCertificate": """Gets an integration account certificate. @@ -146,34 +153,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) @@ -182,15 +179,18 @@ async def get( 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 + **kwargs: Any ) -> "_models.IntegrationAccountCertificate": """Creates or updates an integration account certificate. @@ -212,39 +212,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(certificate, 'IntegrationAccountCertificate') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -257,14 +247,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, certificate_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration account certificate. @@ -284,37 +277,28 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_maps_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_maps_operations.py index e6a9521bcac8..a824863b638d 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_maps_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_maps_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.IntegrationAccountMapListResult"]: """Gets a list of integration account maps. @@ -60,8 +66,10 @@ def list( :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: An iterator like instance of either IntegrationAccountMapListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountMapListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountMapListResult"] @@ -69,40 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountMapListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,23 +120,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationAccountMap": """Gets an integration account map. @@ -151,34 +158,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) @@ -187,17 +184,22 @@ async def get( 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 + **kwargs: Any ) -> "_models.IntegrationAccountMap": - """Creates or updates an integration account map. + """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 @@ -217,39 +219,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(map, 'IntegrationAccountMap') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -262,14 +254,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, map_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration account map. @@ -289,34 +284,24 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -324,13 +309,15 @@ async def delete( 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 + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -352,39 +339,29 @@ async def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + map_name=map_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -393,4 +370,6 @@ async def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_partners_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_partners_operations.py index 857d3f789f98..4a303b02ac93 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_partners_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_partners_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.IntegrationAccountPartnerListResult"]: """Gets a list of integration account partners. @@ -60,8 +66,10 @@ def list( :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: An iterator like instance of either IntegrationAccountPartnerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountPartnerListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartnerListResult"] @@ -69,40 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountPartnerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,23 +120,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationAccountPartner": """Gets an integration account partner. @@ -151,34 +158,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) @@ -187,15 +184,18 @@ async def get( 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 + **kwargs: Any ) -> "_models.IntegrationAccountPartner": """Creates or updates an integration account partner. @@ -217,39 +217,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(partner, 'IntegrationAccountPartner') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -262,14 +252,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, partner_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration account partner. @@ -289,34 +282,24 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -324,13 +307,15 @@ async def delete( 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 + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -352,39 +337,29 @@ async def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + partner_name=partner_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -393,4 +368,6 @@ async def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_schemas_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_schemas_operations.py index 282afaddd2e7..5cf5c42e4b3e 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_schemas_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_schemas_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.IntegrationAccountSchemaListResult"]: """Gets a list of integration account schemas. @@ -60,8 +66,10 @@ def list( :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: An iterator like instance of either IntegrationAccountSchemaListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountSchemaListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchemaListResult"] @@ -69,40 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountSchemaListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,23 +120,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationAccountSchema": """Gets an integration account schema. @@ -151,34 +158,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) @@ -187,15 +184,18 @@ async def get( 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 + **kwargs: Any ) -> "_models.IntegrationAccountSchema": """Creates or updates an integration account schema. @@ -217,39 +217,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(schema, 'IntegrationAccountSchema') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -262,14 +252,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, schema_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration account schema. @@ -289,34 +282,24 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -324,13 +307,15 @@ async def delete( 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 + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the content callback url. @@ -352,39 +337,29 @@ async def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + schema_name=schema_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -393,4 +368,6 @@ async def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_sessions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_sessions_operations.py index 10f7f711dfd0..2b6c833dff43 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_sessions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_account_sessions_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.IntegrationAccountSessionListResult"]: """Gets a list of integration account sessions. @@ -60,8 +66,10 @@ def list( :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: An iterator like instance of either IntegrationAccountSessionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountSessionListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSessionListResult"] @@ -69,40 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountSessionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,23 +120,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationAccountSession": """Gets an integration account session. @@ -151,34 +158,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) @@ -187,15 +184,18 @@ async def get( 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 + **kwargs: Any ) -> "_models.IntegrationAccountSession": """Creates or updates an integration account session. @@ -217,39 +217,29 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(session, 'IntegrationAccountSession') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -262,14 +252,17 @@ async def create_or_update( 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( self, resource_group_name: str, integration_account_name: str, session_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration account session. @@ -289,37 +282,28 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_accounts_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_accounts_operations.py index f9df4f28a45e..de75b32b0641 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_accounts_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_accounts_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -41,18 +46,21 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **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. :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] @@ -60,36 +68,31 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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) + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -102,22 +105,24 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> AsyncIterable["_models.IntegrationAccountListResult"]: """Gets a list of integration accounts by resource group. @@ -126,8 +131,10 @@ def list_by_resource_group( :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: An iterator like instance of either IntegrationAccountListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationAccountListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountListResult"] @@ -135,37 +142,33 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + 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) + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -178,22 +181,24 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationAccount": """Gets an integration account. @@ -211,33 +216,23 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -246,14 +241,17 @@ async def get( 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 + **kwargs: Any ) -> "_models.IntegrationAccount": """Creates or updates an integration account. @@ -273,38 +271,28 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -317,14 +305,17 @@ async def create_or_update( 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 + **kwargs: Any ) -> "_models.IntegrationAccount": """Updates an integration account. @@ -344,38 +335,28 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_account, 'IntegrationAccount') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -384,13 +365,16 @@ async def update( 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( self, resource_group_name: str, integration_account_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration account. @@ -408,33 +392,23 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -442,12 +416,14 @@ async def delete( 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 + **kwargs: Any ) -> "_models.CallbackUrl": """Gets the integration account callback URL. @@ -467,38 +443,28 @@ async def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CallbackUrl', pipeline_response) @@ -507,14 +473,17 @@ async def list_callback_url( 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 + **kwargs: Any ) -> AsyncIterable["_models.KeyVaultKeyCollection"]: """Gets the integration account's Key Vault keys. @@ -525,53 +494,51 @@ def list_key_vault_keys( :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) + :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 """ + 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', {})) - api_version = "2019-05-01" - content_type = "application/json" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_key_vault_keys.metadata['url'] # type: ignore - 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') - - 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) + _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, + 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: - url = next_link - query_parameters = {} # type: Dict[str, Any] - 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.get(url, query_parameters, header_parameters, **body_content_kwargs) + _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, + 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) + deserialized = self._deserialize("KeyVaultKeyCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -584,23 +551,25 @@ async def get_next(next_link=None): 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) + 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( self, resource_group_name: str, integration_account_name: str, log_tracking_events: "_models.TrackingEventsDefinition", - **kwargs + **kwargs: Any ) -> None: """Logs the integration account's tracking events. @@ -620,38 +589,28 @@ async def log_tracking_events( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.log_tracking_events.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -659,12 +618,14 @@ async def log_tracking_events( 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 + **kwargs: Any ) -> "_models.IntegrationAccount": """Regenerates the integration account access key. @@ -684,38 +645,28 @@ async def regenerate_access_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_access_key.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_regenerate_access_key_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -724,4 +675,6 @@ async def regenerate_access_key( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py index b1686cf7c31c..73ebd807f475 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_api_operations_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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_service_environment_managed_api_operations_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,12 +46,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group: str, integration_service_environment_name: str, api_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiOperationListResult"]: """Gets the managed Api operations. @@ -57,8 +63,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApiOperationListResult"] @@ -66,37 +74,35 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("ApiOperationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -109,12 +115,13 @@ async def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_apis_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_apis_operations.py index f7dfef1cc708..5434f3eaa48e 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_apis_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_managed_apis_operations.py @@ -5,19 +5,24 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -43,12 +48,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group: str, integration_service_environment_name: str, - **kwargs - ) -> AsyncIterable["_models.ManagedApiListResult"]: + **kwargs: Any + ) -> AsyncIterable["_models.IntegrationServiceEnvironmentManagedApiListResult"]: """Gets the integration service environment managed Apis. :param resource_group: The resource group. @@ -56,45 +62,44 @@ def list( :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 ManagedApiListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.ManagedApiListResult] + :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 """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedApiListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApiListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + 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('ManagedApiListResult', pipeline_response) + deserialized = self._deserialize("IntegrationServiceEnvironmentManagedApiListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -107,24 +112,26 @@ async def get_next(next_link=None): 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) + 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 - ) -> "_models.ManagedApi": + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironmentManagedApi": """Gets the integration service environment managed Api. :param resource_group: The resource group name. @@ -134,114 +141,105 @@ async def get( :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: ~azure.mgmt.logic.models.ManagedApi + :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.ManagedApi"] + 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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedApi', pipeline_response) + 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, - **kwargs - ) -> "_models.ManagedApi": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedApi"] + 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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self._put_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment_managed_api, 'IntegrationServiceEnvironmentManagedApi') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedApi', pipeline_response) + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ManagedApi', pipeline_response) + 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, - **kwargs - ) -> AsyncLROPoller["_models.ManagedApi"]: + 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. @@ -250,18 +248,27 @@ async def begin_put( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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 ManagedApi or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.logic.models.ManagedApi] - :raises ~azure.core.exceptions.HttpResponseError: + :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 """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedApi"] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -272,28 +279,22 @@ async def begin_put( 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, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ManagedApi', pipeline_response) - + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - 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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -305,6 +306,7 @@ def get_long_running_output(pipeline_response): ) else: 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( @@ -312,54 +314,45 @@ async def _delete_initial( resource_group: str, integration_service_environment_name: str, api_name: str, - **kwargs + **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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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, error_format=ARMErrorFormat) + 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( self, resource_group: str, integration_service_environment_name: str, api_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the integration service environment managed Api. @@ -371,15 +364,17 @@ async def begin_delete( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -394,22 +389,14 @@ async def begin_delete( cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - 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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -421,4 +408,5 @@ def get_long_running_output(pipeline_response): ) else: 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_network_health_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_network_health_operations.py index 23b77d8815df..67e92dc8383e 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_network_health_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_network_health_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings 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 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]] @@ -40,11 +44,12 @@ 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 + **kwargs: Any ) -> Dict[str, "_models.IntegrationServiceEnvironmentSubnetNetworkHealth"]: """Gets the integration service environment network health. @@ -53,7 +58,8 @@ 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 mapping str to IntegrationServiceEnvironmentSubnetNetworkHealth, or the result of cls(response) + :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 """ @@ -62,33 +68,23 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('{IntegrationServiceEnvironmentSubnetNetworkHealth}', pipeline_response) @@ -97,4 +93,6 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} # type: ignore + diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_skus_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_skus_operations.py index 3cb215a66278..73cda2ce4840 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_skus_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environment_skus_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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_service_environment_skus_operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,11 +46,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group: str, integration_service_environment_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IntegrationServiceEnvironmentSkuList"]: """Gets a list of integration service environment Skus. @@ -54,8 +60,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentSkuList"] @@ -63,36 +71,33 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + 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) + deserialized = self._deserialize("IntegrationServiceEnvironmentSkuList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -105,12 +110,13 @@ async def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environments_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environments_operations.py index 39d9c7958280..27f19444e6cf 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environments_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_integration_service_environments_operations.py @@ -5,19 +5,24 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -43,18 +48,21 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **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. :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] @@ -62,36 +70,31 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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) + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -104,22 +107,24 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> AsyncIterable["_models.IntegrationServiceEnvironmentListResult"]: """Gets a list of integration service environments by resource group. @@ -128,8 +133,10 @@ def list_by_resource_group( :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: An iterator like instance of either IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] @@ -137,37 +144,33 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + 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) + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -180,22 +183,24 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.IntegrationServiceEnvironment": """Gets an integration service environment. @@ -213,33 +218,23 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -248,53 +243,44 @@ async def get( 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 + **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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -306,14 +292,17 @@ async def _create_or_update_initial( 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 + **kwargs: Any ) -> AsyncLROPoller["_models.IntegrationServiceEnvironment"]: """Creates or updates an integration service environment. @@ -325,15 +314,20 @@ async def begin_create_or_update( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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: + :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 """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -345,27 +339,21 @@ async def begin_create_or_update( resource_group=resource_group, integration_service_environment_name=integration_service_environment_name, integration_service_environment=integration_service_environment, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', 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 - 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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -377,6 +365,7 @@ def get_long_running_output(pipeline_response): ) else: 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( @@ -384,46 +373,35 @@ async def _update_initial( resource_group: str, integration_service_environment_name: str, integration_service_environment: "_models.IntegrationServiceEnvironment", - **kwargs + **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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + 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) - 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, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -431,14 +409,17 @@ async def _update_initial( 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 + **kwargs: Any ) -> AsyncLROPoller["_models.IntegrationServiceEnvironment"]: """Updates an integration service environment. @@ -450,15 +431,20 @@ async def begin_update( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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: + :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 """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -470,27 +456,21 @@ async def begin_update( resource_group=resource_group, integration_service_environment_name=integration_service_environment_name, integration_service_environment=integration_service_environment, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', 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 - 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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -502,13 +482,15 @@ def get_long_running_output(pipeline_response): ) else: 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( self, resource_group: str, integration_service_environment_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an integration service environment. @@ -526,33 +508,23 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -560,11 +532,13 @@ async def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore + + @distributed_trace_async async def restart( self, resource_group: str, integration_service_environment_name: str, - **kwargs + **kwargs: Any ) -> None: """Restarts an integration service environment. @@ -582,36 +556,27 @@ async def restart( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.restart.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_restart_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.restart.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_operations.py index b4a23f9e8077..88c63dce6d89 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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._operations import build_list_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -41,9 +46,10 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Logic REST API operations. @@ -57,30 +63,27 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = build_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + 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) @@ -93,12 +96,13 @@ async def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_operations.py index c58e31566f49..e9e9093d0835 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.WorkflowRunActionRepetitionDefinitionCollection"]: """Get all of a workflow run action repetitions. @@ -60,8 +66,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] @@ -69,38 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,17 +120,19 @@ async def get_next(next_link=None): 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) + 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, @@ -131,7 +140,7 @@ async def get( run_name: str, action_name: str, repetition_name: str, - **kwargs + **kwargs: Any ) -> "_models.WorkflowRunActionRepetitionDefinition": """Get a workflow run action repetition. @@ -155,36 +164,26 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) @@ -193,8 +192,11 @@ async def get( 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, @@ -202,7 +204,7 @@ def list_expression_traces( run_name: str, action_name: str, repetition_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ExpressionTraces"]: """Lists a workflow run expression trace. @@ -226,39 +228,39 @@ def list_expression_traces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_expression_traces.metadata['url'] # type: ignore - 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') - - request = self._client.post(url, query_parameters, header_parameters) + + 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, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("ExpressionTraces", pipeline_response) list_of_elem = deserialized.inputs if cls: list_of_elem = cls(list_of_elem) @@ -271,12 +273,13 @@ async def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py index d7d3d2917e66..b86ecf0f7238 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_repetitions_request_histories_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group_name: str, @@ -48,7 +54,7 @@ def list( run_name: str, action_name: str, repetition_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RequestHistoryListResult"]: """List a workflow run repetition request history. @@ -63,8 +69,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] @@ -72,39 +80,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -117,17 +125,19 @@ async def get_next(next_link=None): 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) + 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, @@ -136,7 +146,7 @@ async def get( action_name: str, repetition_name: str, request_history_name: str, - **kwargs + **kwargs: Any ) -> "_models.RequestHistory": """Gets a workflow run repetition request history. @@ -162,37 +172,27 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) @@ -201,4 +201,6 @@ async def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_request_histories_operations.py index bc058c31308f..c215a3d2ec09 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_request_histories_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_request_histories_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.RequestHistoryListResult"]: """List a workflow run request history. @@ -60,8 +66,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RequestHistoryListResult"] @@ -69,38 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,17 +120,19 @@ async def get_next(next_link=None): 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) + 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, @@ -131,7 +140,7 @@ async def get( run_name: str, action_name: str, request_history_name: str, - **kwargs + **kwargs: Any ) -> "_models.RequestHistory": """Gets a workflow run request history. @@ -155,36 +164,26 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) @@ -193,4 +192,6 @@ async def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py index 6630b6580397..d670d8efb53a 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_action_scope_repetitions_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.WorkflowRunActionRepetitionDefinitionCollection"]: """List the workflow run action scoped repetitions. @@ -60,8 +66,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] @@ -69,38 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,17 +120,19 @@ async def get_next(next_link=None): 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) + 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, @@ -131,7 +140,7 @@ async def get( run_name: str, action_name: str, repetition_name: str, - **kwargs + **kwargs: Any ) -> "_models.WorkflowRunActionRepetitionDefinition": """Get a workflow run action scoped repetition. @@ -155,36 +164,26 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) @@ -193,4 +192,6 @@ async def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_actions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_actions_operations.py index 4a36f6a492d0..1768501fc01a 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_actions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_actions_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group_name: str, @@ -48,7 +54,7 @@ def list( run_name: str, top: Optional[int] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkflowRunActionListResult"]: """Gets a list of workflow run actions. @@ -63,8 +69,10 @@ def list( :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: An iterator like instance of either WorkflowRunActionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowRunActionListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionListResult"] @@ -72,41 +80,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + 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) + deserialized = self._deserialize("WorkflowRunActionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -119,24 +125,26 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.WorkflowRunAction": """Gets a workflow run action. @@ -158,35 +166,25 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunAction', pipeline_response) @@ -195,15 +193,18 @@ async def get( 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 + **kwargs: Any ) -> AsyncIterable["_models.ExpressionTraces"]: """Lists a workflow run expression trace. @@ -225,38 +226,37 @@ def list_expression_traces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_expression_traces.metadata['url'] # type: ignore - 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') - - request = self._client.post(url, query_parameters, header_parameters) + + 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, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("ExpressionTraces", pipeline_response) list_of_elem = deserialized.inputs if cls: list_of_elem = cls(list_of_elem) @@ -269,12 +269,13 @@ async def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_operations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_operations_operations.py index 5c7f372a64ae..17b0b1732012 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_operations_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_run_operations_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings 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 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]] @@ -40,13 +44,14 @@ 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 + **kwargs: Any ) -> "_models.WorkflowRun": """Gets an operation for a run. @@ -68,35 +73,25 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) @@ -105,4 +100,6 @@ async def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_runs_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_runs_operations.py index b6e4a549910d..e63283b29c1d 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_runs_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_runs_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.WorkflowRunListResult"]: """Gets a list of workflow runs. @@ -61,7 +67,8 @@ def list( StartTime, and ClientTrackingId. :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) + :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 """ @@ -70,40 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) + deserialized = self._deserialize("WorkflowRunListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -116,23 +120,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.WorkflowRun": """Gets a workflow run. @@ -152,34 +158,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) @@ -188,14 +184,17 @@ async def get( 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( self, resource_group_name: str, workflow_name: str, run_name: str, - **kwargs + **kwargs: Any ) -> None: """Cancels a workflow run. @@ -215,37 +214,28 @@ async def cancel( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.cancel.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.cancel.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_trigger_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_trigger_histories_operations.py index 777ccda7ffb7..65fc6e2222cf 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_trigger_histories_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_trigger_histories_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,6 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group_name: str, @@ -48,7 +54,7 @@ def list( trigger_name: str, top: Optional[int] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkflowTriggerHistoryListResult"]: """Gets a list of workflow trigger histories. @@ -64,8 +70,10 @@ def list( StartTime, and ClientTrackingId. :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerHistoryListResult"] @@ -73,41 +81,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + 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) + deserialized = self._deserialize("WorkflowTriggerHistoryListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,24 +126,26 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.WorkflowTriggerHistory": """Gets a workflow trigger history. @@ -160,35 +168,25 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) @@ -197,15 +195,18 @@ async def get( 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( self, resource_group_name: str, workflow_name: str, trigger_name: str, history_name: str, - **kwargs + **kwargs: Any ) -> None: """Resubmits a workflow run based on the trigger history. @@ -228,38 +229,29 @@ async def resubmit( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.resubmit.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.resubmit.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_triggers_operations.py index be54102263a3..4957a7ced94d 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_triggers_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_triggers_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,13 +46,14 @@ def __init__(self, client, config, serializer, deserializer) -> None: 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 + **kwargs: Any ) -> AsyncIterable["_models.WorkflowTriggerListResult"]: """Gets a list of workflow triggers. @@ -60,8 +66,10 @@ def list( :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: An iterator like instance of either WorkflowTriggerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowTriggerListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowTriggerListResult"] @@ -69,40 +77,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) + deserialized = self._deserialize("WorkflowTriggerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,23 +120,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.WorkflowTrigger": """Gets a workflow trigger. @@ -151,34 +158,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTrigger', pipeline_response) @@ -187,14 +184,17 @@ async def get( 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( self, resource_group_name: str, workflow_name: str, trigger_name: str, - **kwargs + **kwargs: Any ) -> None: """Resets a workflow trigger. @@ -214,34 +214,24 @@ async def reset( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.reset.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.reset.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -249,12 +239,14 @@ async def reset( reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} # type: ignore + + @distributed_trace_async async def run( self, resource_group_name: str, workflow_name: str, trigger_name: str, - **kwargs + **kwargs: Any ) -> None: """Runs a workflow trigger. @@ -274,34 +266,24 @@ async def run( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.run.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.run.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -309,12 +291,14 @@ async def run( 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 + **kwargs: Any ) -> "_models.JsonSchema": """Get the trigger schema as JSON. @@ -334,34 +318,24 @@ async def get_schema_json( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get_schema_json.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get_schema_json.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JsonSchema', pipeline_response) @@ -370,15 +344,18 @@ async def get_schema_json( 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( self, resource_group_name: str, workflow_name: str, trigger_name: str, set_state: "_models.SetTriggerStateActionDefinition", - **kwargs + **kwargs: Any ) -> None: """Sets the state of a workflow trigger. @@ -400,39 +377,29 @@ async def set_state( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.set_state.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -440,12 +407,14 @@ async def set_state( 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 + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the callback URL for a workflow trigger. @@ -465,34 +434,24 @@ async def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -501,4 +460,6 @@ async def list_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_version_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_version_triggers_operations.py index 48c8deef2368..24a7971c5a49 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_version_triggers_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_version_triggers_operations.py @@ -5,16 +5,20 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings 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 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]] @@ -40,6 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def list_callback_url( self, resource_group_name: str, @@ -47,7 +52,7 @@ async def list_callback_url( version_id: str, trigger_name: str, parameters: Optional["_models.GetCallbackUrlParameters"] = None, - **kwargs + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the callback url for a trigger of a workflow version. @@ -71,43 +76,33 @@ async def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if parameters is not None: - body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') + _json = 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) + _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, + 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(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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -116,4 +111,6 @@ async def list_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_versions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_versions_operations.py index 3c413dc2b8e9..d180a06d9185 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_versions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflow_versions_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings 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, HttpRequest +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]] @@ -41,12 +46,13 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list( self, resource_group_name: str, workflow_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkflowVersionListResult"]: """Gets a list of workflow versions. @@ -57,8 +63,10 @@ def list( :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: An iterator like instance of either WorkflowVersionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.logic.models.WorkflowVersionListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowVersionListResult"] @@ -66,38 +74,35 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) + deserialized = self._deserialize("WorkflowVersionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,23 +115,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.WorkflowVersion": """Gets a workflow version. @@ -146,34 +153,24 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowVersion', pipeline_response) @@ -182,4 +179,6 @@ async def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflows_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflows_operations.py index 214bafdc8a1e..d4b762c551b5 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflows_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/aio/operations/_workflows_operations.py @@ -5,19 +5,24 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings 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, HttpRequest +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]] @@ -43,11 +48,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace def list_by_subscription( self, top: Optional[int] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WorkflowListResult"]: """Gets a list of workflows by subscription. @@ -66,38 +72,33 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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) + deserialized = self._deserialize("WorkflowListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,23 +111,25 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> AsyncIterable["_models.WorkflowListResult"]: """Gets a list of workflows by resource group. @@ -147,39 +150,35 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + 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: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + 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) + deserialized = self._deserialize("WorkflowListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -192,22 +191,24 @@ async def get_next(next_link=None): 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) + 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 + **kwargs: Any ) -> "_models.Workflow": """Gets a workflow. @@ -225,33 +226,23 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) @@ -260,14 +251,17 @@ async def get( 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 + **kwargs: Any ) -> "_models.Workflow": """Creates or updates a workflow. @@ -287,38 +281,28 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(workflow, 'Workflow') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -331,13 +315,16 @@ async def create_or_update( 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 + **kwargs: Any ) -> "_models.Workflow": """Updates a workflow. @@ -355,33 +342,23 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.patch(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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) @@ -390,13 +367,16 @@ async def update( 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( self, resource_group_name: str, workflow_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a workflow. @@ -414,33 +394,23 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -448,11 +418,13 @@ async def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore + + @distributed_trace_async async def disable( self, resource_group_name: str, workflow_name: str, - **kwargs + **kwargs: Any ) -> None: """Disables a workflow. @@ -470,33 +442,23 @@ async def disable( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.disable.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_disable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.disable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -504,11 +466,13 @@ async def disable( disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} # type: ignore + + @distributed_trace_async async def enable( self, resource_group_name: str, workflow_name: str, - **kwargs + **kwargs: Any ) -> None: """Enables a workflow. @@ -526,33 +490,23 @@ async def enable( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.enable.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_enable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.enable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -560,13 +514,15 @@ async def enable( 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 - ) -> object: + **kwargs: Any + ) -> Any: """Generates the upgraded definition for a workflow. :param resource_group_name: The resource group name. @@ -576,47 +532,37 @@ async def generate_upgraded_definition( :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: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + 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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.generate_upgraded_definition.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_generate_upgraded_definition_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -625,14 +571,17 @@ async def generate_upgraded_definition( 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 + **kwargs: Any ) -> "_models.WorkflowTriggerCallbackUrl": """Get the workflow callback Url. @@ -652,38 +601,28 @@ async def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -692,14 +631,17 @@ async def list_callback_url( 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 - ) -> object: + **kwargs: Any + ) -> Any: """Gets an OpenAPI definition for the workflow. :param resource_group_name: The resource group name. @@ -707,42 +649,32 @@ async def list_swagger( :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 + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + 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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.list_swagger.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_list_swagger_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.list_swagger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -751,65 +683,58 @@ async def list_swagger( 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( self, resource_group_name: str, workflow_name: str, move: "_models.WorkflowReference", - **kwargs + **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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._move_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(move, 'WorkflowReference') - 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, error_format=ARMErrorFormat) + 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( self, resource_group_name: str, workflow_name: str, move: "_models.WorkflowReference", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Moves an existing workflow. @@ -821,15 +746,18 @@ async def begin_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -841,24 +769,18 @@ async def begin_move( resource_group_name=resource_group_name, workflow_name=workflow_name, move=move, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - 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'), - } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -870,14 +792,16 @@ def get_long_running_output(pipeline_response): ) else: 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( self, resource_group_name: str, workflow_name: str, key_type: "_models.RegenerateActionParameter", - **kwargs + **kwargs: Any ) -> None: """Regenerates the callback URL access key for request triggers. @@ -897,38 +821,28 @@ async def regenerate_access_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_access_key.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -936,12 +850,14 @@ async def regenerate_access_key( 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( self, resource_group_name: str, workflow_name: str, validate: "_models.Workflow", - **kwargs + **kwargs: Any ) -> None: """Validates the workflow. @@ -961,38 +877,28 @@ async def validate_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate_by_resource_group.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1000,13 +906,15 @@ async def validate_by_resource_group( 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( self, resource_group_name: str, location: str, workflow_name: str, validate: "_models.Workflow", - **kwargs + **kwargs: Any ) -> None: """Validates the workflow definition. @@ -1028,42 +936,33 @@ async def validate_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate_by_location.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(validate, 'Workflow') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_validate_by_location_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + workflow_name=workflow_name, + 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) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py index edb0930f64f8..5c09cf9afc92 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/__init__.py @@ -6,406 +6,212 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -try: - 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 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 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 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 -except (SyntaxError, ImportError): - 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 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 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 FlowAccessControlConfiguration # type: ignore - from ._models import FlowAccessControlConfigurationPolicy # 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 IntegrationServiceEnvironmenEncryptionConfiguration # type: ignore - from ._models import IntegrationServiceEnvironmenEncryptionKeyReference # 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 IpAddressRange # 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 OpenAuthenticationAccessPolicies # type: ignore - from ._models import OpenAuthenticationAccessPolicy # type: ignore - from ._models import OpenAuthenticationPolicyClaim # 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 WorkflowReference # 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 WorkflowTriggerReference # 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, @@ -429,6 +235,7 @@ IntegrationServiceEnvironmentSkuName, IntegrationServiceEnvironmentSkuScaleType, KeyType, + ManagedServiceIdentityType, MapType, MessageFilterType, OpenAuthenticationProviderType, @@ -549,6 +356,10 @@ 'IntegrationServiceEnvironment', 'IntegrationServiceEnvironmentAccessEndpoint', 'IntegrationServiceEnvironmentListResult', + 'IntegrationServiceEnvironmentManagedApi', + 'IntegrationServiceEnvironmentManagedApiDeploymentParameters', + 'IntegrationServiceEnvironmentManagedApiListResult', + 'IntegrationServiceEnvironmentManagedApiProperties', 'IntegrationServiceEnvironmentNetworkDependency', 'IntegrationServiceEnvironmentNetworkDependencyHealth', 'IntegrationServiceEnvironmentNetworkEndpoint', @@ -571,6 +382,7 @@ 'ListKeyVaultKeysDefinition', 'ManagedApi', 'ManagedApiListResult', + 'ManagedServiceIdentity', 'NetworkConfiguration', 'OpenAuthenticationAccessPolicies', 'OpenAuthenticationAccessPolicy', @@ -611,6 +423,7 @@ 'TrackingEvent', 'TrackingEventErrorInfo', 'TrackingEventsDefinition', + 'UserAssignedIdentity', 'Workflow', 'WorkflowFilter', 'WorkflowListResult', @@ -676,6 +489,7 @@ 'IntegrationServiceEnvironmentSkuName', 'IntegrationServiceEnvironmentSkuScaleType', 'KeyType', + 'ManagedServiceIdentityType', 'MapType', 'MessageFilterType', 'OpenAuthenticationProviderType', diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_logic_management_client_enums.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_logic_management_client_enums.py index 6cfb83828bcc..9ded384d1175 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_logic_management_client_enums.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_logic_management_client_enums.py @@ -6,27 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class AgreementType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AgreementType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The agreement type. """ @@ -35,7 +20,7 @@ class AgreementType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): X12 = "X12" EDIFACT = "Edifact" -class ApiDeploymentParameterVisibility(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ApiDeploymentParameterVisibility(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The Api deployment parameter visibility. """ @@ -43,7 +28,7 @@ class ApiDeploymentParameterVisibility(with_metaclass(_CaseInsensitiveEnumMeta, DEFAULT = "Default" INTERNAL = "Internal" -class ApiTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ApiTier(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The Api tier. """ @@ -52,13 +37,13 @@ class ApiTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): STANDARD = "Standard" PREMIUM = "Premium" -class ApiType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ApiType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): NOT_SPECIFIED = "NotSpecified" REST = "Rest" SOAP = "Soap" -class AzureAsyncOperationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AzureAsyncOperationState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The Azure async operation state. """ @@ -67,7 +52,7 @@ class AzureAsyncOperationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu PENDING = "Pending" CANCELED = "Canceled" -class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DayOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The day of the week. """ @@ -79,7 +64,7 @@ class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FRIDAY = "Friday" SATURDAY = "Saturday" -class DaysOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DaysOfWeek(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SUNDAY = "Sunday" MONDAY = "Monday" @@ -89,7 +74,7 @@ class DaysOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): FRIDAY = "Friday" SATURDAY = "Saturday" -class EdifactCharacterSet(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class EdifactCharacterSet(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The edifact character set. """ @@ -109,7 +94,7 @@ class EdifactCharacterSet(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UNOY = "UNOY" KECA = "KECA" -class EdifactDecimalIndicator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class EdifactDecimalIndicator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The edifact decimal indicator. """ @@ -117,7 +102,7 @@ class EdifactDecimalIndicator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum COMMA = "Comma" DECIMAL = "Decimal" -class EncryptionAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class EncryptionAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The encryption algorithm. """ @@ -129,7 +114,7 @@ class EncryptionAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AES192 = "AES192" AES256 = "AES256" -class ErrorResponseCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ErrorResponseCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The error response code. """ @@ -138,7 +123,7 @@ class ErrorResponseCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INTERNAL_SERVER_ERROR = "InternalServerError" INVALID_OPERATION_ID = "InvalidOperationId" -class EventLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class EventLevel(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The event level. """ @@ -149,7 +134,7 @@ class EventLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INFORMATIONAL = "Informational" VERBOSE = "Verbose" -class HashingAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class HashingAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The signing or hashing algorithm. """ @@ -161,7 +146,7 @@ class HashingAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SHA2384 = "SHA2384" SHA2512 = "SHA2512" -class IntegrationAccountSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntegrationAccountSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The integration account sku name. """ @@ -170,7 +155,7 @@ class IntegrationAccountSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, En BASIC = "Basic" STANDARD = "Standard" -class IntegrationServiceEnvironmentAccessEndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntegrationServiceEnvironmentAccessEndpointType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The integration service environment access endpoint type. """ @@ -178,7 +163,7 @@ class IntegrationServiceEnvironmentAccessEndpointType(with_metaclass(_CaseInsens EXTERNAL = "External" INTERNAL = "Internal" -class IntegrationServiceEnvironmentNetworkDependencyCategoryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntegrationServiceEnvironmentNetworkDependencyCategoryType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The integration service environment network dependency category type. """ @@ -195,7 +180,7 @@ class IntegrationServiceEnvironmentNetworkDependencyCategoryType(with_metaclass( SQL = "SQL" REGIONAL_SERVICE = "RegionalService" -class IntegrationServiceEnvironmentNetworkDependencyHealthState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntegrationServiceEnvironmentNetworkDependencyHealthState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The integration service environment network dependency health state. """ @@ -204,7 +189,7 @@ class IntegrationServiceEnvironmentNetworkDependencyHealthState(with_metaclass(_ UNHEALTHY = "Unhealthy" UNKNOWN = "Unknown" -class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The integration service environment network endpoint accessibility state. """ @@ -213,7 +198,7 @@ class IntegrationServiceEnvironmentNetworkEndPointAccessibilityState(with_metacl AVAILABLE = "Available" NOT_AVAILABLE = "NotAvailable" -class IntegrationServiceEnvironmentSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntegrationServiceEnvironmentSkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The integration service environment sku name. """ @@ -221,7 +206,7 @@ class IntegrationServiceEnvironmentSkuName(with_metaclass(_CaseInsensitiveEnumMe PREMIUM = "Premium" DEVELOPER = "Developer" -class IntegrationServiceEnvironmentSkuScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class IntegrationServiceEnvironmentSkuScaleType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The integration service environment sku scale type. """ @@ -229,7 +214,7 @@ class IntegrationServiceEnvironmentSkuScaleType(with_metaclass(_CaseInsensitiveE AUTOMATIC = "Automatic" NONE = "None" -class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class KeyType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The key type. """ @@ -237,7 +222,16 @@ class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PRIMARY = "Primary" SECONDARY = "Secondary" -class MapType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +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. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + NONE = "None" + +class MapType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The map type. """ @@ -247,7 +241,7 @@ class MapType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): XSLT30 = "Xslt30" LIQUID = "Liquid" -class MessageFilterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MessageFilterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The message filter type. """ @@ -255,13 +249,13 @@ class MessageFilterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INCLUDE = "Include" EXCLUDE = "Exclude" -class OpenAuthenticationProviderType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OpenAuthenticationProviderType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Open authentication policy provider type. """ AAD = "AAD" -class ParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ParameterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The parameter type. """ @@ -275,14 +269,14 @@ class ParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): OBJECT = "Object" SECURE_OBJECT = "SecureObject" -class PartnerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class PartnerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The partner type. """ NOT_SPECIFIED = "NotSpecified" B2_B = "B2B" -class RecurrenceFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RecurrenceFrequency(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The recurrence frequency. """ @@ -295,14 +289,14 @@ class RecurrenceFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MONTH = "Month" YEAR = "Year" -class SchemaType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SchemaType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The schema type. """ NOT_SPECIFIED = "NotSpecified" XML = "Xml" -class SegmentTerminatorSuffix(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SegmentTerminatorSuffix(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The segment terminator suffix. """ @@ -312,7 +306,7 @@ class SegmentTerminatorSuffix(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum LF = "LF" CRLF = "CRLF" -class SigningAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SigningAlgorithm(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The signing or hashing algorithm. """ @@ -323,7 +317,7 @@ class SigningAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SHA2384 = "SHA2384" SHA2512 = "SHA2512" -class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SkuName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The sku name. """ @@ -334,7 +328,7 @@ class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): STANDARD = "Standard" PREMIUM = "Premium" -class StatusAnnotation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StatusAnnotation(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The status annotation. """ @@ -342,7 +336,7 @@ class StatusAnnotation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PREVIEW = "Preview" PRODUCTION = "Production" -class SwaggerSchemaType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SwaggerSchemaType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The swagger schema type. """ @@ -355,14 +349,14 @@ class SwaggerSchemaType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): OBJECT = "Object" NULL = "Null" -class TrackEventsOperationOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TrackEventsOperationOptions(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The track events operation options. """ NONE = "None" DISABLE_SOURCE_INFO_ENRICH = "DisableSourceInfoEnrich" -class TrackingRecordType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TrackingRecordType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The tracking record type. """ @@ -383,7 +377,7 @@ class TrackingRecordType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): EDIFACT_FUNCTIONAL_GROUP_ACKNOWLEDGMENT = "EdifactFunctionalGroupAcknowledgment" EDIFACT_TRANSACTION_SET_ACKNOWLEDGMENT = "EdifactTransactionSetAcknowledgment" -class TrailingSeparatorPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TrailingSeparatorPolicy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The trailing separator policy. """ @@ -392,7 +386,7 @@ class TrailingSeparatorPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum OPTIONAL = "Optional" MANDATORY = "Mandatory" -class UsageIndicator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class UsageIndicator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The usage indicator. """ @@ -401,7 +395,7 @@ class UsageIndicator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INFORMATION = "Information" PRODUCTION = "Production" -class WorkflowProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WorkflowProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The workflow provisioning state. """ @@ -428,7 +422,7 @@ class WorkflowProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, En WAITING = "Waiting" IN_PROGRESS = "InProgress" -class WorkflowState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WorkflowState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The workflow state. """ @@ -439,7 +433,7 @@ class WorkflowState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DELETED = "Deleted" SUSPENDED = "Suspended" -class WorkflowStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WorkflowStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The workflow status. """ @@ -457,7 +451,7 @@ class WorkflowStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ABORTED = "Aborted" IGNORED = "Ignored" -class WorkflowTriggerProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WorkflowTriggerProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The workflow trigger provisioning state. """ @@ -480,7 +474,7 @@ class WorkflowTriggerProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, UNREGISTERED = "Unregistered" COMPLETED = "Completed" -class WsdlImportMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WsdlImportMethod(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The WSDL import method. """ @@ -488,7 +482,7 @@ class WsdlImportMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SOAP_TO_REST = "SoapToRest" SOAP_PASS_THROUGH = "SoapPassThrough" -class X12CharacterSet(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class X12CharacterSet(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The X12 character set. """ @@ -497,7 +491,7 @@ class X12CharacterSet(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): EXTENDED = "Extended" UTF8 = "UTF8" -class X12DateFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class X12DateFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The x12 date format. """ @@ -505,7 +499,7 @@ class X12DateFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CCYYMMDD = "CCYYMMDD" YYMMDD = "YYMMDD" -class X12TimeFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class X12TimeFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The x12 time format. """ diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models.py deleted file mode 100644 index 5743632b0981..000000000000 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models.py +++ /dev/null @@ -1,7999 +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 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 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 - """ - - _validation = { - 'batch_group_name': {'required': True}, - 'release_criteria': {'required': True}, - } - - _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'}, - } - - def __init__( - self, - **kwargs - ): - super(BatchConfigurationProperties, self).__init__(**kwargs) - self.batch_group_name = kwargs['batch_group_name'] - self.release_criteria = kwargs['release_criteria'] - - -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 IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): - """The encryption configuration for the integration service environment. - - :param encryption_key_reference: The encryption key reference. - :type encryption_key_reference: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionKeyReference - """ - - _attribute_map = { - 'encryption_key_reference': {'key': 'encryptionKeyReference', 'type': 'IntegrationServiceEnvironmenEncryptionKeyReference'}, - } - - def __init__( - self, - **kwargs - ): - super(IntegrationServiceEnvironmenEncryptionConfiguration, self).__init__(**kwargs) - self.encryption_key_reference = kwargs.get('encryption_key_reference', None) - - -class IntegrationServiceEnvironmenEncryptionKeyReference(msrest.serialization.Model): - """The encryption key details for the integration service environment. - - :param key_vault: The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.ResourceReference - :param key_name: Gets the key name in the Key Vault. - :type key_name: str - :param key_version: Gets the version of the key specified in the keyName property. - :type 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, - **kwargs - ): - super(IntegrationServiceEnvironmenEncryptionKeyReference, self).__init__(**kwargs) - self.key_vault = kwargs.get('key_vault', None) - self.key_name = kwargs.get('key_name', None) - self.key_version = kwargs.get('key_version', None) - - -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 - :param encryption_configuration: The encryption configuration. - :type encryption_configuration: - ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionConfiguration - """ - - _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'}, - 'encryption_configuration': {'key': 'encryptionConfiguration', 'type': 'IntegrationServiceEnvironmenEncryptionConfiguration'}, - } - - 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) - self.encryption_configuration = kwargs.get('encryption_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 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(KeyVaultReference, self).__init__(**kwargs) - - -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. Possible values include: "AAD". - :vartype type: str or ~azure.mgmt.logic.models.OpenAuthenticationProviderType - :param claims: The access policy claims. - :type claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] - """ - - _validation = { - 'type': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, - } - - 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 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(WorkflowReference, self).__init__(**kwargs) - - -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 name: Gets the resource name. - :vartype name: str - :ivar type: Gets the resource type. - :vartype type: str - :param flow_name: The workflow name. - :type flow_name: str - :param trigger_name: The workflow trigger name. - :type trigger_name: 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'}, - 'flow_name': {'key': 'flowName', 'type': 'str'}, - 'trigger_name': {'key': 'triggerName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(WorkflowTriggerReference, self).__init__(**kwargs) - 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models_py3.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models_py3.py index 7d4b3cb8255c..05491a1ea3db 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models_py3.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- 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 @@ -18,12 +18,12 @@ 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 = { @@ -40,6 +40,14 @@ def __init__( 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 @@ -49,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 = { @@ -80,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 @@ -91,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 = { @@ -109,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 @@ -125,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 = { @@ -152,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 @@ -171,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 = { @@ -202,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 @@ -209,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 = { @@ -232,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 @@ -241,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 = { @@ -259,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 @@ -267,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 = { @@ -325,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 @@ -345,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. @@ -370,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 @@ -381,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 = { @@ -429,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 @@ -448,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 = { @@ -462,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 @@ -469,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 = { @@ -487,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 @@ -495,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 = { @@ -530,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 @@ -542,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 = { @@ -596,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 @@ -612,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 = { @@ -630,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 @@ -638,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}'}, @@ -689,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 = { @@ -742,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 @@ -754,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 = { @@ -782,12 +962,26 @@ 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 @@ -799,16 +993,16 @@ class AS2AcknowledgementConnectionSettings(msrest.serialization.Model): 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 = { @@ -834,6 +1028,18 @@ def __init__( unfold_http_headers: bool, **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 @@ -846,10 +1052,10 @@ class AS2AgreementContent(msrest.serialization.Model): 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 = { @@ -869,6 +1075,12 @@ def __init__( send_agreement: "AS2OneWayAgreement", **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 @@ -879,19 +1091,19 @@ class AS2EnvelopeSettings(msrest.serialization.Model): 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 = { @@ -920,6 +1132,21 @@ def __init__( autogenerate_file_name: bool, **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 @@ -933,12 +1160,12 @@ class AS2ErrorSettings(msrest.serialization.Model): 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 = { @@ -958,6 +1185,14 @@ def __init__( resend_if_mdn_not_received: bool, **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 @@ -968,28 +1203,28 @@ class AS2MdnSettings(msrest.serialization.Model): 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 = { @@ -1027,6 +1262,30 @@ def __init__( mdn_text: Optional[str] = None, **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 @@ -1044,17 +1303,17 @@ class AS2MessageConnectionSettings(msrest.serialization.Model): 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 = { @@ -1080,6 +1339,20 @@ def __init__( unfold_http_headers: bool, **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 @@ -1092,12 +1365,12 @@ class AS2OneWayAgreement(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 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 = { @@ -1120,6 +1393,14 @@ def __init__( 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 @@ -1131,21 +1412,21 @@ class AS2ProtocolSettings(msrest.serialization.Model): 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: + :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 - :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 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 = { @@ -1180,6 +1461,24 @@ def __init__( error_settings: "AS2ErrorSettings", **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 @@ -1195,34 +1494,34 @@ class AS2SecuritySettings(msrest.serialization.Model): 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 = { @@ -1263,6 +1562,36 @@ def __init__( sha2_algorithm_format: Optional[str] = None, **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 @@ -1281,34 +1610,34 @@ class AS2ValidationSettings(msrest.serialization.Model): 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 = { @@ -1351,6 +1680,37 @@ def __init__( signing_algorithm: Optional[Union[str, "SigningAlgorithm"]] = None, **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 @@ -1367,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 = { @@ -1381,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 @@ -1398,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 = { @@ -1430,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 @@ -1439,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 = { @@ -1484,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, @@ -1493,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 @@ -1505,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 = { @@ -1523,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 @@ -1532,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 = { @@ -1559,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 @@ -1567,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 = { @@ -1581,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 @@ -1598,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 = { @@ -1630,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 @@ -1637,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 = { @@ -1651,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 @@ -1660,16 +2082,16 @@ class BatchConfigurationProperties(ArtifactProperties): 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 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 + :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 = { @@ -1692,9 +2114,21 @@ def __init__( release_criteria: "BatchReleaseCriteria", created_time: Optional[datetime.datetime] = None, changed_time: Optional[datetime.datetime] = None, - metadata: Optional[object] = None, - **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 @@ -1703,12 +2137,12 @@ def __init__( 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. - :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 host_partner: str + :ivar guest_partner: Required. The integration account partner that is set as guest partner for + this agreement. + :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,6 +5302,11 @@ 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 @@ -4219,8 +5314,8 @@ def __init__( class IntegrationServiceEnvironmenEncryptionConfiguration(msrest.serialization.Model): """The encryption configuration for the integration service environment. - :param encryption_key_reference: The encryption key reference. - :type encryption_key_reference: + :ivar encryption_key_reference: The encryption key reference. + :vartype encryption_key_reference: ~azure.mgmt.logic.models.IntegrationServiceEnvironmenEncryptionKeyReference """ @@ -4234,6 +5329,11 @@ def __init__( 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 @@ -4241,12 +5341,12 @@ def __init__( class IntegrationServiceEnvironmenEncryptionKeyReference(msrest.serialization.Model): """The encryption key details for the integration service environment. - :param key_vault: The key vault reference. - :type key_vault: ~azure.mgmt.logic.models.ResourceReference - :param key_name: Gets the key name in the Key Vault. - :type key_name: str - :param key_version: Gets the version of the key specified in the keyName property. - :type key_version: str + :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 = { @@ -4263,6 +5363,14 @@ def __init__( 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 @@ -4280,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 = { @@ -4304,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__( @@ -4313,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 = { @@ -4338,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 @@ -4345,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 = { @@ -4363,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 = { @@ -4397,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 @@ -4406,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 """ @@ -4426,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 @@ -4434,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 = { @@ -4458,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 @@ -4467,22 +5916,22 @@ 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 - :param encryption_configuration: The encryption configuration. - :type encryption_configuration: + :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 """ @@ -4506,6 +5955,25 @@ def __init__( 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 @@ -4518,10 +5986,10 @@ def __init__( 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 = { @@ -4536,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 @@ -4544,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 = { @@ -4570,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 @@ -4580,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 = { @@ -4602,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 @@ -4611,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 = { @@ -4629,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 @@ -4637,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 = { @@ -4655,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 @@ -4665,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 """ @@ -4695,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 @@ -4704,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 = { @@ -4718,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 @@ -4725,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 = { @@ -4739,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 @@ -4746,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 = { @@ -4764,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 @@ -4772,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 = { @@ -4790,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 @@ -4798,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 = { @@ -4820,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 @@ -4829,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 = { @@ -4847,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 @@ -4857,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 = { @@ -4884,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 @@ -4895,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. @@ -4920,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 @@ -4931,8 +6495,8 @@ 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. @@ -4956,6 +6520,10 @@ def __init__( id: Optional[str] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + """ super(KeyVaultReference, self).__init__(id=id, **kwargs) @@ -4964,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 = { @@ -4986,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 @@ -5002,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 = { @@ -5033,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 @@ -5040,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 = { @@ -5058,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 = { @@ -5088,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 @@ -5097,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 = { @@ -5111,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 @@ -5118,18 +6777,12 @@ 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. Possible values include: "AAD". :vartype type: str or ~azure.mgmt.logic.models.OpenAuthenticationProviderType - :param claims: The access policy claims. - :type claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] + :ivar claims: The access policy claims. + :vartype claims: list[~azure.mgmt.logic.models.OpenAuthenticationPolicyClaim] """ - _validation = { - 'type': {'readonly': True}, - } - _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'claims': {'key': 'claims', 'type': '[OpenAuthenticationPolicyClaim]'}, @@ -5138,21 +6791,28 @@ class OpenAuthenticationAccessPolicy(msrest.serialization.Model): 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 = { @@ -5167,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 @@ -5175,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 = { @@ -5198,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 @@ -5211,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 = { @@ -5237,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 @@ -5247,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 = { @@ -5265,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 @@ -5273,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 = { @@ -5306,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 @@ -5323,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 = { @@ -5389,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 @@ -5408,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 = { @@ -5422,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 @@ -5429,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 = { @@ -5459,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 @@ -5470,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 = { @@ -5489,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 @@ -5497,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 = { @@ -5511,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 @@ -5520,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 = { @@ -5542,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 @@ -5550,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 = { @@ -5567,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 @@ -5589,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 = { @@ -5620,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 @@ -5627,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 = { @@ -5645,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 @@ -5653,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 = { @@ -5679,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 @@ -5689,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 = { @@ -5706,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 @@ -5720,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 = { @@ -5754,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 @@ -5766,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 = { @@ -5784,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 @@ -5792,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 = { @@ -5814,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 @@ -5823,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 = { @@ -5841,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 @@ -5850,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 = { @@ -5873,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 @@ -5899,6 +7740,8 @@ def __init__( self, **kwargs ): + """ + """ super(SubResource, self).__init__(**kwargs) self.id = None @@ -5906,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 = { @@ -5942,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 @@ -5954,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 = { @@ -5976,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 @@ -5985,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 = { @@ -6004,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 @@ -6016,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 = { @@ -6038,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 @@ -6047,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 - item. - :type item_title_path: str - :param item_full_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_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 + :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 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 = { @@ -6093,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 @@ -6107,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 = { @@ -6129,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 @@ -6144,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 = { @@ -6162,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 @@ -6170,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 = { @@ -6189,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 @@ -6201,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 = { @@ -6276,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, @@ -6285,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, @@ -6293,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 @@ -6319,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 = { @@ -6350,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 @@ -6367,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 = { @@ -6405,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 @@ -6420,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 = { @@ -6438,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 @@ -6448,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 = { @@ -6476,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. @@ -6493,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", @@ -6506,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 = { @@ -6547,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'}, @@ -6567,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 @@ -6595,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 = { @@ -6610,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 @@ -6617,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 = { @@ -6635,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 @@ -6643,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 = { @@ -6665,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 @@ -6682,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 = { @@ -6711,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 @@ -6725,8 +8838,8 @@ 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. @@ -6750,6 +8863,10 @@ def __init__( id: Optional[str] = None, **kwargs ): + """ + :keyword id: The resource id. + :paramtype id: str + """ super(WorkflowReference, self).__init__(id=id, **kwargs) @@ -6777,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. @@ -6833,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 @@ -6872,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 = { @@ -6926,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 @@ -6945,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 = { @@ -6961,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 @@ -6968,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 = { @@ -6986,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 @@ -7002,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 = { @@ -7085,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 @@ -7112,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 = { @@ -7130,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 @@ -7140,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 = { @@ -7209,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 @@ -7222,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 = { @@ -7238,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 @@ -7245,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 = { @@ -7263,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 @@ -7276,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. @@ -7291,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", @@ -7300,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 = { @@ -7344,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 @@ -7432,6 +9641,8 @@ def __init__( self, **kwargs ): + """ + """ super(WorkflowTrigger, self).__init__(**kwargs) self.name = None self.type = None @@ -7459,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 = { @@ -7489,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 @@ -7501,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 = { @@ -7516,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 @@ -7544,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. @@ -7600,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 @@ -7620,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 = { @@ -7636,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 @@ -7643,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 = { @@ -7661,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 @@ -7669,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 = { @@ -7699,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 @@ -7710,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 = { @@ -7728,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 @@ -7736,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 = { @@ -7771,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 @@ -7785,16 +10057,16 @@ 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 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 = { @@ -7818,6 +10090,14 @@ def __init__( 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.flow_name = flow_name self.trigger_name = trigger_name @@ -7834,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", @@ -7847,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 = { @@ -7909,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 @@ -7931,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 = { @@ -7949,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 @@ -7957,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 = { @@ -7975,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 @@ -7985,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 = { @@ -8080,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 @@ -8103,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 = { @@ -8126,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 @@ -8136,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 = { @@ -8194,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 @@ -8211,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 = { @@ -8277,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 @@ -8295,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 = { @@ -8438,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 @@ -8470,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 = { @@ -8521,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 @@ -8536,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 = { @@ -8555,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 @@ -8564,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 = { @@ -8582,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 @@ -8591,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 = { @@ -8619,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 @@ -8630,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 = { @@ -8677,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 @@ -8691,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 = { @@ -8760,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 @@ -8780,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 = { @@ -8812,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 @@ -8824,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 = { @@ -8855,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 @@ -8867,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 = { @@ -8919,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 @@ -8934,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 = { @@ -9007,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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_agreements_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_agreements_operations.py index a46c6ce64ed1..b181a590fa6f 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_agreements_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_agreements_operations.py @@ -5,23 +5,234 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/agreements/{agreementName}/listContentCallbackUrl') + 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. @@ -45,15 +256,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.IntegrationAccountAgreementListResult"] + 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. @@ -66,8 +277,10 @@ def list( AgreementType. :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountAgreementListResult"] @@ -75,40 +288,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountAgreementListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,25 +331,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - agreement_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountAgreement" + 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. @@ -158,34 +369,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountAgreement', pipeline_response) @@ -194,17 +395,19 @@ def get( 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, # type: str - integration_account_name, # type: str - agreement_name, # type: str - agreement, # type: "_models.IntegrationAccountAgreement" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountAgreement" + 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. @@ -225,39 +428,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -270,16 +463,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - agreement_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -298,34 +493,24 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -333,15 +518,16 @@ def delete( 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, # type: str - integration_account_name, # type: str - agreement_name, # type: str - list_content_callback_url, # type: "_models.GetCallbackUrlParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -362,39 +548,29 @@ def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + agreement_name=agreement_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -403,4 +579,6 @@ def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_assemblies_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_assemblies_operations.py index 1dd57f9c518e..ad961d70aed8 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_assemblies_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_assemblies_operations.py @@ -5,23 +5,218 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/assemblies/{assemblyArtifactName}/listContentCallbackUrl') + 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. @@ -45,13 +240,13 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group_name, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.AssemblyCollection"] + 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. @@ -68,36 +263,33 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("AssemblyCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,25 +302,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.AssemblyDefinition" + 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. @@ -147,34 +340,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AssemblyDefinition', pipeline_response) @@ -183,17 +366,19 @@ def get( 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, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - assembly_artifact, # type: "_models.AssemblyDefinition" - **kwargs # type: Any - ): - # type: (...) -> "_models.AssemblyDefinition" + 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. @@ -214,39 +399,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -259,16 +434,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -287,34 +464,24 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -322,14 +489,15 @@ def delete( 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, # type: str - integration_account_name, # type: str - assembly_artifact_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -348,34 +516,24 @@ def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.list_content_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -384,4 +542,6 @@ def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_batch_configurations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_batch_configurations_operations.py index 9a050b2627ae..a9d6c5848643 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_batch_configurations_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_batch_configurations_operations.py @@ -5,23 +5,181 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/batchConfigurations/{batchConfigurationName}') + 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. @@ -45,13 +203,13 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group_name, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.BatchConfigurationCollection"] + 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. @@ -59,7 +217,8 @@ def list( :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) + :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 """ @@ -68,36 +227,33 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("BatchConfigurationCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,25 +266,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - batch_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.BatchConfiguration" + 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. @@ -147,34 +304,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BatchConfiguration', pipeline_response) @@ -183,17 +330,19 @@ def get( 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, # type: str - integration_account_name, # type: str - batch_configuration_name, # type: str - batch_configuration, # type: "_models.BatchConfiguration" - **kwargs # type: Any - ): - # type: (...) -> "_models.BatchConfiguration" + 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. @@ -214,39 +363,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -259,16 +398,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - batch_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -287,37 +428,28 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_certificates_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_certificates_operations.py index 55cf14eaa927..450d47bb245c 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_certificates_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_certificates_operations.py @@ -5,23 +5,185 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/certificates/{certificateName}') + 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. @@ -45,14 +207,14 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group_name, # type: str - integration_account_name, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.IntegrationAccountCertificateListResult"] + 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. @@ -62,8 +224,10 @@ def list( :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: An iterator like instance of either IntegrationAccountCertificateListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountCertificateListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountCertificateListResult"] @@ -71,38 +235,35 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountCertificateListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,25 +276,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - certificate_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountCertificate" + 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. @@ -152,34 +314,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountCertificate', pipeline_response) @@ -188,17 +340,19 @@ def get( 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, # type: str - integration_account_name, # type: str - certificate_name, # type: str - certificate, # type: "_models.IntegrationAccountCertificate" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountCertificate" + 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. @@ -219,39 +373,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -264,16 +408,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - certificate_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -292,37 +438,28 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_maps_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_maps_operations.py index ebce580f182a..09126dc66121 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_maps_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_maps_operations.py @@ -5,23 +5,234 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/maps/{mapName}/listContentCallbackUrl') + 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. @@ -45,15 +256,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.IntegrationAccountMapListResult"] + 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. @@ -65,7 +276,8 @@ def list( :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: An iterator like instance of either IntegrationAccountMapListResult or the result of cls(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 """ @@ -74,40 +286,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountMapListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,25 +329,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - map_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountMap" + 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. @@ -157,34 +367,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountMap', pipeline_response) @@ -193,18 +393,22 @@ def get( 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, # type: str - integration_account_name, # type: str - map_name, # type: str - map, # type: "_models.IntegrationAccountMap" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountMap" - """Creates or updates an integration account map. + 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 @@ -224,39 +428,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -269,16 +463,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - map_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -297,34 +493,24 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -332,15 +518,16 @@ def delete( 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, # type: str - integration_account_name, # type: str - map_name, # type: str - list_content_callback_url, # type: "_models.GetCallbackUrlParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -361,39 +548,29 @@ def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + map_name=map_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -402,4 +579,6 @@ def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_partners_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_partners_operations.py index 8a8d382b52bf..8cc1d07c0188 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_partners_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_partners_operations.py @@ -5,23 +5,234 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/partners/{partnerName}/listContentCallbackUrl') + 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. @@ -45,15 +256,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.IntegrationAccountPartnerListResult"] + 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. @@ -65,8 +276,10 @@ def list( :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: An iterator like instance of either IntegrationAccountPartnerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountPartnerListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountPartnerListResult"] @@ -74,40 +287,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountPartnerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,25 +330,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - partner_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountPartner" + 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. @@ -157,34 +368,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountPartner', pipeline_response) @@ -193,17 +394,19 @@ def get( 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, # type: str - integration_account_name, # type: str - partner_name, # type: str - partner, # type: "_models.IntegrationAccountPartner" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountPartner" + 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. @@ -224,39 +427,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -269,16 +462,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - partner_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -297,34 +492,24 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -332,15 +517,16 @@ def delete( 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, # type: str - integration_account_name, # type: str - partner_name, # type: str - list_content_callback_url, # type: "_models.GetCallbackUrlParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -361,39 +547,29 @@ def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + partner_name=partner_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -402,4 +578,6 @@ def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_schemas_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_schemas_operations.py index db4b33ec4de8..dd5b9260e5dc 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_schemas_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_schemas_operations.py @@ -5,23 +5,234 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/schemas/{schemaName}/listContentCallbackUrl') + 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. @@ -45,15 +256,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.IntegrationAccountSchemaListResult"] + 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. @@ -65,8 +276,10 @@ def list( :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: An iterator like instance of either IntegrationAccountSchemaListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountSchemaListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSchemaListResult"] @@ -74,40 +287,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountSchemaListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,25 +330,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - schema_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountSchema" + 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. @@ -157,34 +368,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSchema', pipeline_response) @@ -193,17 +394,19 @@ def get( 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, # type: str - integration_account_name, # type: str - schema_name, # type: str - schema, # type: "_models.IntegrationAccountSchema" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountSchema" + 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. @@ -224,39 +427,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -269,16 +462,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - schema_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -297,34 +492,24 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -332,15 +517,16 @@ def delete( 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, # type: str - integration_account_name, # type: str - schema_name, # type: str - list_content_callback_url, # type: "_models.GetCallbackUrlParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -361,39 +547,29 @@ def list_content_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_content_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_content_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + schema_name=schema_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -402,4 +578,6 @@ def list_content_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_sessions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_sessions_operations.py index 9869398997d8..08b0f04daa55 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_sessions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_account_sessions_operations.py @@ -5,23 +5,188 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/sessions/{sessionName}') + 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. @@ -45,15 +210,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.IntegrationAccountSessionListResult"] + 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. @@ -65,8 +230,10 @@ def list( :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: An iterator like instance of either IntegrationAccountSessionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationAccountSessionListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationAccountSessionListResult"] @@ -74,40 +241,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) + deserialized = self._deserialize("IntegrationAccountSessionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,25 +284,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - session_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountSession" + 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. @@ -157,34 +322,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccountSession', pipeline_response) @@ -193,17 +348,19 @@ def get( 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, # type: str - integration_account_name, # type: str - session_name, # type: str - session, # type: "_models.IntegrationAccountSession" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccountSession" + 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. @@ -224,39 +381,29 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -269,16 +416,18 @@ def create_or_update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - session_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -297,37 +446,28 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_accounts_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_accounts_operations.py index bade3703a9ec..e5c51215bfa1 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_accounts_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_accounts_operations.py @@ -5,23 +5,432 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listCallbackUrl') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/listKeyVaultKeys') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/logTrackingEvents') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}/regenerateAccessKey') + 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. @@ -45,18 +454,19 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list_by_subscription( self, - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.IntegrationAccountListResult"] + 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. :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) + :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 """ @@ -65,36 +475,31 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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) + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -107,24 +512,25 @@ def get_next(next_link=None): 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) + 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, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.IntegrationAccountListResult"] + 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. @@ -132,7 +538,8 @@ def list_by_resource_group( :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: An iterator like instance of either IntegrationAccountListResult or the result of cls(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 """ @@ -141,37 +548,33 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + 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) + deserialized = self._deserialize("IntegrationAccountListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -184,24 +587,25 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccount" + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> "_models.IntegrationAccount": """Gets an integration account. :param resource_group_name: The resource group name. @@ -218,33 +622,23 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -253,16 +647,18 @@ def get( 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, # type: str - integration_account_name, # type: str - integration_account, # type: "_models.IntegrationAccount" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccount" + 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. @@ -281,38 +677,28 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_account, 'IntegrationAccount') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -325,16 +711,18 @@ def create_or_update( 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, # type: str - integration_account_name, # type: str - integration_account, # type: "_models.IntegrationAccount" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccount" + 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. @@ -353,38 +741,28 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + content_type=content_type, + json=_json, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -393,15 +771,17 @@ def update( 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + integration_account_name: str, + **kwargs: Any + ) -> None: """Deletes an integration account. :param resource_group_name: The resource group name. @@ -418,33 +798,23 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -452,14 +822,15 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/integrationAccounts/{integrationAccountName}'} # type: ignore + + @distributed_trace def list_callback_url( self, - resource_group_name, # type: str - integration_account_name, # type: str - parameters, # type: "_models.GetCallbackUrlParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.CallbackUrl" + 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. @@ -478,38 +849,28 @@ def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CallbackUrl', pipeline_response) @@ -518,16 +879,18 @@ def list_callback_url( 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, # type: str - integration_account_name, # type: str - list_key_vault_keys, # type: "_models.ListKeyVaultKeysDefinition" - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.KeyVaultKeyCollection"] + 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. @@ -537,53 +900,51 @@ def list_key_vault_keys( :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) + :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 """ + 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', {})) - api_version = "2019-05-01" - content_type = "application/json" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_key_vault_keys.metadata['url'] # type: ignore - 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') - - 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) + _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, + 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: - url = next_link - query_parameters = {} # type: Dict[str, Any] - 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.get(url, query_parameters, header_parameters, **body_content_kwargs) + _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, + 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) + deserialized = self._deserialize("KeyVaultKeyCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -596,25 +957,26 @@ def get_next(next_link=None): 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) + 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( self, - resource_group_name, # type: str - integration_account_name, # type: str - log_tracking_events, # type: "_models.TrackingEventsDefinition" - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -633,38 +995,28 @@ def log_tracking_events( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.log_tracking_events.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(log_tracking_events, 'TrackingEventsDefinition') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_log_tracking_events_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -672,14 +1024,15 @@ def log_tracking_events( 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, # type: str - integration_account_name, # type: str - regenerate_access_key, # type: "_models.RegenerateActionParameter" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationAccount" + 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. @@ -698,38 +1051,28 @@ def regenerate_access_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_access_key.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(regenerate_access_key, 'RegenerateActionParameter') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_regenerate_access_key_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + integration_account_name=integration_account_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationAccount', pipeline_response) @@ -738,4 +1081,6 @@ def regenerate_access_key( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_api_operations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_api_operations_operations.py index 1b601ed9e8ff..c71edbb22085 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_api_operations_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_api_operations_operations.py @@ -5,23 +5,62 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}/apiOperations') + 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. @@ -45,14 +84,14 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ApiOperationListResult"] + 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. @@ -62,7 +101,8 @@ def list( :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) + :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 """ @@ -71,37 +111,35 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("ApiOperationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -114,12 +152,13 @@ def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_apis_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_apis_operations.py index 0a80af7ea119..136983d88153 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_apis_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_managed_apis_operations.py @@ -5,25 +5,183 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/managedApis/{apiName}') + 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. @@ -47,13 +205,13 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ManagedApiListResult"] + 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. @@ -61,45 +219,44 @@ def list( :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 ManagedApiListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.ManagedApiListResult] + :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 """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedApiListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApiListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + 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('ManagedApiListResult', pipeline_response) + deserialized = self._deserialize("IntegrationServiceEnvironmentManagedApiListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -112,25 +269,26 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ManagedApi" + 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. @@ -140,116 +298,105 @@ def get( :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: ~azure.mgmt.logic.models.ManagedApi + :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.ManagedApi"] + 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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('ManagedApi', pipeline_response) + 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, # 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"] + 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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self._put_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ManagedApi', pipeline_response) + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ManagedApi', pipeline_response) + 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, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ManagedApi"] + 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. @@ -258,18 +405,27 @@ def begin_put( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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 ManagedApi or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.logic.models.ManagedApi] - :raises ~azure.core.exceptions.HttpResponseError: + :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 """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedApi"] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentManagedApi"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -280,28 +436,22 @@ def begin_put( 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, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ManagedApi', pipeline_response) - + response = pipeline_response.http_response + deserialized = self._deserialize('IntegrationServiceEnvironmentManagedApi', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - 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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -313,64 +463,54 @@ def get_long_running_output(pipeline_response): ) else: 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( self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self._delete_initial.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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, error_format=ARMErrorFormat) + 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( self, - resource_group, # type: str - integration_service_environment_name, # type: str - api_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + 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. @@ -381,15 +521,17 @@ def begin_delete( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -404,22 +546,14 @@ def begin_delete( cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - 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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -431,4 +565,5 @@ def get_long_running_output(pipeline_response): ) else: 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_network_health_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_network_health_operations.py index 15c5a4c9febc..e722e16769f9 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_network_health_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_network_health_operations.py @@ -5,22 +5,59 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network') + 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. @@ -44,13 +81,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, "_models.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. @@ -58,7 +95,8 @@ 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 mapping str to IntegrationServiceEnvironmentSubnetNetworkHealth, or the result of cls(response) + :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 """ @@ -67,33 +105,23 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.get.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'] = self._serialize.header("accept", accept, 'str') - - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('{IntegrationServiceEnvironmentSubnetNetworkHealth}', pipeline_response) @@ -102,4 +130,6 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/health/network'} # type: ignore + diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_skus_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_skus_operations.py index c49c6244c863..6f50879b704f 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_skus_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environment_skus_operations.py @@ -5,23 +5,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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/skus') + 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. @@ -45,13 +82,13 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.IntegrationServiceEnvironmentSkuList"] + 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. @@ -59,8 +96,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentSkuList"] @@ -68,36 +107,33 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + 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) + deserialized = self._deserialize("IntegrationServiceEnvironmentSkuList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,12 +146,13 @@ def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environments_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environments_operations.py index 84c7ad2b2ddd..185f549deb14 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environments_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_integration_service_environments_operations.py @@ -5,25 +5,293 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.Logic/integrationServiceEnvironments') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}/restart') + 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. @@ -47,19 +315,21 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list_by_subscription( self, - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.IntegrationServiceEnvironmentListResult"] + 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. :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] @@ -67,36 +337,31 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + top=top, + template_url=self.list_by_subscription.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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) + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -109,24 +374,25 @@ def get_next(next_link=None): 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) + 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, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.IntegrationServiceEnvironmentListResult"] + 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. @@ -134,8 +400,10 @@ def list_by_resource_group( :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: An iterator like instance of either IntegrationServiceEnvironmentListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.logic.models.IntegrationServiceEnvironmentListResult] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironmentListResult"] @@ -143,37 +411,33 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + top=top, + template_url=self.list_by_resource_group.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + 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) + deserialized = self._deserialize("IntegrationServiceEnvironmentListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -186,24 +450,25 @@ def get_next(next_link=None): 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) + 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, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationServiceEnvironment" + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> "_models.IntegrationServiceEnvironment": """Gets an integration service environment. :param resource_group: The resource group. @@ -220,33 +485,23 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -255,54 +510,44 @@ def get( 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, # type: str - integration_service_environment_name, # type: str - integration_service_environment, # type: "_models.IntegrationServiceEnvironment" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationServiceEnvironment" + 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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + 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, + 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) - 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, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -314,16 +559,18 @@ def _create_or_update_initial( 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, # type: str - integration_service_environment_name, # type: str - integration_service_environment, # type: "_models.IntegrationServiceEnvironment" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.IntegrationServiceEnvironment"] + 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. @@ -334,15 +581,19 @@ def begin_create_or_update( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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) + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -354,27 +605,21 @@ def begin_create_or_update( resource_group=resource_group, integration_service_environment_name=integration_service_environment_name, integration_service_environment=integration_service_environment, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', 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 - 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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -386,54 +631,43 @@ def get_long_running_output(pipeline_response): ) else: 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, # type: str - integration_service_environment_name, # type: str - integration_service_environment, # type: "_models.IntegrationServiceEnvironment" - **kwargs # type: Any - ): - # type: (...) -> "_models.IntegrationServiceEnvironment" + 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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(integration_service_environment, 'IntegrationServiceEnvironment') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_update_request_initial( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + 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) - 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, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = self._deserialize('IntegrationServiceEnvironment', pipeline_response) @@ -441,16 +675,18 @@ def _update_initial( 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, # type: str - integration_service_environment_name, # type: str - integration_service_environment, # type: "_models.IntegrationServiceEnvironment" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.IntegrationServiceEnvironment"] + 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. @@ -461,15 +697,19 @@ def begin_update( :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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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) + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.IntegrationServiceEnvironment"] lro_delay = kwargs.pop( 'polling_interval', @@ -481,27 +721,21 @@ def begin_update( resource_group=resource_group, integration_service_environment_name=integration_service_environment_name, integration_service_environment=integration_service_environment, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', 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 - 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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -513,15 +747,16 @@ def get_long_running_output(pipeline_response): ) else: 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( self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> None: """Deletes an integration service environment. :param resource_group: The resource group. @@ -538,33 +773,23 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -572,13 +797,14 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Logic/integrationServiceEnvironments/{integrationServiceEnvironmentName}'} # type: ignore + + @distributed_trace def restart( self, - resource_group, # type: str - integration_service_environment_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group: str, + integration_service_environment_name: str, + **kwargs: Any + ) -> None: """Restarts an integration service environment. :param resource_group: The resource group. @@ -595,36 +821,27 @@ def restart( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.restart.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_restart_request( + subscription_id=self._config.subscription_id, + resource_group=resource_group, + integration_service_environment_name=integration_service_environment_name, + template_url=self.restart.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_operations.py index 6774bdec1b94..1c5b49f64a09 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_operations.py @@ -5,23 +5,50 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + 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. @@ -45,11 +72,11 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationListResult"] + **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 @@ -62,30 +89,27 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = build_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.get(url, query_parameters, header_parameters) else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + 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) + deserialized = self._deserialize("OperationListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -98,12 +122,13 @@ def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_operations.py index 8efdc424167a..46f7605bfaa6 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_operations.py @@ -5,23 +5,146 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions') + 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 = "2019-05-01" + 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}') + 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 = "2019-05-01" + 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') + 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. @@ -45,15 +168,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkflowRunActionRepetitionDefinitionCollection"] + 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. @@ -65,8 +188,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] @@ -74,38 +199,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,27 +242,28 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowRunActionRepetitionDefinition" + 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. @@ -161,36 +286,26 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) @@ -199,18 +314,20 @@ def get( 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, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressionTraces"] + 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. @@ -233,39 +350,39 @@ def list_expression_traces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_expression_traces.metadata['url'] # type: ignore - 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') - - request = self._client.post(url, query_parameters, header_parameters) + + 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, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("ExpressionTraces", pipeline_response) list_of_elem = deserialized.inputs if cls: list_of_elem = cls(list_of_elem) @@ -278,12 +395,13 @@ def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py index 7a5e548656f8..547d303f2164 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_repetitions_request_histories_operations.py @@ -5,23 +5,109 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer 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]] -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + 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') + 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 = "2019-05-01" + 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}') + 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. @@ -45,16 +131,16 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.RequestHistoryListResult"] + 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. @@ -68,7 +154,8 @@ def list( :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) + :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 """ @@ -77,39 +164,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -122,28 +209,29 @@ def get_next(next_link=None): 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) + 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, # 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" + 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. @@ -168,37 +256,27 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) @@ -207,4 +285,6 @@ def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_request_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_request_histories_operations.py index 701aacc1de47..3bec58053025 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_request_histories_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_request_histories_operations.py @@ -5,23 +5,105 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer 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]] -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories') + 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 = "2019-05-01" + 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}') + 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. @@ -45,15 +127,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RequestHistoryListResult"] + 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. @@ -65,7 +147,8 @@ def list( :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) + :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 """ @@ -74,38 +157,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("RequestHistoryListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,27 +200,28 @@ def get_next(next_link=None): 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) + 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, # 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" + 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. @@ -161,36 +244,26 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RequestHistory', pipeline_response) @@ -199,4 +272,6 @@ def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_scope_repetitions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_scope_repetitions_operations.py index fb133482b9d7..02b3040123d2 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_scope_repetitions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_action_scope_repetitions_operations.py @@ -5,23 +5,105 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer 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]] -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/scopeRepetitions') + 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 = "2019-05-01" + 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}') + 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. @@ -45,15 +127,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkflowRunActionRepetitionDefinitionCollection"] + 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. @@ -65,8 +147,10 @@ def list( :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] + :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 """ cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkflowRunActionRepetitionDefinitionCollection"] @@ -74,38 +158,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + 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, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("WorkflowRunActionRepetitionDefinitionCollection", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,27 +201,28 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - repetition_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowRunActionRepetitionDefinition" + 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. @@ -161,36 +245,26 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunActionRepetitionDefinition', pipeline_response) @@ -199,4 +273,6 @@ def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_actions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_actions_operations.py index 0e2df3e4c97a..b99d69af16b9 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_actions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_actions_operations.py @@ -5,23 +5,147 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/listExpressionTraces') + 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. @@ -45,16 +169,16 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.WorkflowRunActionListResult"] + 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. @@ -68,7 +192,8 @@ def list( :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: An iterator like instance of either WorkflowRunActionListResult or the result of cls(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 """ @@ -77,41 +202,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + run_name=run_name, + 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) + deserialized = self._deserialize("WorkflowRunActionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -124,26 +247,27 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowRunAction" + 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. @@ -164,35 +288,25 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRunAction', pipeline_response) @@ -201,17 +315,19 @@ def get( 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, # type: str - workflow_name, # type: str - run_name, # type: str - action_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressionTraces"] + 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. @@ -232,38 +348,37 @@ def list_expression_traces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_expression_traces.metadata['url'] # type: ignore - 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') - - request = self._client.post(url, query_parameters, header_parameters) + + 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, + template_url=self.list_expression_traces.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + 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, + 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) + deserialized = self._deserialize("ExpressionTraces", pipeline_response) list_of_elem = deserialized.inputs if cls: list_of_elem = cls(list_of_elem) @@ -276,12 +391,13 @@ def get_next(next_link=None): 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) + 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 ) diff --git a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_operations_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_operations_operations.py index 2af4548bfab3..5835a73fceeb 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_operations_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_run_operations_operations.py @@ -5,22 +5,63 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/operations/{operationId}') + 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. @@ -44,15 +85,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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" + 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. @@ -73,35 +114,25 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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') + + 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, + template_url=self.get.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'] = self._serialize.header("accept", accept, 'str') - - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) @@ -110,4 +141,6 @@ def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_runs_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_runs_operations.py index 246e4818dde0..834208464802 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_runs_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_runs_operations.py @@ -5,23 +5,141 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs/{runName}/cancel') + 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. @@ -45,15 +163,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.WorkflowRunListResult"] + 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. @@ -66,7 +184,8 @@ def list( StartTime, and ClientTrackingId. :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) + :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 """ @@ -75,40 +194,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) + deserialized = self._deserialize("WorkflowRunListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -121,25 +237,26 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - run_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowRun" + 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. @@ -158,34 +275,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowRun', pipeline_response) @@ -194,16 +301,18 @@ def get( 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( self, - resource_group_name, # type: str - workflow_name, # type: str - run_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -222,37 +331,28 @@ def cancel( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.cancel.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.cancel.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py index 2c87d448e1bc..e90bec15a8df 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_trigger_histories_operations.py @@ -5,23 +5,147 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/histories/{historyName}/resubmit') + 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. @@ -45,16 +169,16 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.WorkflowTriggerHistoryListResult"] + 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. @@ -69,7 +193,8 @@ def list( StartTime, and ClientTrackingId. :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) + :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 """ @@ -78,41 +203,39 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + trigger_name=trigger_name, + 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) + deserialized = self._deserialize("WorkflowTriggerHistoryListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -125,26 +248,27 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - trigger_name, # type: str - history_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerHistory" + 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. @@ -166,35 +290,25 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerHistory', pipeline_response) @@ -203,17 +317,19 @@ def get( 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( self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - history_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -235,38 +351,29 @@ def resubmit( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.resubmit.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.resubmit.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_triggers_operations.py index 9825a10915f4..5fe1d4ab5cef 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_triggers_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_triggers_operations.py @@ -5,23 +5,299 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/run') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/schemas/json') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/setState') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/listCallbackUrl') + 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. @@ -45,15 +321,15 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace 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: (...) -> Iterable["_models.WorkflowTriggerListResult"] + 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. @@ -65,7 +341,8 @@ def list( :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: An iterator like instance of either WorkflowTriggerListResult or the result of cls(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 """ @@ -74,40 +351,37 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + filter=filter, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) + deserialized = self._deserialize("WorkflowTriggerListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,25 +394,26 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTrigger" + 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. @@ -157,34 +432,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTrigger', pipeline_response) @@ -193,16 +458,18 @@ def get( 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( self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -221,34 +488,24 @@ def reset( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.reset.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.reset.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -256,14 +513,15 @@ def reset( reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/triggers/{triggerName}/reset'} # type: ignore + + @distributed_trace def run( self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -282,34 +540,24 @@ def run( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.run.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.run.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -317,14 +565,15 @@ def run( 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, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.JsonSchema" + 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. @@ -343,34 +592,24 @@ def get_schema_json( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get_schema_json.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get_schema_json.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('JsonSchema', pipeline_response) @@ -379,17 +618,19 @@ def get_schema_json( 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( self, - resource_group_name, # type: str - workflow_name, # type: str - trigger_name, # type: str - set_state, # type: "_models.SetTriggerStateActionDefinition" - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -410,39 +651,29 @@ def set_state( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.set_state.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -450,14 +681,15 @@ def set_state( 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, # type: str - workflow_name, # type: str - trigger_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -476,34 +708,24 @@ def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.list_callback_url.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -512,4 +734,6 @@ def list_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_version_triggers_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_version_triggers_operations.py index eb02d5a8df3e..dc765974d303 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_version_triggers_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_version_triggers_operations.py @@ -5,22 +5,73 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}/triggers/{triggerName}/listCallbackUrl') + 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. @@ -44,16 +95,16 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list_callback_url( self, - resource_group_name, # type: str - workflow_name, # type: str - version_id, # type: str - trigger_name, # type: str - parameters=None, # type: Optional["_models.GetCallbackUrlParameters"] - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -76,43 +127,33 @@ def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if parameters is not None: - body_content = self._serialize.body(parameters, 'GetCallbackUrlParameters') + _json = 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) + _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, + 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(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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -121,4 +162,6 @@ def list_callback_url( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_versions_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_versions_operations.py index b42aa955728e..4cac3638f005 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_versions_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflow_versions_operations.py @@ -5,23 +5,101 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer 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]] -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +def build_list_request( + subscription_id: str, + resource_group_name: str, + workflow_name: str, + *, + top: Optional[int] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/versions/{versionId}') + 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. @@ -45,14 +123,14 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list( self, - resource_group_name, # type: str - workflow_name, # type: str - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkflowVersionListResult"] + 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. @@ -62,7 +140,8 @@ def list( :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: An iterator like instance of either WorkflowVersionListResult or the result of cls(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 """ @@ -71,38 +150,35 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + top=top, + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) + deserialized = self._deserialize("WorkflowVersionListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,25 +191,26 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - version_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowVersion" + 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. @@ -152,34 +229,24 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, '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, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowVersion', pipeline_response) @@ -188,4 +255,6 @@ def get( 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/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflows_operations.py b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflows_operations.py index cc7a046a119e..b3178ac598d4 100644 --- a/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflows_operations.py +++ b/sdk/logic/azure-mgmt-logic/azure/mgmt/logic/operations/_workflows_operations.py @@ -5,25 +5,626 @@ # 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 TYPE_CHECKING +import functools +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings 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 HttpRequest, HttpResponse +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 msrest import Serializer from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +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 = "2019-05-01" + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/enable') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/generateUpgradedDefinition') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listCallbackUrl') + 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 = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/listSwagger') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/move') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate') + 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: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-05-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/locations/{location}/workflows/{workflowName}/validate') + 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. @@ -47,13 +648,13 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def list_by_subscription( self, - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkflowListResult"] + 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. @@ -71,38 +672,33 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_subscription_request( + subscription_id=self._config.subscription_id, + 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) + deserialized = self._deserialize("WorkflowListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,25 +711,26 @@ def get_next(next_link=None): 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) + 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, # type: str - top=None, # type: Optional[int] - filter=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.WorkflowListResult"] + 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. @@ -153,39 +750,35 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore - 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) - # 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') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + 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: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_by_resource_group_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + 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) + deserialized = self._deserialize("WorkflowListResult", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -198,24 +791,25 @@ def get_next(next_link=None): 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) + 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, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Workflow" + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> "_models.Workflow": """Gets a workflow. :param resource_group_name: The resource group name. @@ -232,33 +826,23 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_get_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.get.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) @@ -267,16 +851,18 @@ def get( 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, # type: str - workflow_name, # type: str - workflow, # type: "_models.Workflow" - **kwargs # type: Any - ): - # type: (...) -> "_models.Workflow" + 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. @@ -295,38 +881,28 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(workflow, 'Workflow') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_create_or_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -339,15 +915,17 @@ def create_or_update( 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, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.Workflow" + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> "_models.Workflow": """Updates a workflow. :param resource_group_name: The resource group name. @@ -364,33 +942,23 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.update.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_update_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.update.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - request = self._client.patch(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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Workflow', pipeline_response) @@ -399,15 +967,17 @@ def update( 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( self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: """Deletes a workflow. :param resource_group_name: The resource group name. @@ -424,33 +994,23 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_delete_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -458,13 +1018,14 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}'} # type: ignore + + @distributed_trace def disable( self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: """Disables a workflow. :param resource_group_name: The resource group name. @@ -481,33 +1042,23 @@ def disable( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.disable.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_disable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.disable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -515,13 +1066,14 @@ def disable( disable.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/disable'} # type: ignore + + @distributed_trace def enable( self, - resource_group_name, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + workflow_name: str, + **kwargs: Any + ) -> None: """Enables a workflow. :param resource_group_name: The resource group name. @@ -538,33 +1090,23 @@ def enable( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.enable.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_enable_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.enable.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -572,14 +1114,15 @@ def enable( 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, # type: str - workflow_name, # type: str - parameters, # type: "_models.GenerateUpgradedDefinitionParameters" - **kwargs # type: Any - ): - # type: (...) -> object + 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. @@ -589,47 +1132,37 @@ def generate_upgraded_definition( :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: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + 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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.generate_upgraded_definition.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(parameters, 'GenerateUpgradedDefinitionParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_generate_upgraded_definition_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -638,16 +1171,18 @@ def generate_upgraded_definition( 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, # type: str - workflow_name, # type: str - list_callback_url, # type: "_models.GetCallbackUrlParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.WorkflowTriggerCallbackUrl" + 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. @@ -666,38 +1201,28 @@ def list_callback_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.list_callback_url.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(list_callback_url, 'GetCallbackUrlParameters') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_list_callback_url_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WorkflowTriggerCallbackUrl', pipeline_response) @@ -706,15 +1231,17 @@ def list_callback_url( 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, # type: str - workflow_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> object + 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. @@ -722,42 +1249,32 @@ def list_swagger( :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 + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + 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 = "2019-05-01" - accept = "application/json" - - # Construct URL - url = self.list_swagger.metadata['url'] # type: ignore - 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'] = self._serialize.header("accept", accept, 'str') + + request = build_list_swagger_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + workflow_name=workflow_name, + template_url=self.list_swagger.metadata['url'], + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('object', pipeline_response) @@ -766,68 +1283,59 @@ def list_swagger( 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( self, - resource_group_name, # type: str - workflow_name, # type: str - move, # type: "_models.WorkflowReference" - **kwargs # type: Any - ): - # type: (...) -> None + 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 = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._move_initial.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(move, 'WorkflowReference') - 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, error_format=ARMErrorFormat) + 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( self, - resource_group_name, # type: str - workflow_name, # type: str - move, # type: "_models.WorkflowReference" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + 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. @@ -838,15 +1346,18 @@ def begin_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: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :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. + :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: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -858,24 +1369,18 @@ def begin_move( resource_group_name=resource_group_name, workflow_name=workflow_name, move=move, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) - 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'), - } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -887,16 +1392,17 @@ def get_long_running_output(pipeline_response): ) else: 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( self, - resource_group_name, # type: str - workflow_name, # type: str - key_type, # type: "_models.RegenerateActionParameter" - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -915,38 +1421,28 @@ def regenerate_access_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.regenerate_access_key.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -954,14 +1450,15 @@ def regenerate_access_key( regenerate_access_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/regenerateAccessKey'} # type: ignore + + @distributed_trace def validate_by_resource_group( self, - resource_group_name, # type: str - workflow_name, # type: str - validate, # type: "_models.Workflow" - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + workflow_name: str, + validate: "_models.Workflow", + **kwargs: Any + ) -> None: """Validates the workflow. :param resource_group_name: The resource group name. @@ -980,38 +1477,28 @@ def validate_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate_by_resource_group.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, '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, + 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) - 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) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1019,15 +1506,16 @@ def validate_by_resource_group( validate_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/validate'} # type: ignore + + @distributed_trace def validate_by_location( self, - resource_group_name, # type: str - location, # type: str - workflow_name, # type: str - validate, # type: "_models.Workflow" - **kwargs # type: Any - ): - # type: (...) -> None + 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. @@ -1048,42 +1536,33 @@ def validate_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2019-05-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.validate_by_location.metadata['url'] # type: ignore - 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') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(validate, 'Workflow') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_validate_by_location_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + workflow_name=workflow_name, + 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) - 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) + 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 +