From d11cc8c1c6f0380aacfbb596e17ed8c3206ae4c5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 5 Jan 2022 10:47:01 +0000 Subject: [PATCH] CodeGen from PR 16902 in Azure/azure-rest-api-specs Track2 modify readme.go.md 4 (#16902) * Track2 modify readme.go.md 4 * devops --- sdk/edgeorder/azure-mgmt-edgeorder/_meta.json | 8 +- .../azure/mgmt/edgeorder/_configuration.py | 4 +- .../_edge_order_management_client.py | 5 +- .../azure/mgmt/edgeorder/_operations_mixin.py | 162 +- .../mgmt/edgeorder/aio/_configuration.py | 4 +- .../aio/_edge_order_management_client.py | 6 +- .../mgmt/edgeorder/aio/_operations_mixin.py | 171 +- .../edgeorder/v2020_12_01_preview/__init__.py | 9 +- .../v2020_12_01_preview/_configuration.py | 19 +- .../_edge_order_management_client.py | 73 +- .../v2020_12_01_preview/_metadata.json | 197 +- .../edgeorder/v2020_12_01_preview/_patch.py | 31 + .../edgeorder/v2020_12_01_preview/_vendor.py | 27 + .../edgeorder/v2020_12_01_preview/_version.py | 2 +- .../v2020_12_01_preview/aio/__init__.py | 5 + .../v2020_12_01_preview/aio/_configuration.py | 6 +- .../aio/_edge_order_management_client.py | 61 +- .../v2020_12_01_preview/aio/_patch.py | 31 + ...edge_order_management_client_operations.py | 1223 ++++--- .../v2020_12_01_preview/models/__init__.py | 216 +- .../_edge_order_management_client_enums.py | 67 +- .../v2020_12_01_preview/models/_models.py | 2971 ----------------- .../v2020_12_01_preview/models/_models_py3.py | 740 ++-- ...edge_order_management_client_operations.py | 2357 ++++++++----- .../mgmt/edgeorder/v2021_12_01/__init__.py | 9 +- .../edgeorder/v2021_12_01/_configuration.py | 19 +- .../_edge_order_management_client.py | 73 +- .../mgmt/edgeorder/v2021_12_01/_metadata.json | 193 +- .../mgmt/edgeorder/v2021_12_01/_patch.py | 31 + .../mgmt/edgeorder/v2021_12_01/_vendor.py | 27 + .../mgmt/edgeorder/v2021_12_01/_version.py | 2 +- .../edgeorder/v2021_12_01/aio/__init__.py | 5 + .../v2021_12_01/aio/_configuration.py | 6 +- .../aio/_edge_order_management_client.py | 61 +- .../mgmt/edgeorder/v2021_12_01/aio/_patch.py | 31 + ...edge_order_management_client_operations.py | 1214 +++---- .../edgeorder/v2021_12_01/models/__init__.py | 216 +- .../_edge_order_management_client_enums.py | 69 +- .../edgeorder/v2021_12_01/models/_models.py | 2948 ---------------- .../v2021_12_01/models/_models_py3.py | 731 ++-- ...edge_order_management_client_operations.py | 2336 ++++++++----- 41 files changed, 6227 insertions(+), 10139 deletions(-) create mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_patch.py create mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_vendor.py create mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_patch.py delete mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models.py create mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_patch.py create mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_vendor.py create mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_patch.py delete mode 100644 sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models.py diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json b/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json index c6dafdaa517c7..26fd9ecc6a3d2 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json +++ b/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.5", + "autorest": "3.7.2", "use": [ - "@autorest/python@5.8.4", - "@autorest/modelerfour@4.19.2" + "@autorest/python@5.12.0", + "@autorest/modelerfour@4.19.3" ], "commit": "cea6492a1e41b3f3b4f8b4f69bdcc10431e79c0e", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/edgeorder/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "autorest_command": "autorest specification/edgeorder/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/edgeorder/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py index 99ef324273b80..cdf0bc12284ec 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py @@ -12,7 +12,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 ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy from ._version import VERSION @@ -68,4 +68,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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_edge_order_management_client.py index dd000ceba0d1d..f06c1586543f9 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_edge_order_management_client.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_edge_order_management_client.py @@ -24,7 +24,6 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse class _SDKClient(object): def __init__(self, *args, **kwargs): @@ -71,12 +70,10 @@ def __init__( credential, # type: "TokenCredential" subscription_id, # type: str api_version=None, # type: Optional[str] - base_url=None, # type: Optional[str] + base_url="https://management.azure.com", # type: str profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): - if not base_url: - base_url = 'https://management.azure.com' self._config = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) super(EdgeOrderManagementClient, self).__init__( diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_operations_mixin.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_operations_mixin.py index 7327f72cb09a7..7e6137d0b09bf 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_operations_mixin.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_operations_mixin.py @@ -10,19 +10,13 @@ # -------------------------------------------------------------------------- from msrest import Serializer, Deserializer from typing import TYPE_CHECKING -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.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + from typing import Any, Iterable, Optional + + from azure.core.paging import ItemPaged + from azure.core.polling import LROPoller class EdgeOrderManagementClientOperationsMixin(object): @@ -34,6 +28,7 @@ def begin_create_address( address_resource, # type: "_models.AddressResource" **kwargs # type: Any ): + # type: (...) -> LROPoller["_models.AddressResource"] """Creates a new address with the specified parameters. Existing address can be updated with this API. @@ -47,13 +42,16 @@ def begin_create_address( :type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource 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 AddressResource or the result of + cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_create_address') if api_version == '2020-12-01-preview': @@ -77,6 +75,7 @@ def begin_create_order_item( order_item_resource, # type: "_models.OrderItemResource" **kwargs # type: Any ): + # type: (...) -> LROPoller["_models.OrderItemResource"] """Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API. @@ -88,13 +87,17 @@ def begin_create_order_item( :type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_create_order_item') if api_version == '2020-12-01-preview': @@ -117,6 +120,7 @@ def begin_delete_address_by_name( resource_group_name, # type: str **kwargs # type: Any ): + # type: (...) -> LROPoller[None] """Deletes an address. :param address_name: The name of the address Resource within the specified resource group. @@ -127,13 +131,15 @@ def begin_delete_address_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 """ api_version = self._get_api_version('begin_delete_address_by_name') if api_version == '2020-12-01-preview': @@ -156,6 +162,7 @@ def begin_delete_order_item_by_name( resource_group_name, # type: str **kwargs # type: Any ): + # type: (...) -> LROPoller[None] """Deletes an order item. :param order_item_name: The name of the order item. @@ -164,13 +171,15 @@ def begin_delete_order_item_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 """ api_version = self._get_api_version('begin_delete_order_item_by_name') if api_version == '2020-12-01-preview': @@ -194,6 +203,7 @@ def begin_return_order_item( return_order_item_details, # type: "_models.ReturnOrderItemDetails" **kwargs # type: Any ): + # type: (...) -> LROPoller[None] """Return order item. :param order_item_name: The name of the order item. @@ -201,16 +211,19 @@ def begin_return_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param return_order_item_details: Return order item CurrentStatus. - :type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails + :type return_order_item_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 """ api_version = self._get_api_version('begin_return_order_item') if api_version == '2020-12-01-preview': @@ -235,6 +248,7 @@ def begin_update_address( if_match=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> LROPoller["_models.AddressResource"] """Updates the properties of an existing address. :param address_name: The name of the address Resource within the specified resource group. @@ -250,13 +264,16 @@ def begin_update_address( :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource 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 AddressResource or the result of + cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_update_address') if api_version == '2020-12-01-preview': @@ -281,6 +298,7 @@ def begin_update_order_item( if_match=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> LROPoller["_models.OrderItemResource"] """Updates the properties of an existing order item. :param order_item_name: The name of the order item. @@ -288,19 +306,24 @@ def begin_update_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param order_item_update_parameter: order item update parameters from request body. - :type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter + :type order_item_update_parameter: + ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_update_order_item') if api_version == '2020-12-01-preview': @@ -324,6 +347,7 @@ def cancel_order_item( cancellation_reason, # type: "_models.CancellationReason" **kwargs # type: Any ): + # type: (...) -> None """Cancel order item. :param order_item_name: The name of the order item. @@ -358,6 +382,7 @@ def get_address_by_name( resource_group_name, # type: str **kwargs # type: Any ): + # type: (...) -> "_models.AddressResource" """Gets information about the specified address. :param address_name: The name of the address Resource within the specified resource group. @@ -393,6 +418,7 @@ def get_order_by_name( location, # type: str **kwargs # type: Any ): + # type: (...) -> "_models.OrderResource" """Gets an order. :param order_name: The name of the order. @@ -428,6 +454,7 @@ def get_order_item_by_name( expand=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> "_models.OrderItemResource" """Gets an order item. :param order_item_name: The name of the order item. @@ -466,6 +493,7 @@ def list_addresses_at_resource_group_level( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.AddressResourceList"] """Lists all the addresses available under the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -478,7 +506,8 @@ def list_addresses_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_addresses_at_resource_group_level') @@ -502,6 +531,7 @@ def list_addresses_at_subscription_level( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.AddressResourceList"] """Lists all the addresses available under the subscription. :param filter: $filter is supported to filter based on shipping address properties. Filter @@ -512,7 +542,8 @@ def list_addresses_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_addresses_at_subscription_level') @@ -536,6 +567,7 @@ def list_configurations( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.Configurations"] """This method provides the list of configurations for the given product family, product line and product under subscription. @@ -568,11 +600,13 @@ def list_operations( self, **kwargs # type: Any ): + # type: (...) -> Iterable["_models.OperationListResult"] """This method gets all the operations that are exposed for customer. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_operations') @@ -596,6 +630,7 @@ def list_order_at_resource_group_level( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.OrderResourceList"] """Lists order at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -605,7 +640,8 @@ def list_order_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_at_resource_group_level') @@ -628,6 +664,7 @@ def list_order_at_subscription_level( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.OrderResourceList"] """Lists order at subscription level. :param skip_token: $skipToken is supported on Get list of order, which provides the next page @@ -635,7 +672,8 @@ def list_order_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_at_subscription_level') @@ -661,6 +699,7 @@ def list_order_items_at_resource_group_level( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.OrderItemResourceList"] """Lists order item at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -677,8 +716,10 @@ def list_order_items_at_resource_group_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_items_at_resource_group_level') @@ -703,6 +744,7 @@ def list_order_items_at_subscription_level( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.OrderItemResourceList"] """Lists order item at subscription level. :param filter: $filter is supported to filter based on order id. Filter supports only equals @@ -717,8 +759,10 @@ def list_order_items_at_subscription_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_items_at_subscription_level') @@ -743,6 +787,7 @@ def list_product_families( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.ProductFamilies"] """This method provides the list of product families for the given subscription. :param product_families_request: Filters for showing the product families. @@ -778,14 +823,17 @@ def list_product_families_metadata( skip_token=None, # type: Optional[str] **kwargs # type: Any ): + # type: (...) -> Iterable["_models.ProductFamiliesMetadata"] """This method provides the list of product families metadata for the given subscription. :param skip_token: $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] + :return: An iterator like instance of either ProductFamiliesMetadata or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_product_families_metadata') diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_configuration.py index c1c21c4043e82..c179469518d61 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_configuration.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_configuration.py @@ -12,7 +12,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 @@ -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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_edge_order_management_client.py index 238c8eb3baa3c..33a226b3c736f 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_edge_order_management_client.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_edge_order_management_client.py @@ -11,7 +11,6 @@ from typing import Any, Optional, TYPE_CHECKING -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin @@ -22,6 +21,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential from azure.core.credentials_async import AsyncTokenCredential class _SDKClient(object): @@ -69,12 +69,10 @@ def __init__( credential: "AsyncTokenCredential", subscription_id: str, api_version: Optional[str] = None, - base_url: Optional[str] = None, + base_url: str = "https://management.azure.com", profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: - if not base_url: - base_url = 'https://management.azure.com' self._config = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) super(EdgeOrderManagementClient, self).__init__( diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_operations_mixin.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_operations_mixin.py index b703caa3df4af..284492c9e985f 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_operations_mixin.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_operations_mixin.py @@ -9,16 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- from msrest import Serializer, Deserializer -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings +from typing import Any, AsyncIterable, Optional -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.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling +from azure.core.async_paging import AsyncItemPaged +from azure.core.polling import AsyncLROPoller class EdgeOrderManagementClientOperationsMixin(object): @@ -43,13 +37,17 @@ async def begin_create_address( :type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_create_address') if api_version == '2020-12-01-preview': @@ -84,13 +82,17 @@ async def begin_create_order_item( :type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_create_order_item') if api_version == '2020-12-01-preview': @@ -123,13 +125,15 @@ async def begin_delete_address_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 """ api_version = self._get_api_version('begin_delete_address_by_name') if api_version == '2020-12-01-preview': @@ -160,13 +164,15 @@ async def begin_delete_order_item_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 """ api_version = self._get_api_version('begin_delete_order_item_by_name') if api_version == '2020-12-01-preview': @@ -197,16 +203,19 @@ async def begin_return_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param return_order_item_details: Return order item CurrentStatus. - :type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails + :type return_order_item_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 """ api_version = self._get_api_version('begin_return_order_item') if api_version == '2020-12-01-preview': @@ -246,13 +255,17 @@ async def begin_update_address( :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_update_address') if api_version == '2020-12-01-preview': @@ -284,19 +297,24 @@ async def begin_update_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param order_item_update_parameter: order item update parameters from request body. - :type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter + :type order_item_update_parameter: + ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_update_order_item') if api_version == '2020-12-01-preview': @@ -461,7 +479,7 @@ def list_addresses_at_resource_group_level( filter: Optional[str] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.AddressResourceList"]: + ) -> AsyncIterable["_models.AddressResourceList"]: """Lists all the addresses available under the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -474,7 +492,8 @@ def list_addresses_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_addresses_at_resource_group_level') @@ -497,7 +516,7 @@ def list_addresses_at_subscription_level( filter: Optional[str] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.AddressResourceList"]: + ) -> AsyncIterable["_models.AddressResourceList"]: """Lists all the addresses available under the subscription. :param filter: $filter is supported to filter based on shipping address properties. Filter @@ -508,7 +527,8 @@ def list_addresses_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_addresses_at_subscription_level') @@ -531,7 +551,7 @@ def list_configurations( configurations_request: "_models.ConfigurationsRequest", skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.Configurations"]: + ) -> AsyncIterable["_models.Configurations"]: """This method provides the list of configurations for the given product family, product line and product under subscription. @@ -542,7 +562,8 @@ def list_configurations( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Configurations or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_configurations') @@ -563,12 +584,13 @@ def list_configurations( def list_operations( self, **kwargs: Any - ) -> AsyncItemPaged["_models.OperationListResult"]: + ) -> AsyncIterable["_models.OperationListResult"]: """This method gets all the operations that are exposed for customer. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_operations') @@ -591,7 +613,7 @@ def list_order_at_resource_group_level( resource_group_name: str, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.OrderResourceList"]: + ) -> AsyncIterable["_models.OrderResourceList"]: """Lists order at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -601,7 +623,8 @@ def list_order_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_at_resource_group_level') @@ -623,7 +646,7 @@ def list_order_at_subscription_level( self, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.OrderResourceList"]: + ) -> AsyncIterable["_models.OrderResourceList"]: """Lists order at subscription level. :param skip_token: $skipToken is supported on Get list of order, which provides the next page @@ -631,7 +654,8 @@ def list_order_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_at_subscription_level') @@ -656,7 +680,7 @@ def list_order_items_at_resource_group_level( expand: Optional[str] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.OrderItemResourceList"]: + ) -> AsyncIterable["_models.OrderItemResourceList"]: """Lists order item at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -673,8 +697,10 @@ def list_order_items_at_resource_group_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_items_at_resource_group_level') @@ -698,7 +724,7 @@ def list_order_items_at_subscription_level( expand: Optional[str] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.OrderItemResourceList"]: + ) -> AsyncIterable["_models.OrderItemResourceList"]: """Lists order item at subscription level. :param filter: $filter is supported to filter based on order id. Filter supports only equals @@ -713,8 +739,10 @@ def list_order_items_at_subscription_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_order_items_at_subscription_level') @@ -738,7 +766,7 @@ def list_product_families( expand: Optional[str] = None, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.ProductFamilies"]: + ) -> AsyncIterable["_models.ProductFamilies"]: """This method provides the list of product families for the given subscription. :param product_families_request: Filters for showing the product families. @@ -751,7 +779,8 @@ def list_product_families( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductFamilies or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_product_families') @@ -773,15 +802,17 @@ def list_product_families_metadata( self, skip_token: Optional[str] = None, **kwargs: Any - ) -> AsyncItemPaged["_models.ProductFamiliesMetadata"]: + ) -> AsyncIterable["_models.ProductFamiliesMetadata"]: """This method provides the list of product families metadata for the given subscription. :param skip_token: $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] + :return: An iterator like instance of either ProductFamiliesMetadata or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('list_product_families_metadata') diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/__init__.py index 6a0b62b08a4ce..24111d1edffbc 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/__init__.py @@ -12,8 +12,7 @@ __version__ = VERSION __all__ = ['EdgeOrderManagementClient'] -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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_configuration.py index 1ef1c6f5917fe..a309e2ffe3bde 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_configuration.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_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 EdgeOrderManagementClientConfiguration(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(EdgeOrderManagementClientConfiguration, 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(EdgeOrderManagementClientConfiguration, 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_edge_order_management_client.py index bd6f90006bc18..9e6456f803d0e 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_edge_order_management_client.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_edge_order_management_client.py @@ -6,22 +6,20 @@ # 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 -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - +from . import models from ._configuration import EdgeOrderManagementClientConfiguration from .operations import EdgeOrderManagementClientOperationsMixin -from . import models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): """The EdgeOrder Client. @@ -30,46 +28,53 @@ class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. :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 = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs) + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = EdgeOrderManagementClientConfiguration(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 - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs: Any + ) -> HttpResponse: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> 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.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_metadata.json b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_metadata.json index 7f66d94132f4b..0252a663cb4c5 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_metadata.json +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_metadata.json @@ -5,13 +5,13 @@ "name": "EdgeOrderManagementClient", "filename": "_edge_order_management_client", "description": "The EdgeOrder Client.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, + "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\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "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\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"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\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -54,7 +54,7 @@ "required": false }, "base_url": { - "signature": "base_url=None, # type: Optional[str]", + "signature": "base_url=\"https://management.azure.com\", # type: str", "description": "Service URL", "docstring_type": "str", "required": false @@ -74,7 +74,7 @@ "required": false }, "base_url": { - "signature": "base_url: Optional[str] = None,", + "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", "required": false @@ -91,117 +91,116 @@ "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"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\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "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": { }, "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.mgmt.core.polling.arm_polling\": [\"ARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.mgmt.core.polling.async_arm_polling\": [\"AsyncARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Iterable\", \"Optional\"]}, \"azurecore\": {\"azure.core.paging\": [\"ItemPaged\"], \"azure.core.polling\": [\"LROPoller\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Optional\"]}, \"azurecore\": {\"azure.core.async_paging\": [\"AsyncItemPaged\"], \"azure.core.polling\": [\"AsyncLROPoller\"]}}}", "operations": { "list_operations" : { "sync": { - "signature": "def list_operations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_operations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OperationListResult\"]\n", + "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_operations(\n self,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OperationListResult\"]:\n", - "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_operations(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OperationListResult\"]:\n", + "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_addresses_at_subscription_level" : { "sync": { - "signature": "def list_addresses_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.AddressResourceList\"]\n", + "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_addresses_at_subscription_level(\n self,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.AddressResourceList\"]:\n", - "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_subscription_level(\n self,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.AddressResourceList\"]:\n", + "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "filter, skip_token" }, "list_product_families" : { "sync": { - "signature": "def list_product_families(\n self,\n product_families_request, # type: \"_models.ProductFamiliesRequest\"\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"This method provides the list of product families for the given subscription.\n\n:param product_families_request: Filters for showing the product families.\n:type product_families_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest\n:param expand: $expand is supported on configurations parameter for product, which provides\n details on the configurations for the product.\n:type expand: str\n:param skip_token: $skipToken is supported on list of product families, which provides the next\n page in the list of product families.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamilies or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_product_families(\n self,\n product_families_request, # type: \"_models.ProductFamiliesRequest\"\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.ProductFamilies\"]\n", + "doc": "\"\"\"This method provides the list of product families for the given subscription.\n\n:param product_families_request: Filters for showing the product families.\n:type product_families_request:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest\n:param expand: $expand is supported on configurations parameter for product, which provides\n details on the configurations for the product.\n:type expand: str\n:param skip_token: $skipToken is supported on list of product families, which provides the next\n page in the list of product families.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamilies or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_product_families(\n self,\n product_families_request: \"_models.ProductFamiliesRequest\",\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.ProductFamilies\"]:\n", - "doc": "\"\"\"This method provides the list of product families for the given subscription.\n\n:param product_families_request: Filters for showing the product families.\n:type product_families_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest\n:param expand: $expand is supported on configurations parameter for product, which provides\n details on the configurations for the product.\n:type expand: str\n:param skip_token: $skipToken is supported on list of product families, which provides the next\n page in the list of product families.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamilies or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_product_families(\n self,\n product_families_request: \"_models.ProductFamiliesRequest\",\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.ProductFamilies\"]:\n", + "doc": "\"\"\"This method provides the list of product families for the given subscription.\n\n:param product_families_request: Filters for showing the product families.\n:type product_families_request:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest\n:param expand: $expand is supported on configurations parameter for product, which provides\n details on the configurations for the product.\n:type expand: str\n:param skip_token: $skipToken is supported on list of product families, which provides the next\n page in the list of product families.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamilies or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "product_families_request, expand, skip_token" }, "list_configurations" : { "sync": { - "signature": "def list_configurations(\n self,\n configurations_request, # type: \"_models.ConfigurationsRequest\"\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"This method provides the list of configurations for the given product family, product line and\nproduct under subscription.\n\n:param configurations_request: Filters for showing the configurations.\n:type configurations_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest\n:param skip_token: $skipToken is supported on list of configurations, which provides the next\n page in the list of configurations.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either Configurations or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_configurations(\n self,\n configurations_request, # type: \"_models.ConfigurationsRequest\"\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.Configurations\"]\n", + "doc": "\"\"\"This method provides the list of configurations for the given product family, product line and\nproduct under subscription.\n\n:param configurations_request: Filters for showing the configurations.\n:type configurations_request:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest\n:param skip_token: $skipToken is supported on list of configurations, which provides the next\n page in the list of configurations.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either Configurations or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_configurations(\n self,\n configurations_request: \"_models.ConfigurationsRequest\",\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.Configurations\"]:\n", - "doc": "\"\"\"This method provides the list of configurations for the given product family, product line and\nproduct under subscription.\n\n:param configurations_request: Filters for showing the configurations.\n:type configurations_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest\n:param skip_token: $skipToken is supported on list of configurations, which provides the next\n page in the list of configurations.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either Configurations or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_configurations(\n self,\n configurations_request: \"_models.ConfigurationsRequest\",\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.Configurations\"]:\n", + "doc": "\"\"\"This method provides the list of configurations for the given product family, product line and\nproduct under subscription.\n\n:param configurations_request: Filters for showing the configurations.\n:type configurations_request:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest\n:param skip_token: $skipToken is supported on list of configurations, which provides the next\n page in the list of configurations.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either Configurations or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "configurations_request, skip_token" }, "list_product_families_metadata" : { "sync": { - "signature": "def list_product_families_metadata(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_product_families_metadata(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.ProductFamiliesMetadata\"]\n", + "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_product_families_metadata(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.ProductFamiliesMetadata\"]:\n", - "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_product_families_metadata(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.ProductFamiliesMetadata\"]:\n", + "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "skip_token" }, "list_order_at_subscription_level" : { "sync": { - "signature": "def list_order_at_subscription_level(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_subscription_level(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderResourceList\"]\n", + "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_at_subscription_level(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderResourceList\"]:\n", - "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_subscription_level(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderResourceList\"]:\n", + "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "skip_token" }, "list_order_items_at_subscription_level" : { "sync": { - "signature": "def list_order_items_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderItemResourceList\"]\n", + "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_items_at_subscription_level(\n self,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderItemResourceList\"]:\n", - "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_subscription_level(\n self,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderItemResourceList\"]:\n", + "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "filter, expand, skip_token" }, "list_addresses_at_resource_group_level" : { "sync": { - "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.AddressResourceList\"]\n", + "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.AddressResourceList\"]:\n", - "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.AddressResourceList\"]:\n", + "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, filter, skip_token" }, "get_address_by_name" : { "sync": { - "signature": "def get_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", + "signature": "def get_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.AddressResource\"\n", "doc": "\"\"\"Gets information about the specified address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -213,91 +212,91 @@ }, "_create_address_initial" : { "sync": { - "signature": "def _create_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _create_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.AddressResource\"]\n", + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _create_address_initial(\n self,\n address_name: str,\n resource_group_name: str,\n address_resource: \"_models.AddressResource\",\n **kwargs: Any\n) -\u003e Optional[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_resource" }, "begin_create_address" : { "sync": { - "signature": "def begin_create_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Creates a new address with the specified parameters. Existing address cannot be updated with\nthis API and should instead be updated with the Update address API.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_create_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.AddressResource\"]\n", + "doc": "\"\"\"Creates a new address with the specified parameters. Existing address cannot be updated with\nthis API and should instead be updated with the Update address API.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_create_address(\n self,\n address_name: str,\n resource_group_name: str,\n address_resource: \"_models.AddressResource\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"Creates a new address with the specified parameters. Existing address cannot be updated with\nthis API and should instead be updated with the Update address API.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Creates a new address with the specified parameters. Existing address cannot be updated with\nthis API and should instead be updated with the Update address API.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_resource" }, "_delete_address_by_name_initial" : { "sync": { - "signature": "def _delete_address_by_name_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _delete_address_by_name_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _delete_address_by_name_initial(\n self,\n address_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name" }, "begin_delete_address_by_name" : { "sync": { - "signature": "def begin_delete_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_delete_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_delete_address_by_name(\n self,\n address_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name" }, "_update_address_initial" : { "sync": { - "signature": "def _update_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _update_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.AddressResource\"]\n", + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _update_address_initial(\n self,\n address_name: str,\n resource_group_name: str,\n address_update_parameter: \"_models.AddressUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_update_parameter, if_match" }, "begin_update_address" : { "sync": { - "signature": "def begin_update_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_update_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.AddressResource\"]\n", + "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_update_address(\n self,\n address_name: str,\n resource_group_name: str,\n address_update_parameter: \"_models.AddressUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_update_parameter, if_match" }, "list_order_at_resource_group_level" : { "sync": { - "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name, # type: str\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name, # type: str\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderResourceList\"]\n", + "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name: str,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderResourceList\"]:\n", - "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name: str,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderResourceList\"]:\n", + "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, skip_token" }, "get_order_by_name" : { "sync": { - "signature": "def get_order_by_name(\n self,\n order_name, # type: str\n resource_group_name, # type: str\n location, # type: str\n **kwargs # type: Any\n):\n", + "signature": "def get_order_by_name(\n self,\n order_name, # type: str\n resource_group_name, # type: str\n location, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.OrderResource\"\n", "doc": "\"\"\"Gets an order.\n\n:param order_name: The name of the order.\n:type order_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param location: The name of Azure region.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResource\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -309,19 +308,19 @@ }, "list_order_items_at_resource_group_level" : { "sync": { - "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderItemResourceList\"]\n", + "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderItemResourceList\"]:\n", - "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderItemResourceList\"]:\n", + "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, filter, expand, skip_token" }, "get_order_item_by_name" : { "sync": { - "signature": "def get_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n expand=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "signature": "def get_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n expand=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.OrderItemResource\"\n", "doc": "\"\"\"Gets an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -333,79 +332,79 @@ }, "_create_order_item_initial" : { "sync": { - "signature": "def _create_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _create_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.OrderItemResource\"]\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _create_order_item_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_resource: \"_models.OrderItemResource\",\n **kwargs: Any\n) -\u003e Optional[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_resource" }, "begin_create_order_item" : { "sync": { - "signature": "def begin_create_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_create_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.OrderItemResource\"]\n", + "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_create_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_resource: \"_models.OrderItemResource\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_resource" }, "_delete_order_item_by_name_initial" : { "sync": { - "signature": "def _delete_order_item_by_name_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _delete_order_item_by_name_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _delete_order_item_by_name_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name" }, "begin_delete_order_item_by_name" : { "sync": { - "signature": "def begin_delete_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_delete_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_delete_order_item_by_name(\n self,\n order_item_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name" }, "_update_order_item_initial" : { "sync": { - "signature": "def _update_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _update_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.OrderItemResource\"]\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _update_order_item_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_update_parameter: \"_models.OrderItemUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_update_parameter, if_match" }, "begin_update_order_item" : { "sync": { - "signature": "def begin_update_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_update_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.OrderItemResource\"]\n", + "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_update_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_update_parameter: \"_models.OrderItemUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_update_parameter, if_match" }, "cancel_order_item" : { "sync": { - "signature": "def cancel_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n cancellation_reason, # type: \"_models.CancellationReason\"\n **kwargs # type: Any\n):\n", + "signature": "def cancel_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n cancellation_reason, # type: \"_models.CancellationReason\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", "doc": "\"\"\"Cancel order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param cancellation_reason: Reason for cancellation.\n:type cancellation_reason: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CancellationReason\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -417,25 +416,25 @@ }, "_return_order_item_initial" : { "sync": { - "signature": "def _return_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _return_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _return_order_item_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n return_order_item_details: \"_models.ReturnOrderItemDetails\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, return_order_item_details" }, "begin_return_order_item" : { "sync": { - "signature": "def begin_return_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_return_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_return_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n return_order_item_details: \"_models.ReturnOrderItemDetails\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, return_order_item_details" } diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_patch.py new file mode 100644 index 0000000000000..74e48ecd07cf3 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_vendor.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_vendor.py new file mode 100644 index 0000000000000..138f663c53a4e --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_version.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_version.py index c47f66669f1bf..e5754a47ce68f 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_version.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/__init__.py index b8c98d8145e85..02e64d7ffdd9b 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/__init__.py @@ -8,3 +8,8 @@ from ._edge_order_management_client import EdgeOrderManagementClient __all__ = ['EdgeOrderManagementClient'] + +# `._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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_configuration.py index 4a36ece13ef18..4f673145d8c9f 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_configuration.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/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(EdgeOrderManagementClientConfiguration, 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(EdgeOrderManagementClientConfiguration, 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_edge_order_management_client.py index 5c0a179b37890..59735f19df04c 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_edge_order_management_client.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_edge_order_management_client.py @@ -6,20 +6,20 @@ # 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.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - +from .. import models from ._configuration import EdgeOrderManagementClientConfiguration from .operations import EdgeOrderManagementClientOperationsMixin -from .. import models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): """The EdgeOrder Client. @@ -28,44 +28,53 @@ class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. :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 = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs) + self._config = EdgeOrderManagementClientConfiguration(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 - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> 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.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_patch.py new file mode 100644 index 0000000000000..74e48ecd07cf3 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/operations/_edge_order_management_client_operations.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/operations/_edge_order_management_client_operations.py index 589dd33a42f45..02cd5a6bb9f90 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/operations/_edge_order_management_client_operations.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/operations/_edge_order_management_client_operations.py @@ -5,24 +5,30 @@ # 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._edge_order_management_client_operations import build_cancel_order_item_request, build_create_address_request_initial, build_create_order_item_request_initial, build_delete_address_by_name_request_initial, build_delete_order_item_by_name_request_initial, build_get_address_by_name_request, build_get_order_by_name_request, build_get_order_item_by_name_request, build_list_addresses_at_resource_group_level_request, build_list_addresses_at_subscription_level_request, build_list_configurations_request, build_list_operations_request, build_list_order_at_resource_group_level_request, build_list_order_at_subscription_level_request, build_list_order_items_at_resource_group_level_request, build_list_order_items_at_subscription_level_request, build_list_product_families_metadata_request, build_list_product_families_request, build_return_order_item_request_initial, build_update_address_request_initial, build_update_order_item_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class EdgeOrderManagementClientOperationsMixin: + @distributed_trace def list_operations( self, **kwargs: Any @@ -31,7 +37,8 @@ def list_operations( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -39,30 +46,27 @@ def list_operations( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_operations.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_operations_request( + template_url=self.list_operations.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_operations_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) @@ -75,17 +79,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_operations.metadata = {'url': '/providers/Microsoft.EdgeOrder/operations'} # type: ignore + @distributed_trace def list_addresses_at_subscription_level( self, filter: Optional[str] = None, @@ -102,7 +108,8 @@ def list_addresses_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -110,38 +117,33 @@ def list_addresses_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_addresses_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_subscription_level.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_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -154,17 +156,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace def list_product_families( self, product_families_request: "_models.ProductFamiliesRequest", @@ -175,7 +179,8 @@ def list_product_families( """This method provides the list of product families for the given subscription. :param product_families_request: Filters for showing the product families. - :type product_families_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest + :type product_families_request: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest :param expand: $expand is supported on configurations parameter for product, which provides details on the configurations for the product. :type expand: str @@ -184,54 +189,50 @@ def list_product_families( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductFamilies or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamilies"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_product_families.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + template_url=self.list_product_families.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(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + 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('ProductFamilies', pipeline_response) + deserialized = self._deserialize("ProductFamilies", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -244,17 +245,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies'} # type: ignore + @distributed_trace def list_configurations( self, configurations_request: "_models.ConfigurationsRequest", @@ -265,58 +268,55 @@ def list_configurations( product under subscription. :param configurations_request: Filters for showing the configurations. - :type configurations_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest + :type configurations_request: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest :param skip_token: $skipToken is supported on list of configurations, which provides the next page in the list of configurations. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Configurations or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configurations"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_configurations.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + template_url=self.list_configurations.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(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + 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('Configurations', pipeline_response) + deserialized = self._deserialize("Configurations", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -329,17 +329,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listConfigurations'} # type: ignore + @distributed_trace def list_product_families_metadata( self, skip_token: Optional[str] = None, @@ -351,8 +353,10 @@ def list_product_families_metadata( the next page in the list of product families metadata. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata] + :return: An iterator like instance of either ProductFamiliesMetadata or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamiliesMetadata"] @@ -360,36 +364,31 @@ def list_product_families_metadata( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_product_families_metadata.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.post(url, query_parameters, header_parameters) + + request = build_list_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_product_families_metadata.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_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('ProductFamiliesMetadata', pipeline_response) + deserialized = self._deserialize("ProductFamiliesMetadata", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -402,17 +401,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata'} # type: ignore + @distributed_trace def list_order_at_subscription_level( self, skip_token: Optional[str] = None, @@ -425,7 +426,8 @@ def list_order_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -433,36 +435,31 @@ def list_order_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_order_at_subscription_level.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_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -475,17 +472,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace def list_order_items_at_subscription_level( self, filter: Optional[str] = None, @@ -507,8 +506,10 @@ def list_order_items_at_subscription_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -516,40 +517,35 @@ def list_order_items_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_items_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_subscription_level.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_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -562,17 +558,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace def list_addresses_at_resource_group_level( self, resource_group_name: str, @@ -592,7 +590,8 @@ def list_addresses_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -600,39 +599,35 @@ def list_addresses_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_addresses_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_resource_group_level.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_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -645,17 +640,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace_async async def get_address_by_name( self, address_name: str, @@ -680,33 +677,23 @@ async def get_address_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_address_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self.get_address_by_name.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.failsafe_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('AddressResource', pipeline_response) @@ -715,8 +702,10 @@ async def get_address_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + async def _create_address_initial( self, address_name: str, @@ -729,39 +718,28 @@ async def _create_address_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(address_resource, 'AddressResource') + + request = build_create_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_address_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(address_resource, 'AddressResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -771,8 +749,11 @@ async def _create_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace_async async def begin_create_address( self, address_name: str, @@ -793,15 +774,20 @@ async def begin_create_address( :type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] + :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -813,27 +799,21 @@ async def begin_create_address( address_name=address_name, resource_group_name=resource_group_name, address_resource=address_resource, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -845,6 +825,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore async def _delete_address_by_name_initial( @@ -858,40 +839,31 @@ async def _delete_address_by_name_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self._delete_address_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_address_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_address_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace_async async def begin_delete_address_by_name( self, address_name: str, @@ -908,15 +880,17 @@ async def begin_delete_address_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -930,21 +904,14 @@ async def begin_delete_address_by_name( 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 = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -956,6 +923,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore async def _update_address_initial( @@ -971,41 +939,29 @@ async def _update_address_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') + + request = build_update_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_address_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1015,8 +971,11 @@ async def _update_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace_async async def begin_update_address( self, address_name: str, @@ -1034,21 +993,27 @@ async def begin_update_address( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param address_update_parameter: Address update parameters from request body. - :type address_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter + :type address_update_parameter: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] + :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1061,27 +1026,21 @@ async def begin_update_address( resource_group_name=resource_group_name, address_update_parameter=address_update_parameter, if_match=if_match, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1093,8 +1052,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + @distributed_trace def list_order_at_resource_group_level( self, resource_group_name: str, @@ -1110,7 +1071,8 @@ def list_order_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -1118,37 +1080,33 @@ def list_order_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + template_url=self.list_order_at_resource_group_level.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_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1161,17 +1119,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace_async async def get_order_by_name( self, order_name: str, @@ -1197,34 +1157,24 @@ async def get_order_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_order_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderName': self._serialize.url("order_name", order_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'location': self._serialize.url("location", location, 'str', min_length=1), - } - url = self._client.format_url(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_order_by_name_request( + order_name=order_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + template_url=self.get_order_by_name.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.failsafe_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('OrderResource', pipeline_response) @@ -1233,8 +1183,11 @@ async def get_order_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName}'} # type: ignore + + @distributed_trace def list_order_items_at_resource_group_level( self, resource_group_name: str, @@ -1259,8 +1212,10 @@ def list_order_items_at_resource_group_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -1268,41 +1223,37 @@ def list_order_items_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_items_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_resource_group_level.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_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1315,17 +1266,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace_async async def get_order_item_by_name( self, order_item_name: str, @@ -1354,35 +1307,24 @@ async def get_order_item_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_order_item_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_order_item_by_name_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + expand=expand, + template_url=self.get_order_item_by_name.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.failsafe_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('OrderItemResource', pipeline_response) @@ -1391,8 +1333,10 @@ async def get_order_item_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + async def _create_order_item_initial( self, order_item_name: str, @@ -1405,39 +1349,28 @@ async def _create_order_item_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(order_item_resource, 'OrderItemResource') + + request = build_create_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_order_item_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(order_item_resource, 'OrderItemResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1447,8 +1380,11 @@ async def _create_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace_async async def begin_create_order_item( self, order_item_name: str, @@ -1467,15 +1403,20 @@ async def begin_create_order_item( :type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1487,27 +1428,21 @@ async def begin_create_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, order_item_resource=order_item_resource, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1519,6 +1454,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore async def _delete_order_item_by_name_initial( @@ -1532,40 +1468,31 @@ async def _delete_order_item_by_name_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self._delete_order_item_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_order_item_by_name_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_order_item_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_order_item_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace_async async def begin_delete_order_item_by_name( self, order_item_name: str, @@ -1580,15 +1507,17 @@ async def begin_delete_order_item_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1602,21 +1531,14 @@ async def begin_delete_order_item_by_name( 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1628,6 +1550,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore async def _update_order_item_initial( @@ -1643,41 +1566,29 @@ async def _update_order_item_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') + + request = build_update_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_order_item_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1687,8 +1598,11 @@ async def _update_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace_async async def begin_update_order_item( self, order_item_name: str, @@ -1704,21 +1618,27 @@ async def begin_update_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param order_item_update_parameter: order item update parameters from request body. - :type order_item_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter + :type order_item_update_parameter: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1731,27 +1651,21 @@ async def begin_update_order_item( resource_group_name=resource_group_name, order_item_update_parameter=order_item_update_parameter, if_match=if_match, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1763,8 +1677,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + @distributed_trace_async async def cancel_order_item( self, order_item_name: str, @@ -1790,38 +1706,28 @@ async def cancel_order_item( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.cancel_order_item.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(cancellation_reason, 'CancellationReason') + + request = build_cancel_order_item_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self.cancel_order_item.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(cancellation_reason, 'CancellationReason') - 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, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1829,6 +1735,7 @@ async def cancel_order_item( cancel_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/cancel'} # type: ignore + async def _return_order_item_initial( self, order_item_name: str, @@ -1841,45 +1748,36 @@ async def _return_order_item_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._return_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(return_order_item_details, 'ReturnOrderItemDetails') + + request = build_return_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._return_order_item_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(return_order_item_details, 'ReturnOrderItemDetails') - 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.failsafe_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, {}) _return_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore + + @distributed_trace_async async def begin_return_order_item( self, order_item_name: str, @@ -1894,18 +1792,22 @@ async def begin_return_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param return_order_item_details: Return order item CurrentStatus. - :type return_order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails + :type return_order_item_details: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1917,24 +1819,18 @@ async def begin_return_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, return_order_item_details=return_order_item_details, + 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1946,4 +1842,5 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_return_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/__init__.py index 67915606ae5b0..9bca4a2e56374 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/__init__.py @@ -6,150 +6,78 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -try: - from ._models_py3 import AddressDetails - from ._models_py3 import AddressProperties - from ._models_py3 import AddressResource - from ._models_py3 import AddressResourceList - from ._models_py3 import AddressUpdateParameter - from ._models_py3 import AvailabilityInformation - from ._models_py3 import BasicInformation - from ._models_py3 import BillingMeterDetails - from ._models_py3 import CancellationReason - from ._models_py3 import CommonProperties - from ._models_py3 import Configuration - from ._models_py3 import ConfigurationFilters - from ._models_py3 import ConfigurationProperties - from ._models_py3 import Configurations - from ._models_py3 import ConfigurationsRequest - from ._models_py3 import ContactDetails - from ._models_py3 import CostInformation - from ._models_py3 import CustomerSubscriptionDetails - from ._models_py3 import CustomerSubscriptionRegisteredFeatures - from ._models_py3 import Description - from ._models_py3 import DeviceDetails - from ._models_py3 import Dimensions - from ._models_py3 import DisplayInfo - from ._models_py3 import EncryptionPreferences - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorDetail - from ._models_py3 import ErrorResponse - from ._models_py3 import FilterableProperty - from ._models_py3 import ForwardShippingDetails - from ._models_py3 import HierarchyInformation - from ._models_py3 import ImageInformation - from ._models_py3 import Link - from ._models_py3 import ManagementResourcePreferences - from ._models_py3 import MeterDetails - from ._models_py3 import NotificationPreference - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import OrderItemDetails - from ._models_py3 import OrderItemResource - from ._models_py3 import OrderItemResourceList - from ._models_py3 import OrderItemUpdateParameter - from ._models_py3 import OrderResource - from ._models_py3 import OrderResourceList - from ._models_py3 import Pav2MeterDetails - from ._models_py3 import Preferences - from ._models_py3 import Product - from ._models_py3 import ProductDetails - from ._models_py3 import ProductFamilies - from ._models_py3 import ProductFamiliesMetadata - from ._models_py3 import ProductFamiliesMetadataDetails - from ._models_py3 import ProductFamiliesRequest - from ._models_py3 import ProductFamily - from ._models_py3 import ProductFamilyProperties - from ._models_py3 import ProductLine - from ._models_py3 import ProductLineProperties - from ._models_py3 import ProductProperties - from ._models_py3 import ProxyResource - from ._models_py3 import PurchaseMeterDetails - from ._models_py3 import Resource - from ._models_py3 import ResourceIdentity - from ._models_py3 import ResourceProviderDetails - from ._models_py3 import ReturnOrderItemDetails - from ._models_py3 import ReverseShippingDetails - from ._models_py3 import ShippingAddress - from ._models_py3 import ShippingDetails - from ._models_py3 import Specification - from ._models_py3 import StageDetails - from ._models_py3 import SystemData - from ._models_py3 import TrackedResource - from ._models_py3 import TransportPreferences -except (SyntaxError, ImportError): - from ._models import AddressDetails # type: ignore - from ._models import AddressProperties # type: ignore - from ._models import AddressResource # type: ignore - from ._models import AddressResourceList # type: ignore - from ._models import AddressUpdateParameter # type: ignore - from ._models import AvailabilityInformation # type: ignore - from ._models import BasicInformation # type: ignore - from ._models import BillingMeterDetails # type: ignore - from ._models import CancellationReason # type: ignore - from ._models import CommonProperties # type: ignore - from ._models import Configuration # type: ignore - from ._models import ConfigurationFilters # type: ignore - from ._models import ConfigurationProperties # type: ignore - from ._models import Configurations # type: ignore - from ._models import ConfigurationsRequest # type: ignore - from ._models import ContactDetails # type: ignore - from ._models import CostInformation # type: ignore - from ._models import CustomerSubscriptionDetails # type: ignore - from ._models import CustomerSubscriptionRegisteredFeatures # type: ignore - from ._models import Description # type: ignore - from ._models import DeviceDetails # type: ignore - from ._models import Dimensions # type: ignore - from ._models import DisplayInfo # type: ignore - from ._models import EncryptionPreferences # type: ignore - from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorDetail # type: ignore - from ._models import ErrorResponse # type: ignore - from ._models import FilterableProperty # type: ignore - from ._models import ForwardShippingDetails # type: ignore - from ._models import HierarchyInformation # type: ignore - from ._models import ImageInformation # type: ignore - from ._models import Link # type: ignore - from ._models import ManagementResourcePreferences # type: ignore - from ._models import MeterDetails # type: ignore - from ._models import NotificationPreference # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationListResult # type: ignore - from ._models import OrderItemDetails # type: ignore - from ._models import OrderItemResource # type: ignore - from ._models import OrderItemResourceList # type: ignore - from ._models import OrderItemUpdateParameter # type: ignore - from ._models import OrderResource # type: ignore - from ._models import OrderResourceList # type: ignore - from ._models import Pav2MeterDetails # type: ignore - from ._models import Preferences # type: ignore - from ._models import Product # type: ignore - from ._models import ProductDetails # type: ignore - from ._models import ProductFamilies # type: ignore - from ._models import ProductFamiliesMetadata # type: ignore - from ._models import ProductFamiliesMetadataDetails # type: ignore - from ._models import ProductFamiliesRequest # type: ignore - from ._models import ProductFamily # type: ignore - from ._models import ProductFamilyProperties # type: ignore - from ._models import ProductLine # type: ignore - from ._models import ProductLineProperties # type: ignore - from ._models import ProductProperties # type: ignore - from ._models import ProxyResource # type: ignore - from ._models import PurchaseMeterDetails # type: ignore - from ._models import Resource # type: ignore - from ._models import ResourceIdentity # type: ignore - from ._models import ResourceProviderDetails # type: ignore - from ._models import ReturnOrderItemDetails # type: ignore - from ._models import ReverseShippingDetails # type: ignore - from ._models import ShippingAddress # type: ignore - from ._models import ShippingDetails # type: ignore - from ._models import Specification # type: ignore - from ._models import StageDetails # type: ignore - from ._models import SystemData # type: ignore - from ._models import TrackedResource # type: ignore - from ._models import TransportPreferences # type: ignore +from ._models_py3 import AddressDetails +from ._models_py3 import AddressProperties +from ._models_py3 import AddressResource +from ._models_py3 import AddressResourceList +from ._models_py3 import AddressUpdateParameter +from ._models_py3 import AvailabilityInformation +from ._models_py3 import BasicInformation +from ._models_py3 import BillingMeterDetails +from ._models_py3 import CancellationReason +from ._models_py3 import CommonProperties +from ._models_py3 import Configuration +from ._models_py3 import ConfigurationFilters +from ._models_py3 import ConfigurationProperties +from ._models_py3 import Configurations +from ._models_py3 import ConfigurationsRequest +from ._models_py3 import ContactDetails +from ._models_py3 import CostInformation +from ._models_py3 import CustomerSubscriptionDetails +from ._models_py3 import CustomerSubscriptionRegisteredFeatures +from ._models_py3 import Description +from ._models_py3 import DeviceDetails +from ._models_py3 import Dimensions +from ._models_py3 import DisplayInfo +from ._models_py3 import EncryptionPreferences +from ._models_py3 import ErrorAdditionalInfo +from ._models_py3 import ErrorDetail +from ._models_py3 import ErrorResponse +from ._models_py3 import FilterableProperty +from ._models_py3 import ForwardShippingDetails +from ._models_py3 import HierarchyInformation +from ._models_py3 import ImageInformation +from ._models_py3 import Link +from ._models_py3 import ManagementResourcePreferences +from ._models_py3 import MeterDetails +from ._models_py3 import NotificationPreference +from ._models_py3 import Operation +from ._models_py3 import OperationDisplay +from ._models_py3 import OperationListResult +from ._models_py3 import OrderItemDetails +from ._models_py3 import OrderItemResource +from ._models_py3 import OrderItemResourceList +from ._models_py3 import OrderItemUpdateParameter +from ._models_py3 import OrderResource +from ._models_py3 import OrderResourceList +from ._models_py3 import Pav2MeterDetails +from ._models_py3 import Preferences +from ._models_py3 import Product +from ._models_py3 import ProductDetails +from ._models_py3 import ProductFamilies +from ._models_py3 import ProductFamiliesMetadata +from ._models_py3 import ProductFamiliesMetadataDetails +from ._models_py3 import ProductFamiliesRequest +from ._models_py3 import ProductFamily +from ._models_py3 import ProductFamilyProperties +from ._models_py3 import ProductLine +from ._models_py3 import ProductLineProperties +from ._models_py3 import ProductProperties +from ._models_py3 import ProxyResource +from ._models_py3 import PurchaseMeterDetails +from ._models_py3 import Resource +from ._models_py3 import ResourceIdentity +from ._models_py3 import ResourceProviderDetails +from ._models_py3 import ReturnOrderItemDetails +from ._models_py3 import ReverseShippingDetails +from ._models_py3 import ShippingAddress +from ._models_py3 import ShippingDetails +from ._models_py3 import Specification +from ._models_py3 import StageDetails +from ._models_py3 import SystemData +from ._models_py3 import TrackedResource +from ._models_py3 import TransportPreferences + from ._edge_order_management_client_enums import ( ActionStatusEnum, diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_edge_order_management_client_enums.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_edge_order_management_client_enums.py index 57c1b4255d389..a0396ba89d13d 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_edge_order_management_client_enums.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_edge_order_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 ActionStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ActionStatusEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes whether the order item is deletable or not. """ @@ -35,13 +20,13 @@ class ActionStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Not Allowed flag. NOT_ALLOWED = "NotAllowed" -class ActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. """ INTERNAL = "Internal" -class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AddressType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of address. """ @@ -52,7 +37,7 @@ class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Commercial Address. COMMERCIAL = "Commercial" -class AvailabilityStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AvailabilityStage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Current availability stage of the product. Availability stage """ @@ -69,7 +54,7 @@ class AvailabilityStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Product is not available. UNAVAILABLE = "Unavailable" -class BillingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class BillingType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Represents billing type. """ @@ -78,7 +63,7 @@ class BillingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Purchase billing. PURCHASE = "Purchase" -class ChargingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ChargingType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Charging type. """ @@ -87,7 +72,7 @@ class ChargingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Per device charging type. PER_DEVICE = "PerDevice" -class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type of identity that created the resource. """ @@ -96,14 +81,14 @@ class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" -class DescriptionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DescriptionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of description. """ #: Base description. BASE = "Base" -class DisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DisabledReason(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Reason why the product is disabled. """ @@ -125,7 +110,7 @@ class DisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: The product is out of stock. OUT_OF_STOCK = "OutOfStock" -class DoubleEncryptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DoubleEncryptionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Double encryption status as entered by the customer. It is compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. """ @@ -135,7 +120,7 @@ class DoubleEncryptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) #: Double encryption is enabled. ENABLED = "Enabled" -class ImageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ImageType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of the image """ @@ -146,7 +131,7 @@ class ImageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Generic image. GENERIC_IMAGE = "GenericImage" -class LengthHeightUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class LengthHeightUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Unit for the dimensions of length, height and width. """ @@ -155,7 +140,7 @@ class LengthHeightUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Centimeter. CM = "CM" -class LinkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class LinkType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of link """ @@ -172,7 +157,7 @@ class LinkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Link to sign up for products. SIGN_UP = "SignUp" -class MeteringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MeteringType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Represents Metering type (eg one-time or recurrent) """ @@ -183,7 +168,7 @@ class MeteringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Adhoc billing. ADHOC = "Adhoc" -class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class NotificationStageName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage. """ @@ -192,7 +177,7 @@ class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) #: Notification at order item delivered to customer. DELIVERED = "Delivered" -class OrderItemCancellationEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OrderItemCancellationEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes whether the order item is cancellable or not. """ @@ -203,7 +188,7 @@ class OrderItemCancellationEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, En #: Order item not cancellable. NOT_CANCELLABLE = "NotCancellable" -class OrderItemReturnEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OrderItemReturnEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes whether the order item is returnable or not. """ @@ -214,7 +199,7 @@ class OrderItemReturnEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Order item not returnable. NOT_RETURNABLE = "NotReturnable" -class OrderItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OrderItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Order item type. """ @@ -223,7 +208,7 @@ class OrderItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Rental OrderItem. RENTAL = "Rental" -class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Origin(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" """ @@ -232,7 +217,7 @@ class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SYSTEM = "system" USER_SYSTEM = "user,system" -class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StageName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Stage name """ @@ -261,7 +246,7 @@ class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Order has been cancelled. CANCELLED = "Cancelled" -class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StageStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Stage status. """ @@ -278,7 +263,7 @@ class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Stage is cancelling. CANCELLING = "Cancelling" -class SupportedFilterTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SupportedFilterTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of product filter. """ @@ -287,7 +272,7 @@ class SupportedFilterTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Double encryption status. DOUBLE_ENCRYPTION_STATUS = "DoubleEncryptionStatus" -class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TransportShipmentTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Indicates Shipment Logistics type that the customer preferred. """ @@ -296,7 +281,7 @@ class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) #: Shipment Logistics is handled by Microsoft. MICROSOFT_MANAGED = "MicrosoftManaged" -class WeightMeasurementUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WeightMeasurementUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Unit for the dimensions of weight. """ diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models.py deleted file mode 100644 index 7b37e59993f2c..0000000000000 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models.py +++ /dev/null @@ -1,2971 +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 AddressDetails(msrest.serialization.Model): - """Address details for an order item. - - 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. - - :param forward_address: Required. Customer address and contact details. It should be address - resource. - :type forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties - :ivar return_address: Return shipping address. - :vartype return_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties - """ - - _validation = { - 'forward_address': {'required': True}, - 'return_address': {'readonly': True}, - } - - _attribute_map = { - 'forward_address': {'key': 'forwardAddress', 'type': 'AddressProperties'}, - 'return_address': {'key': 'returnAddress', 'type': 'AddressProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressDetails, self).__init__(**kwargs) - self.forward_address = kwargs['forward_address'] - self.return_address = None - - -class AddressProperties(msrest.serialization.Model): - """Address Properties. - - All required parameters must be populated in order to send to Azure. - - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails - """ - - _validation = { - 'contact_details': {'required': True}, - } - - _attribute_map = { - 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, - 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressProperties, self).__init__(**kwargs) - self.shipping_address = kwargs.get('shipping_address', None) - self.contact_details = kwargs['contact_details'] - - -class Resource(msrest.serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: 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'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - - 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: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs['location'] - - -class AddressResource(TrackedResource): - """Address Resource. - - 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: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SystemData - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'contact_details': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'ShippingAddress'}, - 'contact_details': {'key': 'properties.contactDetails', 'type': 'ContactDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressResource, self).__init__(**kwargs) - self.system_data = None - self.shipping_address = kwargs.get('shipping_address', None) - self.contact_details = kwargs['contact_details'] - - -class AddressResourceList(msrest.serialization.Model): - """Address Resource Collection. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of address resources. - :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] - :param next_link: Link for the next set of job resources. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[AddressResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressResourceList, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class AddressUpdateParameter(msrest.serialization.Model): - """The Address update parameters. - - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags - can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress - :param contact_details: Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'ShippingAddress'}, - 'contact_details': {'key': 'properties.contactDetails', 'type': 'ContactDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressUpdateParameter, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.shipping_address = kwargs.get('shipping_address', None) - self.contact_details = kwargs.get('contact_details', None) - - -class AvailabilityInformation(msrest.serialization.Model): - """Availability information of a product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar availability_stage: Current availability stage of the product. Availability stage. - Possible values include: "Available", "ComingSoon", "Preview", "Deprecated", "Signup", - "Unavailable". - :vartype availability_stage: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityStage - :ivar disabled_reason: Reason why the product is disabled. Possible values include: "None", - "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo", "NotAvailable", - "OutOfStock". - :vartype disabled_reason: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DisabledReason - :ivar disabled_reason_message: Message for why the product is disabled. - :vartype disabled_reason_message: str - """ - - _validation = { - 'availability_stage': {'readonly': True}, - 'disabled_reason': {'readonly': True}, - 'disabled_reason_message': {'readonly': True}, - } - - _attribute_map = { - 'availability_stage': {'key': 'availabilityStage', 'type': 'str'}, - 'disabled_reason': {'key': 'disabledReason', 'type': 'str'}, - 'disabled_reason_message': {'key': 'disabledReasonMessage', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailabilityInformation, self).__init__(**kwargs) - self.availability_stage = None - self.disabled_reason = None - self.disabled_reason_message = None - - -class BasicInformation(msrest.serialization.Model): - """Basic information for any product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - } - - def __init__( - self, - **kwargs - ): - super(BasicInformation, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - - -class BillingMeterDetails(msrest.serialization.Model): - """Holds billing meter details for each type of billing. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Represents Billing type name. - :vartype name: str - :ivar meter_details: Represents MeterDetails. - :vartype meter_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.MeterDetails - :ivar metering_type: Represents Metering type (eg one-time or recurrent). Possible values - include: "OneTime", "Recurring", "Adhoc". - :vartype metering_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.MeteringType - :ivar frequency: Frequency of recurrence. - :vartype frequency: str - """ - - _validation = { - 'name': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'metering_type': {'readonly': True}, - 'frequency': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'metering_type': {'key': 'meteringType', 'type': 'str'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BillingMeterDetails, self).__init__(**kwargs) - self.name = None - self.meter_details = None - self.metering_type = None - self.frequency = None - - -class CancellationReason(msrest.serialization.Model): - """Reason for cancellation. - - All required parameters must be populated in order to send to Azure. - - :param reason: Required. Reason for cancellation. - :type reason: str - """ - - _validation = { - 'reason': {'required': True}, - } - - _attribute_map = { - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CancellationReason, self).__init__(**kwargs) - self.reason = kwargs['reason'] - - -class CommonProperties(BasicInformation): - """Represents common properties across product hierarchy. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - } - - def __init__( - self, - **kwargs - ): - super(CommonProperties, self).__init__(**kwargs) - self.filterable_properties = None - - -class Configuration(msrest.serialization.Model): - """Configuration object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Specification] - :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Dimensions - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'specifications': {'readonly': True}, - 'dimensions': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'specifications': {'key': 'properties.specifications', 'type': '[Specification]'}, - 'dimensions': {'key': 'properties.dimensions', 'type': 'Dimensions'}, - } - - def __init__( - self, - **kwargs - ): - super(Configuration, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.specifications = None - self.dimensions = None - - -class ConfigurationFilters(msrest.serialization.Model): - """Configuration filters. - - All required parameters must be populated in order to send to Azure. - - :param hierarchy_information: Required. Product hierarchy information. - :type hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :param filterable_property: Filters specific to product. - :type filterable_property: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - """ - - _validation = { - 'hierarchy_information': {'required': True}, - } - - _attribute_map = { - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_property': {'key': 'filterableProperty', 'type': '[FilterableProperty]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfigurationFilters, self).__init__(**kwargs) - self.hierarchy_information = kwargs['hierarchy_information'] - self.filterable_property = kwargs.get('filterable_property', None) - - -class ConfigurationProperties(CommonProperties): - """Properties of configuration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Specification] - :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Dimensions - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'specifications': {'readonly': True}, - 'dimensions': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'specifications': {'key': 'specifications', 'type': '[Specification]'}, - 'dimensions': {'key': 'dimensions', 'type': 'Dimensions'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfigurationProperties, self).__init__(**kwargs) - self.specifications = None - self.dimensions = None - - -class Configurations(msrest.serialization.Model): - """The list of configurations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of configurations. - :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configuration] - :param next_link: Link for the next set of configurations. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Configuration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Configurations, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class ConfigurationsRequest(msrest.serialization.Model): - """Configuration request object. - - All required parameters must be populated in order to send to Azure. - - :param configuration_filters: Required. Holds details about product hierarchy information and - filterable property. - :type configuration_filters: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationFilters] - :param customer_subscription_details: Customer subscription properties. Clients can display - available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionDetails - """ - - _validation = { - 'configuration_filters': {'required': True, 'unique': True}, - } - - _attribute_map = { - 'configuration_filters': {'key': 'configurationFilters', 'type': '[ConfigurationFilters]'}, - 'customer_subscription_details': {'key': 'customerSubscriptionDetails', 'type': 'CustomerSubscriptionDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfigurationsRequest, self).__init__(**kwargs) - self.configuration_filters = kwargs['configuration_filters'] - self.customer_subscription_details = kwargs.get('customer_subscription_details', None) - - -class ContactDetails(msrest.serialization.Model): - """Contact Details. - - All required parameters must be populated in order to send to Azure. - - :param contact_name: Required. Contact name of the person. - :type contact_name: str - :param phone: Required. Phone number of the contact person. - :type phone: str - :param phone_extension: Phone extension number of the contact person. - :type phone_extension: str - :param mobile: Mobile number of the contact person. - :type mobile: str - :param email_list: Required. List of Email-ids to be notified about job progress. - :type email_list: list[str] - """ - - _validation = { - 'contact_name': {'required': True}, - 'phone': {'required': True}, - 'email_list': {'required': True}, - } - - _attribute_map = { - 'contact_name': {'key': 'contactName', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, - 'mobile': {'key': 'mobile', 'type': 'str'}, - 'email_list': {'key': 'emailList', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ContactDetails, self).__init__(**kwargs) - self.contact_name = kwargs['contact_name'] - self.phone = kwargs['phone'] - self.phone_extension = kwargs.get('phone_extension', None) - self.mobile = kwargs.get('mobile', None) - self.email_list = kwargs['email_list'] - - -class CostInformation(msrest.serialization.Model): - """Cost information for the product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar billing_meter_details: Details on the various billing aspects for the product system. - :vartype billing_meter_details: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingMeterDetails] - :ivar billing_info_url: Default url to display billing information. - :vartype billing_info_url: str - """ - - _validation = { - 'billing_meter_details': {'readonly': True}, - 'billing_info_url': {'readonly': True}, - } - - _attribute_map = { - 'billing_meter_details': {'key': 'billingMeterDetails', 'type': '[BillingMeterDetails]'}, - 'billing_info_url': {'key': 'billingInfoUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CostInformation, self).__init__(**kwargs) - self.billing_meter_details = None - self.billing_info_url = None - - -class CustomerSubscriptionDetails(msrest.serialization.Model): - """Holds Customer subscription details. Clients can display available products to unregistered customers by explicitly passing subscription details. - - All required parameters must be populated in order to send to Azure. - - :param registered_features: List of registered feature flags for subscription. - :type registered_features: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionRegisteredFeatures] - :param location_placement_id: Location placement Id of a subscription. - :type location_placement_id: str - :param quota_id: Required. Quota ID of a subscription. - :type quota_id: str - """ - - _validation = { - 'quota_id': {'required': True}, - } - - _attribute_map = { - 'registered_features': {'key': 'registeredFeatures', 'type': '[CustomerSubscriptionRegisteredFeatures]'}, - 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, - 'quota_id': {'key': 'quotaId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CustomerSubscriptionDetails, self).__init__(**kwargs) - self.registered_features = kwargs.get('registered_features', None) - self.location_placement_id = kwargs.get('location_placement_id', None) - self.quota_id = kwargs['quota_id'] - - -class CustomerSubscriptionRegisteredFeatures(msrest.serialization.Model): - """Represents subscription registered features. - - :param name: Name of subscription registered feature. - :type name: str - :param state: State of subscription registered feature. - :type state: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CustomerSubscriptionRegisteredFeatures, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) - - -class Description(msrest.serialization.Model): - """Description related properties of a product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description_type: Type of description. Possible values include: "Base". - :vartype description_type: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DescriptionType - :ivar short_description: Short description of the product system. - :vartype short_description: str - :ivar long_description: Long description of the product system. - :vartype long_description: str - :ivar keywords: Keywords for the product system. - :vartype keywords: list[str] - :ivar attributes: Attributes for the product system. - :vartype attributes: list[str] - :ivar links: Links for the product system. - :vartype links: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Link] - """ - - _validation = { - 'description_type': {'readonly': True}, - 'short_description': {'readonly': True}, - 'long_description': {'readonly': True}, - 'keywords': {'readonly': True}, - 'attributes': {'readonly': True}, - 'links': {'readonly': True}, - } - - _attribute_map = { - 'description_type': {'key': 'descriptionType', 'type': 'str'}, - 'short_description': {'key': 'shortDescription', 'type': 'str'}, - 'long_description': {'key': 'longDescription', 'type': 'str'}, - 'keywords': {'key': 'keywords', 'type': '[str]'}, - 'attributes': {'key': 'attributes', 'type': '[str]'}, - 'links': {'key': 'links', 'type': '[Link]'}, - } - - def __init__( - self, - **kwargs - ): - super(Description, self).__init__(**kwargs) - self.description_type = None - self.short_description = None - self.long_description = None - self.keywords = None - self.attributes = None - self.links = None - - -class DeviceDetails(msrest.serialization.Model): - """Device details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar serial_number: device serial number. - :vartype serial_number: str - :ivar management_resource_id: Management Resource Id. - :vartype management_resource_id: str - :ivar management_resource_tenant_id: Management Resource Tenant ID. - :vartype management_resource_tenant_id: str - """ - - _validation = { - 'serial_number': {'readonly': True}, - 'management_resource_id': {'readonly': True}, - 'management_resource_tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'serial_number': {'key': 'serialNumber', 'type': 'str'}, - 'management_resource_id': {'key': 'managementResourceId', 'type': 'str'}, - 'management_resource_tenant_id': {'key': 'managementResourceTenantId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DeviceDetails, self).__init__(**kwargs) - self.serial_number = None - self.management_resource_id = None - self.management_resource_tenant_id = None - - -class Dimensions(msrest.serialization.Model): - """Dimensions of a configuration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar length: Length of the device. - :vartype length: float - :ivar height: Height of the device. - :vartype height: float - :ivar width: Width of the device. - :vartype width: float - :ivar length_height_unit: Unit for the dimensions of length, height and width. Possible values - include: "IN", "CM". - :vartype length_height_unit: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.LengthHeightUnit - :ivar weight: Weight of the device. - :vartype weight: float - :ivar depth: Depth of the device. - :vartype depth: float - :ivar weight_unit: Unit for the dimensions of weight. Possible values include: "LBS", "KGS". - :vartype weight_unit: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.WeightMeasurementUnit - """ - - _validation = { - 'length': {'readonly': True}, - 'height': {'readonly': True}, - 'width': {'readonly': True}, - 'length_height_unit': {'readonly': True}, - 'weight': {'readonly': True}, - 'depth': {'readonly': True}, - 'weight_unit': {'readonly': True}, - } - - _attribute_map = { - 'length': {'key': 'length', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, - 'width': {'key': 'width', 'type': 'float'}, - 'length_height_unit': {'key': 'lengthHeightUnit', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'float'}, - 'depth': {'key': 'depth', 'type': 'float'}, - 'weight_unit': {'key': 'weightUnit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Dimensions, self).__init__(**kwargs) - self.length = None - self.height = None - self.width = None - self.length_height_unit = None - self.weight = None - self.depth = None - self.weight_unit = None - - -class DisplayInfo(msrest.serialization.Model): - """Describes product display information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar product_family_display_name: Product family display name. - :vartype product_family_display_name: str - :ivar configuration_display_name: Configuration display name. - :vartype configuration_display_name: str - """ - - _validation = { - 'product_family_display_name': {'readonly': True}, - 'configuration_display_name': {'readonly': True}, - } - - _attribute_map = { - 'product_family_display_name': {'key': 'productFamilyDisplayName', 'type': 'str'}, - 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DisplayInfo, self).__init__(**kwargs) - self.product_family_display_name = None - self.configuration_display_name = None - - -class EncryptionPreferences(msrest.serialization.Model): - """Preferences related to the double encryption. - - :param double_encryption_status: Double encryption status as entered by the customer. It is - compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. Possible - values include: "Disabled", "Enabled". - :type double_encryption_status: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DoubleEncryptionStatus - """ - - _attribute_map = { - 'double_encryption_status': {'key': 'doubleEncryptionStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EncryptionPreferences, self).__init__(**kwargs) - self.double_encryption_status = kwargs.get('double_encryption_status', None) - - -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: any - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorDetail(msrest.serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - - :param error: The error object. - :type error: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ErrorDetail - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class FilterableProperty(msrest.serialization.Model): - """Different types of filters supported and its values. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Type of product filter. Possible values include: "ShipToCountries", - "DoubleEncryptionStatus". - :type type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SupportedFilterTypes - :param supported_values: Required. Values to be filtered. - :type supported_values: list[str] - """ - - _validation = { - 'type': {'required': True}, - 'supported_values': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'supported_values': {'key': 'supportedValues', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(FilterableProperty, self).__init__(**kwargs) - self.type = kwargs['type'] - self.supported_values = kwargs['supported_values'] - - -class ForwardShippingDetails(msrest.serialization.Model): - """Forward shipment details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar carrier_name: Name of the carrier. - :vartype carrier_name: str - :ivar carrier_display_name: Carrier Name for display purpose. Not to be used for any - processing. - :vartype carrier_display_name: str - :ivar tracking_id: TrackingId of the package. - :vartype tracking_id: str - :ivar tracking_url: TrackingUrl of the package. - :vartype tracking_url: str - """ - - _validation = { - 'carrier_name': {'readonly': True}, - 'carrier_display_name': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'tracking_url': {'readonly': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_display_name': {'key': 'carrierDisplayName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ForwardShippingDetails, self).__init__(**kwargs) - self.carrier_name = None - self.carrier_display_name = None - self.tracking_id = None - self.tracking_url = None - - -class HierarchyInformation(msrest.serialization.Model): - """Holds details about product hierarchy information. - - :param product_family_name: Represents product family name that uniquely identifies product - family. - :type product_family_name: str - :param product_line_name: Represents product line name that uniquely identifies product line. - :type product_line_name: str - :param product_name: Represents product name that uniquely identifies product. - :type product_name: str - :param configuration_name: Represents configuration name that uniquely identifies - configuration. - :type configuration_name: str - """ - - _attribute_map = { - 'product_family_name': {'key': 'productFamilyName', 'type': 'str'}, - 'product_line_name': {'key': 'productLineName', 'type': 'str'}, - 'product_name': {'key': 'productName', 'type': 'str'}, - 'configuration_name': {'key': 'configurationName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HierarchyInformation, self).__init__(**kwargs) - self.product_family_name = kwargs.get('product_family_name', None) - self.product_line_name = kwargs.get('product_line_name', None) - self.product_name = kwargs.get('product_name', None) - self.configuration_name = kwargs.get('configuration_name', None) - - -class ImageInformation(msrest.serialization.Model): - """Image for the product. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar image_type: Type of the image. Possible values include: "MainImage", "BulletImage", - "GenericImage". - :vartype image_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageType - :ivar image_url: Url of the image. - :vartype image_url: str - """ - - _validation = { - 'image_type': {'readonly': True}, - 'image_url': {'readonly': True}, - } - - _attribute_map = { - 'image_type': {'key': 'imageType', 'type': 'str'}, - 'image_url': {'key': 'imageUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ImageInformation, self).__init__(**kwargs) - self.image_type = None - self.image_url = None - - -class Link(msrest.serialization.Model): - """Returns link related to the product. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar link_type: Type of link. Possible values include: "Generic", "TermsAndConditions", - "Specification", "Documentation", "KnowMore", "SignUp". - :vartype link_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.LinkType - :ivar link_url: Url of the link. - :vartype link_url: str - """ - - _validation = { - 'link_type': {'readonly': True}, - 'link_url': {'readonly': True}, - } - - _attribute_map = { - 'link_type': {'key': 'linkType', 'type': 'str'}, - 'link_url': {'key': 'linkUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Link, self).__init__(**kwargs) - self.link_type = None - self.link_url = None - - -class ManagementResourcePreferences(msrest.serialization.Model): - """Management resource preference to link device. - - :param preferred_management_resource_id: Customer preferred Management resource ARM ID. - :type preferred_management_resource_id: str - """ - - _attribute_map = { - 'preferred_management_resource_id': {'key': 'preferredManagementResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ManagementResourcePreferences, self).__init__(**kwargs) - self.preferred_management_resource_id = kwargs.get('preferred_management_resource_id', None) - - -class MeterDetails(msrest.serialization.Model): - """Holds details about billing type and its meter guids. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Pav2MeterDetails, PurchaseMeterDetails. - - 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. - - :param billing_type: Required. Represents billing type.Constant filled by server. Possible - values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType - :ivar multiplier: Billing unit applicable for Pav2 billing. - :vartype multiplier: float - :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". - :vartype charging_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ChargingType - """ - - _validation = { - 'billing_type': {'required': True}, - 'multiplier': {'readonly': True}, - 'charging_type': {'readonly': True}, - } - - _attribute_map = { - 'billing_type': {'key': 'billingType', 'type': 'str'}, - 'multiplier': {'key': 'multiplier', 'type': 'float'}, - 'charging_type': {'key': 'chargingType', 'type': 'str'}, - } - - _subtype_map = { - 'billing_type': {'Pav2': 'Pav2MeterDetails', 'Purchase': 'PurchaseMeterDetails'} - } - - def __init__( - self, - **kwargs - ): - super(MeterDetails, self).__init__(**kwargs) - self.billing_type = None # type: Optional[str] - self.multiplier = None - self.charging_type = None - - -class NotificationPreference(msrest.serialization.Model): - """Notification preference for a job stage. - - All required parameters must be populated in order to send to Azure. - - :param stage_name: Required. Name of the stage. Possible values include: "Shipped", - "Delivered". - :type stage_name: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.NotificationStageName - :param send_notification: Required. Notification is required or not. - :type send_notification: bool - """ - - _validation = { - 'stage_name': {'required': True}, - 'send_notification': {'required': True}, - } - - _attribute_map = { - 'stage_name': {'key': 'stageName', 'type': 'str'}, - 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(NotificationPreference, self).__init__(**kwargs) - self.stage_name = kwargs['stage_name'] - self.send_notification = kwargs['send_notification'] - - -class Operation(msrest.serialization.Model): - """Details of a REST API operation, returned from the Resource Provider Operations API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for - data-plane operations and "false" for ARM/control-plane operations. - :vartype is_data_action: bool - :param display: Localized display information for this particular operation. - :type display: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationDisplay - :ivar origin: The intended executor of the operation; as in Resource Based Access Control - (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", - "system", "user,system". - :vartype origin: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Origin - :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for - internal only APIs. Possible values include: "Internal". - :vartype action_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ActionType - """ - - _validation = { - 'name': {'readonly': True}, - 'is_data_action': {'readonly': True}, - 'origin': {'readonly': True}, - 'action_type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = None - self.is_data_action = None - self.display = kwargs.get('display', None) - self.origin = None - self.action_type = None - - -class OperationDisplay(msrest.serialization.Model): - """Localized display information for this particular operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft - Monitoring Insights" or "Microsoft Compute". - :vartype provider: str - :ivar resource: The localized friendly name of the resource type related to this operation. - E.g. "Virtual Machines" or "Job Schedule Collections". - :vartype resource: str - :ivar operation: The concise, localized friendly name for the operation; suitable for - dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - :vartype operation: str - :ivar description: The short, localized friendly description of the operation; suitable for - tool tips and detailed views. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _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 = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(msrest.serialization.Model): - """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of operations supported by the resource provider. - :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Operation] - :ivar next_link: URL to get the next set of operation list results (if there are any). - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationListResult, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class OrderItemDetails(msrest.serialization.Model): - """Order item details. - - 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. - - :param product_details: Required. Unique identifier for configuration. - :type product_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductDetails - :param order_item_type: Required. Order item type. Possible values include: "Purchase", - "Rental". - :type order_item_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemType - :ivar current_stage: Current Order item Status. - :vartype current_stage: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageDetails - :ivar order_item_stage_history: Order item status history. - :vartype order_item_stage_history: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageDetails] - :param preferences: Customer notification Preferences. - :type preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences - :ivar forward_shipping_details: Forward Package Shipping details. - :vartype forward_shipping_details: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ForwardShippingDetails - :ivar reverse_shipping_details: Reverse Package Shipping details. - :vartype reverse_shipping_details: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReverseShippingDetails - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] - :ivar cancellation_reason: Cancellation reason. - :vartype cancellation_reason: str - :ivar cancellation_status: Describes whether the order item is cancellable or not. Possible - values include: "Cancellable", "CancellableWithFee", "NotCancellable". - :vartype cancellation_status: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemCancellationEnum - :ivar deletion_status: Describes whether the order item is deletable or not. Possible values - include: "Allowed", "NotAllowed". - :vartype deletion_status: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ActionStatusEnum - :ivar return_reason: Return reason. - :vartype return_reason: str - :ivar return_status: Describes whether the order item is returnable or not. Possible values - include: "Returnable", "ReturnableWithFee", "NotReturnable". - :vartype return_status: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemReturnEnum - :ivar management_rp_details: Parent RP details - this returns only the first or default parent - RP from the entire list. - :vartype management_rp_details: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails - :ivar management_rp_details_list: List of parent RP details supported for configuration. - :vartype management_rp_details_list: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] - :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ErrorDetail - """ - - _validation = { - 'product_details': {'required': True}, - 'order_item_type': {'required': True}, - 'current_stage': {'readonly': True}, - 'order_item_stage_history': {'readonly': True}, - 'forward_shipping_details': {'readonly': True}, - 'reverse_shipping_details': {'readonly': True}, - 'cancellation_reason': {'readonly': True}, - 'cancellation_status': {'readonly': True}, - 'deletion_status': {'readonly': True}, - 'return_reason': {'readonly': True}, - 'return_status': {'readonly': True}, - 'management_rp_details': {'readonly': True}, - 'management_rp_details_list': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'product_details': {'key': 'productDetails', 'type': 'ProductDetails'}, - 'order_item_type': {'key': 'orderItemType', 'type': 'str'}, - 'current_stage': {'key': 'currentStage', 'type': 'StageDetails'}, - 'order_item_stage_history': {'key': 'orderItemStageHistory', 'type': '[StageDetails]'}, - 'preferences': {'key': 'preferences', 'type': 'Preferences'}, - 'forward_shipping_details': {'key': 'forwardShippingDetails', 'type': 'ForwardShippingDetails'}, - 'reverse_shipping_details': {'key': 'reverseShippingDetails', 'type': 'ReverseShippingDetails'}, - 'notification_email_list': {'key': 'notificationEmailList', 'type': '[str]'}, - 'cancellation_reason': {'key': 'cancellationReason', 'type': 'str'}, - 'cancellation_status': {'key': 'cancellationStatus', 'type': 'str'}, - 'deletion_status': {'key': 'deletionStatus', 'type': 'str'}, - 'return_reason': {'key': 'returnReason', 'type': 'str'}, - 'return_status': {'key': 'returnStatus', 'type': 'str'}, - 'management_rp_details': {'key': 'managementRpDetails', 'type': 'ResourceProviderDetails'}, - 'management_rp_details_list': {'key': 'managementRpDetailsList', 'type': '[ResourceProviderDetails]'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemDetails, self).__init__(**kwargs) - self.product_details = kwargs['product_details'] - self.order_item_type = kwargs['order_item_type'] - self.current_stage = None - self.order_item_stage_history = None - self.preferences = kwargs.get('preferences', None) - self.forward_shipping_details = None - self.reverse_shipping_details = None - self.notification_email_list = kwargs.get('notification_email_list', None) - self.cancellation_reason = None - self.cancellation_status = None - self.deletion_status = None - self.return_reason = None - self.return_status = None - self.management_rp_details = None - self.management_rp_details_list = None - self.error = None - - -class OrderItemResource(TrackedResource): - """Represents order item contract. - - 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: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SystemData - :param order_item_details: Required. Represents order item details. - :type order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemDetails - :param address_details: Required. Represents shipping and return address for order item. - :type address_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressDetails - :ivar start_time: Start time of order item. - :vartype start_time: ~datetime.datetime - :param order_id: Required. Id of the order to which order item belongs to. - :type order_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'order_item_details': {'required': True}, - 'address_details': {'required': True}, - 'start_time': {'readonly': True}, - 'order_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'order_item_details': {'key': 'properties.orderItemDetails', 'type': 'OrderItemDetails'}, - 'address_details': {'key': 'properties.addressDetails', 'type': 'AddressDetails'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'order_id': {'key': 'properties.orderId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemResource, self).__init__(**kwargs) - self.system_data = None - self.order_item_details = kwargs['order_item_details'] - self.address_details = kwargs['address_details'] - self.start_time = None - self.order_id = kwargs['order_id'] - - -class OrderItemResourceList(msrest.serialization.Model): - """List of orderItems. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of order item resources. - :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] - :param next_link: Link for the next set of order item resources. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[OrderItemResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemResourceList, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class OrderItemUpdateParameter(msrest.serialization.Model): - """Updates order item parameters. - - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags - can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param forward_address: Updates forward shipping address and contact details. - :type forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties - :param preferences: Customer preference. - :type preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'forward_address': {'key': 'properties.forwardAddress', 'type': 'AddressProperties'}, - 'preferences': {'key': 'properties.preferences', 'type': 'Preferences'}, - 'notification_email_list': {'key': 'properties.notificationEmailList', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemUpdateParameter, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.forward_address = kwargs.get('forward_address', None) - self.preferences = kwargs.get('preferences', None) - self.notification_email_list = kwargs.get('notification_email_list', None) - - -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: 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'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - -class OrderResource(ProxyResource): - """Specifies the properties or parameters for an order. Order is a grouping of one or more order items. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SystemData - :ivar order_item_ids: List of order item ARM Ids which are part of an order. - :vartype order_item_ids: list[str] - :ivar current_stage: Order current status. - :vartype current_stage: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageDetails - :ivar order_stage_history: Order status history. - :vartype order_stage_history: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageDetails] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'order_item_ids': {'readonly': True}, - 'current_stage': {'readonly': True}, - 'order_stage_history': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'order_item_ids': {'key': 'properties.orderItemIds', 'type': '[str]'}, - 'current_stage': {'key': 'properties.currentStage', 'type': 'StageDetails'}, - 'order_stage_history': {'key': 'properties.orderStageHistory', 'type': '[StageDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderResource, self).__init__(**kwargs) - self.system_data = None - self.order_item_ids = None - self.current_stage = None - self.order_stage_history = None - - -class OrderResourceList(msrest.serialization.Model): - """List of orders. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of order resources. - :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResource] - :param next_link: Link for the next set of order resources. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[OrderResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderResourceList, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class Pav2MeterDetails(MeterDetails): - """Billing type PAV2 meter details. - - 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. - - :param billing_type: Required. Represents billing type.Constant filled by server. Possible - values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType - :ivar multiplier: Billing unit applicable for Pav2 billing. - :vartype multiplier: float - :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". - :vartype charging_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ChargingType - :ivar meter_guid: Validation status of requested data center and transport. - :vartype meter_guid: str - """ - - _validation = { - 'billing_type': {'required': True}, - 'multiplier': {'readonly': True}, - 'charging_type': {'readonly': True}, - 'meter_guid': {'readonly': True}, - } - - _attribute_map = { - 'billing_type': {'key': 'billingType', 'type': 'str'}, - 'multiplier': {'key': 'multiplier', 'type': 'float'}, - 'charging_type': {'key': 'chargingType', 'type': 'str'}, - 'meter_guid': {'key': 'meterGuid', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Pav2MeterDetails, self).__init__(**kwargs) - self.billing_type = 'Pav2' # type: str - self.meter_guid = None - - -class Preferences(msrest.serialization.Model): - """Preferences related to the order. - - :param notification_preferences: Notification preferences. - :type notification_preferences: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.NotificationPreference] - :param transport_preferences: Preferences related to the shipment logistics of the order. - :type transport_preferences: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.TransportPreferences - :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.EncryptionPreferences - :param management_resource_preferences: Preferences related to the Management resource. - :type management_resource_preferences: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ManagementResourcePreferences - """ - - _attribute_map = { - 'notification_preferences': {'key': 'notificationPreferences', 'type': '[NotificationPreference]'}, - 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, - 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, - 'management_resource_preferences': {'key': 'managementResourcePreferences', 'type': 'ManagementResourcePreferences'}, - } - - def __init__( - self, - **kwargs - ): - super(Preferences, self).__init__(**kwargs) - self.notification_preferences = kwargs.get('notification_preferences', None) - self.transport_preferences = kwargs.get('transport_preferences', None) - self.encryption_preferences = kwargs.get('encryption_preferences', None) - self.management_resource_preferences = kwargs.get('management_resource_preferences', None) - - -class Product(msrest.serialization.Model): - """List of Products. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar configurations: List of configurations for the product. - :vartype configurations: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configuration] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'configurations': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'configurations': {'key': 'properties.configurations', 'type': '[Configuration]'}, - } - - def __init__( - self, - **kwargs - ): - super(Product, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.configurations = None - - -class ProductDetails(msrest.serialization.Model): - """Represents product details. - - 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. - - :param display_info: Display details of the product. - :type display_info: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DisplayInfo - :param hierarchy_information: Required. Hierarchy of the product which uniquely identifies the - product. - :type hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar count: Quantity of the product. - :vartype count: int - :ivar product_double_encryption_status: Double encryption status of the configuration. - Read-only field. Possible values include: "Disabled", "Enabled". - :vartype product_double_encryption_status: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DoubleEncryptionStatus - :ivar device_details: list of device details. - :vartype device_details: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.DeviceDetails] - """ - - _validation = { - 'hierarchy_information': {'required': True}, - 'count': {'readonly': True}, - 'product_double_encryption_status': {'readonly': True}, - 'device_details': {'readonly': True}, - } - - _attribute_map = { - 'display_info': {'key': 'displayInfo', 'type': 'DisplayInfo'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'count': {'key': 'count', 'type': 'int'}, - 'product_double_encryption_status': {'key': 'productDoubleEncryptionStatus', 'type': 'str'}, - 'device_details': {'key': 'deviceDetails', 'type': '[DeviceDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductDetails, self).__init__(**kwargs) - self.display_info = kwargs.get('display_info', None) - self.hierarchy_information = kwargs['hierarchy_information'] - self.count = None - self.product_double_encryption_status = None - self.device_details = None - - -class ProductFamilies(msrest.serialization.Model): - """The list of product families. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of product families. - :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamily] - :param next_link: Link for the next set of product families. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ProductFamily]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamilies, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class ProductFamiliesMetadata(msrest.serialization.Model): - """Holds details about product family metadata. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of product family metadata details. - :vartype value: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadataDetails] - :ivar next_link: Link for the next set of product families. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ProductFamiliesMetadataDetails]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamiliesMetadata, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ProductFamiliesMetadataDetails(msrest.serialization.Model): - """Product families metadata details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar product_lines: List of product lines supported in the product family. - :vartype product_lines: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'product_lines': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'product_lines': {'key': 'properties.productLines', 'type': '[ProductLine]'}, - 'resource_provider_details': {'key': 'properties.resourceProviderDetails', 'type': '[ResourceProviderDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamiliesMetadataDetails, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.product_lines = None - self.resource_provider_details = kwargs.get('resource_provider_details', None) - - -class ProductFamiliesRequest(msrest.serialization.Model): - """The filters for showing the product families. - - All required parameters must be populated in order to send to Azure. - - :param filterable_properties: Required. Dictionary of filterable properties on product family. - :type filterable_properties: dict[str, - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty]] - :param customer_subscription_details: Customer subscription properties. Clients can display - available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionDetails - """ - - _validation = { - 'filterable_properties': {'required': True}, - } - - _attribute_map = { - 'filterable_properties': {'key': 'filterableProperties', 'type': '{[FilterableProperty]}'}, - 'customer_subscription_details': {'key': 'customerSubscriptionDetails', 'type': 'CustomerSubscriptionDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamiliesRequest, self).__init__(**kwargs) - self.filterable_properties = kwargs['filterable_properties'] - self.customer_subscription_details = kwargs.get('customer_subscription_details', None) - - -class ProductFamily(msrest.serialization.Model): - """Product Family. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar product_lines: List of product lines supported in the product family. - :vartype product_lines: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'product_lines': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'product_lines': {'key': 'properties.productLines', 'type': '[ProductLine]'}, - 'resource_provider_details': {'key': 'properties.resourceProviderDetails', 'type': '[ResourceProviderDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamily, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.product_lines = None - self.resource_provider_details = kwargs.get('resource_provider_details', None) - - -class ProductFamilyProperties(CommonProperties): - """Properties of product family. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar product_lines: List of product lines supported in the product family. - :vartype product_lines: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'product_lines': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'product_lines': {'key': 'productLines', 'type': '[ProductLine]'}, - 'resource_provider_details': {'key': 'resourceProviderDetails', 'type': '[ResourceProviderDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamilyProperties, self).__init__(**kwargs) - self.product_lines = None - self.resource_provider_details = kwargs.get('resource_provider_details', None) - - -class ProductLine(msrest.serialization.Model): - """Product line. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar products: List of products in the product line. - :vartype products: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Product] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'products': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'products': {'key': 'properties.products', 'type': '[Product]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductLine, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.products = None - - -class ProductLineProperties(CommonProperties): - """Properties of product line. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar products: List of products in the product line. - :vartype products: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Product] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'products': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'products': {'key': 'products', 'type': '[Product]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductLineProperties, self).__init__(**kwargs) - self.products = None - - -class ProductProperties(CommonProperties): - """Properties of products. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] - :ivar configurations: List of configurations for the product. - :vartype configurations: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configuration] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'configurations': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'configurations': {'key': 'configurations', 'type': '[Configuration]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductProperties, self).__init__(**kwargs) - self.configurations = None - - -class PurchaseMeterDetails(MeterDetails): - """Billing type Purchase meter details. - - 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. - - :param billing_type: Required. Represents billing type.Constant filled by server. Possible - values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType - :ivar multiplier: Billing unit applicable for Pav2 billing. - :vartype multiplier: float - :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". - :vartype charging_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ChargingType - :ivar product_id: Product Id. - :vartype product_id: str - :ivar sku_id: Sku Id. - :vartype sku_id: str - :ivar term_id: Term Id. - :vartype term_id: str - """ - - _validation = { - 'billing_type': {'required': True}, - 'multiplier': {'readonly': True}, - 'charging_type': {'readonly': True}, - 'product_id': {'readonly': True}, - 'sku_id': {'readonly': True}, - 'term_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_type': {'key': 'billingType', 'type': 'str'}, - 'multiplier': {'key': 'multiplier', 'type': 'float'}, - 'charging_type': {'key': 'chargingType', 'type': 'str'}, - 'product_id': {'key': 'productId', 'type': 'str'}, - 'sku_id': {'key': 'skuId', 'type': 'str'}, - 'term_id': {'key': 'termId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PurchaseMeterDetails, self).__init__(**kwargs) - self.billing_type = 'Purchase' # type: str - self.product_id = None - self.sku_id = None - self.term_id = None - - -class ResourceIdentity(msrest.serialization.Model): - """Msi identity details of the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param type: Identity type. - :type type: str - :ivar principal_id: Service Principal Id backing the Msi. - :vartype principal_id: str - :ivar tenant_id: Home Tenant Id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = None - self.tenant_id = None - - -class ResourceProviderDetails(msrest.serialization.Model): - """Management RP details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar resource_provider_namespace: Resource provider namespace. - :vartype resource_provider_namespace: str - """ - - _validation = { - 'resource_provider_namespace': {'readonly': True}, - } - - _attribute_map = { - 'resource_provider_namespace': {'key': 'resourceProviderNamespace', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceProviderDetails, self).__init__(**kwargs) - self.resource_provider_namespace = None - - -class ReturnOrderItemDetails(msrest.serialization.Model): - """Return order item request body. - - All required parameters must be populated in order to send to Azure. - - :param return_address: customer return address. - :type return_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties - :param return_reason: Required. Return Reason. - :type return_reason: str - :param service_tag: Service tag (located on the bottom-right corner of the device). - :type service_tag: str - :param shipping_box_required: Shipping Box required. - :type shipping_box_required: bool - """ - - _validation = { - 'return_reason': {'required': True}, - } - - _attribute_map = { - 'return_address': {'key': 'returnAddress', 'type': 'AddressProperties'}, - 'return_reason': {'key': 'returnReason', 'type': 'str'}, - 'service_tag': {'key': 'serviceTag', 'type': 'str'}, - 'shipping_box_required': {'key': 'shippingBoxRequired', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(ReturnOrderItemDetails, self).__init__(**kwargs) - self.return_address = kwargs.get('return_address', None) - self.return_reason = kwargs['return_reason'] - self.service_tag = kwargs.get('service_tag', None) - self.shipping_box_required = kwargs.get('shipping_box_required', False) - - -class ReverseShippingDetails(msrest.serialization.Model): - """Reverse shipment details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar sas_key_for_label: SAS key to download the reverse shipment label of the package. - :vartype sas_key_for_label: str - :ivar carrier_name: Name of the carrier. - :vartype carrier_name: str - :ivar carrier_display_name: Carrier Name for display purpose. Not to be used for any - processing. - :vartype carrier_display_name: str - :ivar tracking_id: TrackingId of the package. - :vartype tracking_id: str - :ivar tracking_url: TrackingUrl of the package. - :vartype tracking_url: str - """ - - _validation = { - 'sas_key_for_label': {'readonly': True}, - 'carrier_name': {'readonly': True}, - 'carrier_display_name': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'tracking_url': {'readonly': True}, - } - - _attribute_map = { - 'sas_key_for_label': {'key': 'sasKeyForLabel', 'type': 'str'}, - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_display_name': {'key': 'carrierDisplayName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ReverseShippingDetails, self).__init__(**kwargs) - self.sas_key_for_label = None - self.carrier_name = None - self.carrier_display_name = None - self.tracking_id = None - self.tracking_url = None - - -class ShippingAddress(msrest.serialization.Model): - """Shipping address where customer wishes to receive the device. - - All required parameters must be populated in order to send to Azure. - - :param street_address1: Required. Street Address line 1. - :type street_address1: str - :param street_address2: Street Address line 2. - :type street_address2: str - :param street_address3: Street Address line 3. - :type street_address3: str - :param city: Name of the City. - :type city: str - :param state_or_province: Name of the State or Province. - :type state_or_province: str - :param country: Required. Name of the Country. - :type country: str - :param postal_code: Postal code. - :type postal_code: str - :param zip_extended_code: Extended Zip Code. - :type zip_extended_code: str - :param company_name: Name of the company. - :type company_name: str - :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressType - """ - - _validation = { - 'street_address1': {'required': True}, - 'country': {'required': True}, - } - - _attribute_map = { - 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, - 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, - 'company_name': {'key': 'companyName', 'type': 'str'}, - 'address_type': {'key': 'addressType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ShippingAddress, self).__init__(**kwargs) - self.street_address1 = kwargs['street_address1'] - self.street_address2 = kwargs.get('street_address2', None) - self.street_address3 = kwargs.get('street_address3', None) - self.city = kwargs.get('city', None) - self.state_or_province = kwargs.get('state_or_province', None) - self.country = kwargs['country'] - self.postal_code = kwargs.get('postal_code', None) - self.zip_extended_code = kwargs.get('zip_extended_code', None) - self.company_name = kwargs.get('company_name', None) - self.address_type = kwargs.get('address_type', None) - - -class ShippingDetails(msrest.serialization.Model): - """Package shipping details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar carrier_name: Name of the carrier. - :vartype carrier_name: str - :ivar carrier_display_name: Carrier Name for display purpose. Not to be used for any - processing. - :vartype carrier_display_name: str - :ivar tracking_id: TrackingId of the package. - :vartype tracking_id: str - :ivar tracking_url: TrackingUrl of the package. - :vartype tracking_url: str - """ - - _validation = { - 'carrier_name': {'readonly': True}, - 'carrier_display_name': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'tracking_url': {'readonly': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_display_name': {'key': 'carrierDisplayName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ShippingDetails, self).__init__(**kwargs) - self.carrier_name = None - self.carrier_display_name = None - self.tracking_id = None - self.tracking_url = None - - -class Specification(msrest.serialization.Model): - """Specifications of the configurations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the specification. - :vartype name: str - :ivar value: Value of the specification. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Specification, self).__init__(**kwargs) - self.name = None - self.value = None - - -class StageDetails(msrest.serialization.Model): - """Resource stage details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar stage_status: Stage status. Possible values include: "None", "InProgress", "Succeeded", - "Failed", "Cancelled", "Cancelling". - :vartype stage_status: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageStatus - :ivar stage_name: Stage name. Possible values include: "Placed", "InReview", "Confirmed", - "ReadyToShip", "Shipped", "Delivered", "InUse", "ReturnInitiated", "ReturnPickedUp", - "ReturnedToMicrosoft", "ReturnCompleted", "Cancelled". - :vartype stage_name: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageName - :ivar display_name: Display name of the resource stage. - :vartype display_name: str - :ivar start_time: Stage start time. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'stage_status': {'readonly': True}, - 'stage_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'start_time': {'readonly': True}, - } - - _attribute_map = { - 'stage_status': {'key': 'stageStatus', 'type': 'str'}, - 'stage_name': {'key': 'stageName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(StageDetails, self).__init__(**kwargs) - self.stage_status = None - self.stage_name = None - self.display_name = None - self.start_time = None - - -class SystemData(msrest.serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :type created_by_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". - :type last_modified_by_type: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC). - :type last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) - - -class TransportPreferences(msrest.serialization.Model): - """Preferences related to the shipment logistics of the sku. - - All required parameters must be populated in order to send to Azure. - - :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer - preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or - ~azure.mgmt.edgeorder.v2020_12_01_preview.models.TransportShipmentTypes - """ - - _validation = { - 'preferred_shipment_type': {'required': True}, - } - - _attribute_map = { - 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TransportPreferences, self).__init__(**kwargs) - self.preferred_shipment_type = kwargs['preferred_shipment_type'] diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models_py3.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models_py3.py index 912abd4af9308..a4937d245b4a7 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models_py3.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models_py3.py @@ -22,9 +22,9 @@ class AddressDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param forward_address: Required. Customer address and contact details. It should be address + :ivar forward_address: Required. Customer address and contact details. It should be address resource. - :type forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties + :vartype forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties :ivar return_address: Return shipping address. :vartype return_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties """ @@ -45,6 +45,11 @@ def __init__( forward_address: "AddressProperties", **kwargs ): + """ + :keyword forward_address: Required. Customer address and contact details. It should be address + resource. + :paramtype forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties + """ super(AddressDetails, self).__init__(**kwargs) self.forward_address = forward_address self.return_address = None @@ -55,10 +60,10 @@ class AddressProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails + :ivar shipping_address: Shipping details for the address. + :vartype shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress + :ivar contact_details: Required. Contact details for the address. + :vartype contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails """ _validation = { @@ -77,6 +82,12 @@ def __init__( shipping_address: Optional["ShippingAddress"] = None, **kwargs ): + """ + :keyword shipping_address: Shipping details for the address. + :paramtype shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress + :keyword contact_details: Required. Contact details for the address. + :paramtype contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails + """ super(AddressProperties, self).__init__(**kwargs) self.shipping_address = shipping_address self.contact_details = contact_details @@ -113,6 +124,8 @@ def __init__( self, **kwargs ): + """ + """ super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -134,10 +147,10 @@ class TrackedResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str """ _validation = { @@ -162,6 +175,12 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + """ super(TrackedResource, self).__init__(**kwargs) self.tags = tags self.location = location @@ -182,16 +201,16 @@ class AddressResource(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str :ivar system_data: Represents resource creation and update time. :vartype system_data: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SystemData - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails + :ivar shipping_address: Shipping details for the address. + :vartype shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress + :ivar contact_details: Required. Contact details for the address. + :vartype contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails """ _validation = { @@ -223,6 +242,16 @@ def __init__( shipping_address: Optional["ShippingAddress"] = None, **kwargs ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword shipping_address: Shipping details for the address. + :paramtype shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress + :keyword contact_details: Required. Contact details for the address. + :paramtype contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails + """ super(AddressResource, self).__init__(tags=tags, location=location, **kwargs) self.system_data = None self.shipping_address = shipping_address @@ -236,8 +265,8 @@ class AddressResourceList(msrest.serialization.Model): :ivar value: List of address resources. :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] - :param next_link: Link for the next set of job resources. - :type next_link: str + :ivar next_link: Link for the next set of job resources. + :vartype next_link: str """ _validation = { @@ -255,6 +284,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of job resources. + :paramtype next_link: str + """ super(AddressResourceList, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -263,13 +296,13 @@ def __init__( class AddressUpdateParameter(msrest.serialization.Model): """The Address update parameters. - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + :ivar tags: A set of tags. The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress - :param contact_details: Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails + :vartype tags: dict[str, str] + :ivar shipping_address: Shipping details for the address. + :vartype shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress + :ivar contact_details: Contact details for the address. + :vartype contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails """ _attribute_map = { @@ -286,6 +319,15 @@ def __init__( contact_details: Optional["ContactDetails"] = None, **kwargs ): + """ + :keyword tags: A set of tags. The list of key value pairs that describe the resource. These + tags can be used in viewing and grouping this resource (across resource groups). + :paramtype tags: dict[str, str] + :keyword shipping_address: Shipping details for the address. + :paramtype shipping_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ShippingAddress + :keyword contact_details: Contact details for the address. + :paramtype contact_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ContactDetails + """ super(AddressUpdateParameter, self).__init__(**kwargs) self.tags = tags self.shipping_address = shipping_address @@ -327,6 +369,8 @@ def __init__( self, **kwargs ): + """ + """ super(AvailabilityInformation, self).__init__(**kwargs) self.availability_stage = None self.disabled_reason = None @@ -377,6 +421,8 @@ def __init__( self, **kwargs ): + """ + """ super(BasicInformation, self).__init__(**kwargs) self.display_name = None self.description = None @@ -420,6 +466,8 @@ def __init__( self, **kwargs ): + """ + """ super(BillingMeterDetails, self).__init__(**kwargs) self.name = None self.meter_details = None @@ -432,8 +480,8 @@ class CancellationReason(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param reason: Required. Reason for cancellation. - :type reason: str + :ivar reason: Required. Reason for cancellation. + :vartype reason: str """ _validation = { @@ -450,6 +498,10 @@ def __init__( reason: str, **kwargs ): + """ + :keyword reason: Required. Reason for cancellation. + :paramtype reason: str + """ super(CancellationReason, self).__init__(**kwargs) self.reason = reason @@ -503,6 +555,8 @@ def __init__( self, **kwargs ): + """ + """ super(CommonProperties, self).__init__(**kwargs) self.filterable_properties = None @@ -564,6 +618,8 @@ def __init__( self, **kwargs ): + """ + """ super(Configuration, self).__init__(**kwargs) self.display_name = None self.description = None @@ -581,11 +637,11 @@ class ConfigurationFilters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param hierarchy_information: Required. Product hierarchy information. - :type hierarchy_information: + :ivar hierarchy_information: Required. Product hierarchy information. + :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation - :param filterable_property: Filters specific to product. - :type filterable_property: + :ivar filterable_property: Filters specific to product. + :vartype filterable_property: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] """ @@ -605,6 +661,14 @@ def __init__( filterable_property: Optional[List["FilterableProperty"]] = None, **kwargs ): + """ + :keyword hierarchy_information: Required. Product hierarchy information. + :paramtype hierarchy_information: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation + :keyword filterable_property: Filters specific to product. + :paramtype filterable_property: + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] + """ super(ConfigurationFilters, self).__init__(**kwargs) self.hierarchy_information = hierarchy_information self.filterable_property = filterable_property @@ -667,6 +731,8 @@ def __init__( self, **kwargs ): + """ + """ super(ConfigurationProperties, self).__init__(**kwargs) self.specifications = None self.dimensions = None @@ -679,8 +745,8 @@ class Configurations(msrest.serialization.Model): :ivar value: List of configurations. :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configuration] - :param next_link: Link for the next set of configurations. - :type next_link: str + :ivar next_link: Link for the next set of configurations. + :vartype next_link: str """ _validation = { @@ -698,6 +764,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of configurations. + :paramtype next_link: str + """ super(Configurations, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -708,13 +778,13 @@ class ConfigurationsRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param configuration_filters: Required. Holds details about product hierarchy information and + :ivar configuration_filters: Required. Holds details about product hierarchy information and filterable property. - :type configuration_filters: + :vartype configuration_filters: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationFilters] - :param customer_subscription_details: Customer subscription properties. Clients can display + :ivar customer_subscription_details: Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: + :vartype customer_subscription_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionDetails """ @@ -734,6 +804,16 @@ def __init__( customer_subscription_details: Optional["CustomerSubscriptionDetails"] = None, **kwargs ): + """ + :keyword configuration_filters: Required. Holds details about product hierarchy information and + filterable property. + :paramtype configuration_filters: + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationFilters] + :keyword customer_subscription_details: Customer subscription properties. Clients can display + available products to unregistered customers by explicitly passing subscription details. + :paramtype customer_subscription_details: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionDetails + """ super(ConfigurationsRequest, self).__init__(**kwargs) self.configuration_filters = configuration_filters self.customer_subscription_details = customer_subscription_details @@ -744,16 +824,16 @@ class ContactDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param contact_name: Required. Contact name of the person. - :type contact_name: str - :param phone: Required. Phone number of the contact person. - :type phone: str - :param phone_extension: Phone extension number of the contact person. - :type phone_extension: str - :param mobile: Mobile number of the contact person. - :type mobile: str - :param email_list: Required. List of Email-ids to be notified about job progress. - :type email_list: list[str] + :ivar contact_name: Required. Contact name of the person. + :vartype contact_name: str + :ivar phone: Required. Phone number of the contact person. + :vartype phone: str + :ivar phone_extension: Phone extension number of the contact person. + :vartype phone_extension: str + :ivar mobile: Mobile number of the contact person. + :vartype mobile: str + :ivar email_list: Required. List of Email-ids to be notified about job progress. + :vartype email_list: list[str] """ _validation = { @@ -780,6 +860,18 @@ def __init__( mobile: Optional[str] = None, **kwargs ): + """ + :keyword contact_name: Required. Contact name of the person. + :paramtype contact_name: str + :keyword phone: Required. Phone number of the contact person. + :paramtype phone: str + :keyword phone_extension: Phone extension number of the contact person. + :paramtype phone_extension: str + :keyword mobile: Mobile number of the contact person. + :paramtype mobile: str + :keyword email_list: Required. List of Email-ids to be notified about job progress. + :paramtype email_list: list[str] + """ super(ContactDetails, self).__init__(**kwargs) self.contact_name = contact_name self.phone = phone @@ -814,6 +906,8 @@ def __init__( self, **kwargs ): + """ + """ super(CostInformation, self).__init__(**kwargs) self.billing_meter_details = None self.billing_info_url = None @@ -824,13 +918,13 @@ class CustomerSubscriptionDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param registered_features: List of registered feature flags for subscription. - :type registered_features: + :ivar registered_features: List of registered feature flags for subscription. + :vartype registered_features: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionRegisteredFeatures] - :param location_placement_id: Location placement Id of a subscription. - :type location_placement_id: str - :param quota_id: Required. Quota ID of a subscription. - :type quota_id: str + :ivar location_placement_id: Location placement Id of a subscription. + :vartype location_placement_id: str + :ivar quota_id: Required. Quota ID of a subscription. + :vartype quota_id: str """ _validation = { @@ -851,6 +945,15 @@ def __init__( location_placement_id: Optional[str] = None, **kwargs ): + """ + :keyword registered_features: List of registered feature flags for subscription. + :paramtype registered_features: + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionRegisteredFeatures] + :keyword location_placement_id: Location placement Id of a subscription. + :paramtype location_placement_id: str + :keyword quota_id: Required. Quota ID of a subscription. + :paramtype quota_id: str + """ super(CustomerSubscriptionDetails, self).__init__(**kwargs) self.registered_features = registered_features self.location_placement_id = location_placement_id @@ -860,10 +963,10 @@ def __init__( class CustomerSubscriptionRegisteredFeatures(msrest.serialization.Model): """Represents subscription registered features. - :param name: Name of subscription registered feature. - :type name: str - :param state: State of subscription registered feature. - :type state: str + :ivar name: Name of subscription registered feature. + :vartype name: str + :ivar state: State of subscription registered feature. + :vartype state: str """ _attribute_map = { @@ -878,6 +981,12 @@ def __init__( state: Optional[str] = None, **kwargs ): + """ + :keyword name: Name of subscription registered feature. + :paramtype name: str + :keyword state: State of subscription registered feature. + :paramtype state: str + """ super(CustomerSubscriptionRegisteredFeatures, self).__init__(**kwargs) self.name = name self.state = state @@ -925,6 +1034,8 @@ def __init__( self, **kwargs ): + """ + """ super(Description, self).__init__(**kwargs) self.description_type = None self.short_description = None @@ -963,6 +1074,8 @@ def __init__( self, **kwargs ): + """ + """ super(DeviceDetails, self).__init__(**kwargs) self.serial_number = None self.management_resource_id = None @@ -1017,6 +1130,8 @@ def __init__( self, **kwargs ): + """ + """ super(Dimensions, self).__init__(**kwargs) self.length = None self.height = None @@ -1052,6 +1167,8 @@ def __init__( self, **kwargs ): + """ + """ super(DisplayInfo, self).__init__(**kwargs) self.product_family_display_name = None self.configuration_display_name = None @@ -1060,10 +1177,10 @@ def __init__( class EncryptionPreferences(msrest.serialization.Model): """Preferences related to the double encryption. - :param double_encryption_status: Double encryption status as entered by the customer. It is + :ivar double_encryption_status: Double encryption status as entered by the customer. It is compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. Possible values include: "Disabled", "Enabled". - :type double_encryption_status: str or + :vartype double_encryption_status: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DoubleEncryptionStatus """ @@ -1077,6 +1194,13 @@ def __init__( double_encryption_status: Optional[Union[str, "DoubleEncryptionStatus"]] = None, **kwargs ): + """ + :keyword double_encryption_status: Double encryption status as entered by the customer. It is + compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. Possible + values include: "Disabled", "Enabled". + :paramtype double_encryption_status: str or + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DoubleEncryptionStatus + """ super(EncryptionPreferences, self).__init__(**kwargs) self.double_encryption_status = double_encryption_status @@ -1106,6 +1230,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -1149,6 +1275,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -1160,8 +1288,8 @@ def __init__( class ErrorResponse(msrest.serialization.Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - :param error: The error object. - :type error: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ErrorDetail + :ivar error: The error object. + :vartype error: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ErrorDetail """ _attribute_map = { @@ -1174,6 +1302,10 @@ def __init__( error: Optional["ErrorDetail"] = None, **kwargs ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ErrorDetail + """ super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -1183,11 +1315,11 @@ class FilterableProperty(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type of product filter. Possible values include: "ShipToCountries", + :ivar type: Required. Type of product filter. Possible values include: "ShipToCountries", "DoubleEncryptionStatus". - :type type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SupportedFilterTypes - :param supported_values: Required. Values to be filtered. - :type supported_values: list[str] + :vartype type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SupportedFilterTypes + :ivar supported_values: Required. Values to be filtered. + :vartype supported_values: list[str] """ _validation = { @@ -1207,6 +1339,13 @@ def __init__( supported_values: List[str], **kwargs ): + """ + :keyword type: Required. Type of product filter. Possible values include: "ShipToCountries", + "DoubleEncryptionStatus". + :paramtype type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SupportedFilterTypes + :keyword supported_values: Required. Values to be filtered. + :paramtype supported_values: list[str] + """ super(FilterableProperty, self).__init__(**kwargs) self.type = type self.supported_values = supported_values @@ -1246,6 +1385,8 @@ def __init__( self, **kwargs ): + """ + """ super(ForwardShippingDetails, self).__init__(**kwargs) self.carrier_name = None self.carrier_display_name = None @@ -1256,16 +1397,15 @@ def __init__( class HierarchyInformation(msrest.serialization.Model): """Holds details about product hierarchy information. - :param product_family_name: Represents product family name that uniquely identifies product + :ivar product_family_name: Represents product family name that uniquely identifies product family. - :type product_family_name: str - :param product_line_name: Represents product line name that uniquely identifies product line. - :type product_line_name: str - :param product_name: Represents product name that uniquely identifies product. - :type product_name: str - :param configuration_name: Represents configuration name that uniquely identifies - configuration. - :type configuration_name: str + :vartype product_family_name: str + :ivar product_line_name: Represents product line name that uniquely identifies product line. + :vartype product_line_name: str + :ivar product_name: Represents product name that uniquely identifies product. + :vartype product_name: str + :ivar configuration_name: Represents configuration name that uniquely identifies configuration. + :vartype configuration_name: str """ _attribute_map = { @@ -1284,6 +1424,18 @@ def __init__( configuration_name: Optional[str] = None, **kwargs ): + """ + :keyword product_family_name: Represents product family name that uniquely identifies product + family. + :paramtype product_family_name: str + :keyword product_line_name: Represents product line name that uniquely identifies product line. + :paramtype product_line_name: str + :keyword product_name: Represents product name that uniquely identifies product. + :paramtype product_name: str + :keyword configuration_name: Represents configuration name that uniquely identifies + configuration. + :paramtype configuration_name: str + """ super(HierarchyInformation, self).__init__(**kwargs) self.product_family_name = product_family_name self.product_line_name = product_line_name @@ -1317,6 +1469,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageInformation, self).__init__(**kwargs) self.image_type = None self.image_url = None @@ -1348,6 +1502,8 @@ def __init__( self, **kwargs ): + """ + """ super(Link, self).__init__(**kwargs) self.link_type = None self.link_url = None @@ -1356,8 +1512,8 @@ def __init__( class ManagementResourcePreferences(msrest.serialization.Model): """Management resource preference to link device. - :param preferred_management_resource_id: Customer preferred Management resource ARM ID. - :type preferred_management_resource_id: str + :ivar preferred_management_resource_id: Customer preferred Management resource ARM ID. + :vartype preferred_management_resource_id: str """ _attribute_map = { @@ -1370,6 +1526,10 @@ def __init__( preferred_management_resource_id: Optional[str] = None, **kwargs ): + """ + :keyword preferred_management_resource_id: Customer preferred Management resource ARM ID. + :paramtype preferred_management_resource_id: str + """ super(ManagementResourcePreferences, self).__init__(**kwargs) self.preferred_management_resource_id = preferred_management_resource_id @@ -1384,9 +1544,9 @@ class MeterDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param billing_type: Required. Represents billing type.Constant filled by server. Possible + :ivar billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType + :vartype billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType :ivar multiplier: Billing unit applicable for Pav2 billing. :vartype multiplier: float :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". @@ -1413,6 +1573,8 @@ def __init__( self, **kwargs ): + """ + """ super(MeterDetails, self).__init__(**kwargs) self.billing_type = None # type: Optional[str] self.multiplier = None @@ -1424,11 +1586,11 @@ class NotificationPreference(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param stage_name: Required. Name of the stage. Possible values include: "Shipped", - "Delivered". - :type stage_name: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.NotificationStageName - :param send_notification: Required. Notification is required or not. - :type send_notification: bool + :ivar stage_name: Required. Name of the stage. Possible values include: "Shipped", "Delivered". + :vartype stage_name: str or + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.NotificationStageName + :ivar send_notification: Required. Notification is required or not. + :vartype send_notification: bool """ _validation = { @@ -1448,6 +1610,14 @@ def __init__( send_notification: bool, **kwargs ): + """ + :keyword stage_name: Required. Name of the stage. Possible values include: "Shipped", + "Delivered". + :paramtype stage_name: str or + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.NotificationStageName + :keyword send_notification: Required. Notification is required or not. + :paramtype send_notification: bool + """ super(NotificationPreference, self).__init__(**kwargs) self.stage_name = stage_name self.send_notification = send_notification @@ -1464,8 +1634,8 @@ class Operation(msrest.serialization.Model): :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. :vartype is_data_action: bool - :param display: Localized display information for this particular operation. - :type display: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationDisplay + :ivar display: Localized display information for this particular operation. + :vartype display: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationDisplay :ivar origin: The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", "system", "user,system". @@ -1496,6 +1666,10 @@ def __init__( display: Optional["OperationDisplay"] = None, **kwargs ): + """ + :keyword display: Localized display information for this particular operation. + :paramtype display: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationDisplay + """ super(Operation, self).__init__(**kwargs) self.name = None self.is_data_action = None @@ -1541,6 +1715,8 @@ def __init__( self, **kwargs ): + """ + """ super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None @@ -1573,6 +1749,8 @@ def __init__( self, **kwargs ): + """ + """ super(OperationListResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -1585,26 +1763,26 @@ class OrderItemDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param product_details: Required. Unique identifier for configuration. - :type product_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductDetails - :param order_item_type: Required. Order item type. Possible values include: "Purchase", + :ivar product_details: Required. Unique identifier for configuration. + :vartype product_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductDetails + :ivar order_item_type: Required. Order item type. Possible values include: "Purchase", "Rental". - :type order_item_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemType + :vartype order_item_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemType :ivar current_stage: Current Order item Status. :vartype current_stage: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageDetails :ivar order_item_stage_history: Order item status history. :vartype order_item_stage_history: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.StageDetails] - :param preferences: Customer notification Preferences. - :type preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences + :ivar preferences: Customer notification Preferences. + :vartype preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences :ivar forward_shipping_details: Forward Package Shipping details. :vartype forward_shipping_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ForwardShippingDetails :ivar reverse_shipping_details: Reverse Package Shipping details. :vartype reverse_shipping_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReverseShippingDetails - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] + :ivar notification_email_list: Additional notification email list. + :vartype notification_email_list: list[str] :ivar cancellation_reason: Cancellation reason. :vartype cancellation_reason: str :ivar cancellation_status: Describes whether the order item is cancellable or not. Possible @@ -1677,6 +1855,18 @@ def __init__( notification_email_list: Optional[List[str]] = None, **kwargs ): + """ + :keyword product_details: Required. Unique identifier for configuration. + :paramtype product_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductDetails + :keyword order_item_type: Required. Order item type. Possible values include: "Purchase", + "Rental". + :paramtype order_item_type: str or + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemType + :keyword preferences: Customer notification Preferences. + :paramtype preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences + :keyword notification_email_list: Additional notification email list. + :paramtype notification_email_list: list[str] + """ super(OrderItemDetails, self).__init__(**kwargs) self.product_details = product_details self.order_item_type = order_item_type @@ -1711,20 +1901,20 @@ class OrderItemResource(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str :ivar system_data: Represents resource creation and update time. :vartype system_data: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.SystemData - :param order_item_details: Required. Represents order item details. - :type order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemDetails - :param address_details: Required. Represents shipping and return address for order item. - :type address_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressDetails + :ivar order_item_details: Required. Represents order item details. + :vartype order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemDetails + :ivar address_details: Required. Represents shipping and return address for order item. + :vartype address_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressDetails :ivar start_time: Start time of order item. :vartype start_time: ~datetime.datetime - :param order_id: Required. Id of the order to which order item belongs to. - :type order_id: str + :ivar order_id: Required. Id of the order to which order item belongs to. + :vartype order_id: str """ _validation = { @@ -1762,6 +1952,19 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword order_item_details: Required. Represents order item details. + :paramtype order_item_details: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemDetails + :keyword address_details: Required. Represents shipping and return address for order item. + :paramtype address_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressDetails + :keyword order_id: Required. Id of the order to which order item belongs to. + :paramtype order_id: str + """ super(OrderItemResource, self).__init__(tags=tags, location=location, **kwargs) self.system_data = None self.order_item_details = order_item_details @@ -1777,8 +1980,8 @@ class OrderItemResourceList(msrest.serialization.Model): :ivar value: List of order item resources. :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] - :param next_link: Link for the next set of order item resources. - :type next_link: str + :ivar next_link: Link for the next set of order item resources. + :vartype next_link: str """ _validation = { @@ -1796,6 +1999,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of order item resources. + :paramtype next_link: str + """ super(OrderItemResourceList, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -1804,15 +2011,15 @@ def __init__( class OrderItemUpdateParameter(msrest.serialization.Model): """Updates order item parameters. - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + :ivar tags: A set of tags. The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param forward_address: Updates forward shipping address and contact details. - :type forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties - :param preferences: Customer preference. - :type preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] + :vartype tags: dict[str, str] + :ivar forward_address: Updates forward shipping address and contact details. + :vartype forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties + :ivar preferences: Customer preference. + :vartype preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences + :ivar notification_email_list: Additional notification email list. + :vartype notification_email_list: list[str] """ _attribute_map = { @@ -1831,6 +2038,17 @@ def __init__( notification_email_list: Optional[List[str]] = None, **kwargs ): + """ + :keyword tags: A set of tags. The list of key value pairs that describe the resource. These + tags can be used in viewing and grouping this resource (across resource groups). + :paramtype tags: dict[str, str] + :keyword forward_address: Updates forward shipping address and contact details. + :paramtype forward_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties + :keyword preferences: Customer preference. + :paramtype preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.Preferences + :keyword notification_email_list: Additional notification email list. + :paramtype notification_email_list: list[str] + """ super(OrderItemUpdateParameter, self).__init__(**kwargs) self.tags = tags self.forward_address = forward_address @@ -1869,6 +2087,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProxyResource, self).__init__(**kwargs) @@ -1920,6 +2140,8 @@ def __init__( self, **kwargs ): + """ + """ super(OrderResource, self).__init__(**kwargs) self.system_data = None self.order_item_ids = None @@ -1934,8 +2156,8 @@ class OrderResourceList(msrest.serialization.Model): :ivar value: List of order resources. :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResource] - :param next_link: Link for the next set of order resources. - :type next_link: str + :ivar next_link: Link for the next set of order resources. + :vartype next_link: str """ _validation = { @@ -1953,6 +2175,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of order resources. + :paramtype next_link: str + """ super(OrderResourceList, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -1965,9 +2191,9 @@ class Pav2MeterDetails(MeterDetails): All required parameters must be populated in order to send to Azure. - :param billing_type: Required. Represents billing type.Constant filled by server. Possible + :ivar billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType + :vartype billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType :ivar multiplier: Billing unit applicable for Pav2 billing. :vartype multiplier: float :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". @@ -1994,6 +2220,8 @@ def __init__( self, **kwargs ): + """ + """ super(Pav2MeterDetails, self).__init__(**kwargs) self.billing_type = 'Pav2' # type: str self.meter_guid = None @@ -2002,17 +2230,17 @@ def __init__( class Preferences(msrest.serialization.Model): """Preferences related to the order. - :param notification_preferences: Notification preferences. - :type notification_preferences: + :ivar notification_preferences: Notification preferences. + :vartype notification_preferences: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.NotificationPreference] - :param transport_preferences: Preferences related to the shipment logistics of the order. - :type transport_preferences: + :ivar transport_preferences: Preferences related to the shipment logistics of the order. + :vartype transport_preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.TransportPreferences - :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: + :ivar encryption_preferences: Preferences related to the Encryption. + :vartype encryption_preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.EncryptionPreferences - :param management_resource_preferences: Preferences related to the Management resource. - :type management_resource_preferences: + :ivar management_resource_preferences: Preferences related to the Management resource. + :vartype management_resource_preferences: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ManagementResourcePreferences """ @@ -2032,6 +2260,20 @@ def __init__( management_resource_preferences: Optional["ManagementResourcePreferences"] = None, **kwargs ): + """ + :keyword notification_preferences: Notification preferences. + :paramtype notification_preferences: + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.NotificationPreference] + :keyword transport_preferences: Preferences related to the shipment logistics of the order. + :paramtype transport_preferences: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.TransportPreferences + :keyword encryption_preferences: Preferences related to the Encryption. + :paramtype encryption_preferences: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.EncryptionPreferences + :keyword management_resource_preferences: Preferences related to the Management resource. + :paramtype management_resource_preferences: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ManagementResourcePreferences + """ super(Preferences, self).__init__(**kwargs) self.notification_preferences = notification_preferences self.transport_preferences = transport_preferences @@ -2092,6 +2334,8 @@ def __init__( self, **kwargs ): + """ + """ super(Product, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2110,11 +2354,11 @@ class ProductDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param display_info: Display details of the product. - :type display_info: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DisplayInfo - :param hierarchy_information: Required. Hierarchy of the product which uniquely identifies the + :ivar display_info: Display details of the product. + :vartype display_info: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DisplayInfo + :ivar hierarchy_information: Required. Hierarchy of the product which uniquely identifies the product. - :type hierarchy_information: + :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation :ivar count: Quantity of the product. :vartype count: int @@ -2148,6 +2392,14 @@ def __init__( display_info: Optional["DisplayInfo"] = None, **kwargs ): + """ + :keyword display_info: Display details of the product. + :paramtype display_info: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.DisplayInfo + :keyword hierarchy_information: Required. Hierarchy of the product which uniquely identifies + the product. + :paramtype hierarchy_information: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.HierarchyInformation + """ super(ProductDetails, self).__init__(**kwargs) self.display_info = display_info self.hierarchy_information = hierarchy_information @@ -2163,8 +2415,8 @@ class ProductFamilies(msrest.serialization.Model): :ivar value: List of product families. :vartype value: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamily] - :param next_link: Link for the next set of product families. - :type next_link: str + :ivar next_link: Link for the next set of product families. + :vartype next_link: str """ _validation = { @@ -2182,6 +2434,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of product families. + :paramtype next_link: str + """ super(ProductFamilies, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -2213,6 +2469,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductFamiliesMetadata, self).__init__(**kwargs) self.value = None self.next_link = None @@ -2243,8 +2501,8 @@ class ProductFamiliesMetadataDetails(msrest.serialization.Model): list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] :ivar product_lines: List of product lines supported in the product family. :vartype product_lines: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: + :ivar resource_provider_details: Contains details related to resource provider. + :vartype resource_provider_details: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] """ @@ -2277,6 +2535,11 @@ def __init__( resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): + """ + :keyword resource_provider_details: Contains details related to resource provider. + :paramtype resource_provider_details: + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] + """ super(ProductFamiliesMetadataDetails, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2294,12 +2557,12 @@ class ProductFamiliesRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param filterable_properties: Required. Dictionary of filterable properties on product family. - :type filterable_properties: dict[str, + :ivar filterable_properties: Required. Dictionary of filterable properties on product family. + :vartype filterable_properties: dict[str, list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty]] - :param customer_subscription_details: Customer subscription properties. Clients can display + :ivar customer_subscription_details: Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: + :vartype customer_subscription_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionDetails """ @@ -2319,6 +2582,16 @@ def __init__( customer_subscription_details: Optional["CustomerSubscriptionDetails"] = None, **kwargs ): + """ + :keyword filterable_properties: Required. Dictionary of filterable properties on product + family. + :paramtype filterable_properties: dict[str, + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty]] + :keyword customer_subscription_details: Customer subscription properties. Clients can display + available products to unregistered customers by explicitly passing subscription details. + :paramtype customer_subscription_details: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CustomerSubscriptionDetails + """ super(ProductFamiliesRequest, self).__init__(**kwargs) self.filterable_properties = filterable_properties self.customer_subscription_details = customer_subscription_details @@ -2349,8 +2622,8 @@ class ProductFamily(msrest.serialization.Model): list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] :ivar product_lines: List of product lines supported in the product family. :vartype product_lines: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: + :ivar resource_provider_details: Contains details related to resource provider. + :vartype resource_provider_details: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] """ @@ -2383,6 +2656,11 @@ def __init__( resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): + """ + :keyword resource_provider_details: Contains details related to resource provider. + :paramtype resource_provider_details: + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] + """ super(ProductFamily, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2420,8 +2698,8 @@ class ProductFamilyProperties(CommonProperties): list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.FilterableProperty] :ivar product_lines: List of product lines supported in the product family. :vartype product_lines: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: + :ivar resource_provider_details: Contains details related to resource provider. + :vartype resource_provider_details: list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] """ @@ -2454,6 +2732,11 @@ def __init__( resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): + """ + :keyword resource_provider_details: Contains details related to resource provider. + :paramtype resource_provider_details: + list[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ResourceProviderDetails] + """ super(ProductFamilyProperties, self).__init__(**kwargs) self.product_lines = None self.resource_provider_details = resource_provider_details @@ -2512,6 +2795,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductLine, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2576,6 +2861,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductLineProperties, self).__init__(**kwargs) self.products = None @@ -2633,6 +2920,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductProperties, self).__init__(**kwargs) self.configurations = None @@ -2644,9 +2933,9 @@ class PurchaseMeterDetails(MeterDetails): All required parameters must be populated in order to send to Azure. - :param billing_type: Required. Represents billing type.Constant filled by server. Possible + :ivar billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType + :vartype billing_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.BillingType :ivar multiplier: Billing unit applicable for Pav2 billing. :vartype multiplier: float :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". @@ -2681,6 +2970,8 @@ def __init__( self, **kwargs ): + """ + """ super(PurchaseMeterDetails, self).__init__(**kwargs) self.billing_type = 'Purchase' # type: str self.product_id = None @@ -2693,8 +2984,8 @@ class ResourceIdentity(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param type: Identity type. - :type type: str + :ivar type: Identity type. + :vartype type: str :ivar principal_id: Service Principal Id backing the Msi. :vartype principal_id: str :ivar tenant_id: Home Tenant Id. @@ -2718,6 +3009,10 @@ def __init__( type: Optional[str] = None, **kwargs ): + """ + :keyword type: Identity type. + :paramtype type: str + """ super(ResourceIdentity, self).__init__(**kwargs) self.type = type self.principal_id = None @@ -2745,6 +3040,8 @@ def __init__( self, **kwargs ): + """ + """ super(ResourceProviderDetails, self).__init__(**kwargs) self.resource_provider_namespace = None @@ -2754,14 +3051,14 @@ class ReturnOrderItemDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param return_address: customer return address. - :type return_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties - :param return_reason: Required. Return Reason. - :type return_reason: str - :param service_tag: Service tag (located on the bottom-right corner of the device). - :type service_tag: str - :param shipping_box_required: Shipping Box required. - :type shipping_box_required: bool + :ivar return_address: customer return address. + :vartype return_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties + :ivar return_reason: Required. Return Reason. + :vartype return_reason: str + :ivar service_tag: Service tag (located on the bottom-right corner of the device). + :vartype service_tag: str + :ivar shipping_box_required: Shipping Box required. + :vartype shipping_box_required: bool """ _validation = { @@ -2784,6 +3081,16 @@ def __init__( shipping_box_required: Optional[bool] = False, **kwargs ): + """ + :keyword return_address: customer return address. + :paramtype return_address: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressProperties + :keyword return_reason: Required. Return Reason. + :paramtype return_reason: str + :keyword service_tag: Service tag (located on the bottom-right corner of the device). + :paramtype service_tag: str + :keyword shipping_box_required: Shipping Box required. + :paramtype shipping_box_required: bool + """ super(ReturnOrderItemDetails, self).__init__(**kwargs) self.return_address = return_address self.return_reason = return_reason @@ -2829,6 +3136,8 @@ def __init__( self, **kwargs ): + """ + """ super(ReverseShippingDetails, self).__init__(**kwargs) self.sas_key_for_label = None self.carrier_name = None @@ -2842,27 +3151,27 @@ class ShippingAddress(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param street_address1: Required. Street Address line 1. - :type street_address1: str - :param street_address2: Street Address line 2. - :type street_address2: str - :param street_address3: Street Address line 3. - :type street_address3: str - :param city: Name of the City. - :type city: str - :param state_or_province: Name of the State or Province. - :type state_or_province: str - :param country: Required. Name of the Country. - :type country: str - :param postal_code: Postal code. - :type postal_code: str - :param zip_extended_code: Extended Zip Code. - :type zip_extended_code: str - :param company_name: Name of the company. - :type company_name: str - :param address_type: Type of address. Possible values include: "None", "Residential", + :ivar street_address1: Required. Street Address line 1. + :vartype street_address1: str + :ivar street_address2: Street Address line 2. + :vartype street_address2: str + :ivar street_address3: Street Address line 3. + :vartype street_address3: str + :ivar city: Name of the City. + :vartype city: str + :ivar state_or_province: Name of the State or Province. + :vartype state_or_province: str + :ivar country: Required. Name of the Country. + :vartype country: str + :ivar postal_code: Postal code. + :vartype postal_code: str + :ivar zip_extended_code: Extended Zip Code. + :vartype zip_extended_code: str + :ivar company_name: Name of the company. + :vartype company_name: str + :ivar address_type: Type of address. Possible values include: "None", "Residential", "Commercial". - :type address_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressType + :vartype address_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressType """ _validation = { @@ -2898,6 +3207,29 @@ def __init__( address_type: Optional[Union[str, "AddressType"]] = None, **kwargs ): + """ + :keyword street_address1: Required. Street Address line 1. + :paramtype street_address1: str + :keyword street_address2: Street Address line 2. + :paramtype street_address2: str + :keyword street_address3: Street Address line 3. + :paramtype street_address3: str + :keyword city: Name of the City. + :paramtype city: str + :keyword state_or_province: Name of the State or Province. + :paramtype state_or_province: str + :keyword country: Required. Name of the Country. + :paramtype country: str + :keyword postal_code: Postal code. + :paramtype postal_code: str + :keyword zip_extended_code: Extended Zip Code. + :paramtype zip_extended_code: str + :keyword company_name: Name of the company. + :paramtype company_name: str + :keyword address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". + :paramtype address_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressType + """ super(ShippingAddress, self).__init__(**kwargs) self.street_address1 = street_address1 self.street_address2 = street_address2 @@ -2945,6 +3277,8 @@ def __init__( self, **kwargs ): + """ + """ super(ShippingDetails, self).__init__(**kwargs) self.carrier_name = None self.carrier_display_name = None @@ -2977,6 +3311,8 @@ def __init__( self, **kwargs ): + """ + """ super(Specification, self).__init__(**kwargs) self.name = None self.value = None @@ -3018,6 +3354,8 @@ def __init__( self, **kwargs ): + """ + """ super(StageDetails, self).__init__(**kwargs) self.stage_status = None self.stage_name = None @@ -3028,21 +3366,21 @@ def __init__( class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :type created_by_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the resource. Possible + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :type last_modified_by_type: str or + :vartype last_modified_by_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC). - :type last_modified_at: ~datetime.datetime + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -3065,6 +3403,24 @@ def __init__( last_modified_at: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ super(SystemData, self).__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type @@ -3079,9 +3435,9 @@ class TransportPreferences(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + :ivar preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or + :vartype preferred_shipment_type: str or ~azure.mgmt.edgeorder.v2020_12_01_preview.models.TransportShipmentTypes """ @@ -3099,5 +3455,11 @@ def __init__( preferred_shipment_type: Union[str, "TransportShipmentTypes"], **kwargs ): + """ + :keyword preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :paramtype preferred_shipment_type: str or + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.TransportShipmentTypes + """ super(TransportPreferences, self).__init__(**kwargs) self.preferred_shipment_type = preferred_shipment_type diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/operations/_edge_order_management_client_operations.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/operations/_edge_order_management_client_operations.py index c72f177b5618e..362bedb8a1641 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/operations/_edge_order_management_client_operations.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/operations/_edge_order_management_client_operations.py @@ -5,38 +5,876 @@ # 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_operations_request( + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/providers/Microsoft.EdgeOrder/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 + ) + + +def build_list_addresses_at_subscription_level_request( + subscription_id: str, + *, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_product_families_request( + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_configurations_request( + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listConfigurations') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_product_families_metadata_request( + subscription_id: str, + *, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_list_order_at_subscription_level_request( + subscription_id: str, + *, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_order_items_at_subscription_level_request( + subscription_id: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_addresses_at_resource_group_level_request( + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_address_by_name_request( + address_name: str, + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_address_request_initial( + address_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_address_by_name_request_initial( + address_name: str, + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_update_address_request_initial( + address_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + if_match: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 if_match is not None: + header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') + 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_list_order_at_resource_group_level_request( + subscription_id: str, + resource_group_name: str, + *, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_order_by_name_request( + order_name: str, + subscription_id: str, + resource_group_name: str, + location: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName}') + path_format_arguments = { + "orderName": _SERIALIZER.url("order_name", order_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "location": _SERIALIZER.url("location", location, 'str', min_length=1), + } + + 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_order_items_at_resource_group_level_request( + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_order_item_by_name_request( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, '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_order_item_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_order_item_by_name_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_update_order_item_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + if_match: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 if_match is not None: + header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') + 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_cancel_order_item_request( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/cancel') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_return_order_item_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2020-12-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 EdgeOrderManagementClientOperationsMixin(object): + @distributed_trace def list_operations( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationListResult"] + **kwargs: Any + ) -> Iterable["_models.OperationListResult"]: """This method gets all the operations that are exposed for customer. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -44,30 +882,27 @@ def list_operations( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_operations.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_operations_request( + template_url=self.list_operations.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_operations_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) @@ -80,24 +915,25 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_operations.metadata = {'url': '/providers/Microsoft.EdgeOrder/operations'} # type: ignore + @distributed_trace def list_addresses_at_subscription_level( self, - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.AddressResourceList"] + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.AddressResourceList"]: """Lists all the addresses available under the subscription. :param filter: $filter is supported to filter based on shipping address properties. Filter @@ -108,7 +944,8 @@ def list_addresses_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -116,38 +953,33 @@ def list_addresses_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_addresses_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_subscription_level.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_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -160,29 +992,31 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace def list_product_families( self, - product_families_request, # type: "_models.ProductFamiliesRequest" - expand=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProductFamilies"] + product_families_request: "_models.ProductFamiliesRequest", + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.ProductFamilies"]: """This method provides the list of product families for the given subscription. :param product_families_request: Filters for showing the product families. - :type product_families_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest + :type product_families_request: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesRequest :param expand: $expand is supported on configurations parameter for product, which provides details on the configurations for the product. :type expand: str @@ -191,54 +1025,50 @@ def list_product_families( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductFamilies or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamilies"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_product_families.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + template_url=self.list_product_families.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(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + 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('ProductFamilies', pipeline_response) + deserialized = self._deserialize("ProductFamilies", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -251,80 +1081,78 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies'} # type: ignore + @distributed_trace def list_configurations( self, - configurations_request, # type: "_models.ConfigurationsRequest" - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.Configurations"] + configurations_request: "_models.ConfigurationsRequest", + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.Configurations"]: """This method provides the list of configurations for the given product family, product line and product under subscription. :param configurations_request: Filters for showing the configurations. - :type configurations_request: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest + :type configurations_request: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ConfigurationsRequest :param skip_token: $skipToken is supported on list of configurations, which provides the next page in the list of configurations. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Configurations or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configurations"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_configurations.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + template_url=self.list_configurations.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(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + 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('Configurations', pipeline_response) + deserialized = self._deserialize("Configurations", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -337,31 +1165,34 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listConfigurations'} # type: ignore + @distributed_trace def list_product_families_metadata( self, - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProductFamiliesMetadata"] + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.ProductFamiliesMetadata"]: """This method provides the list of product families metadata for the given subscription. :param skip_token: $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata] + :return: An iterator like instance of either ProductFamiliesMetadata or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamiliesMetadata] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamiliesMetadata"] @@ -369,36 +1200,31 @@ def list_product_families_metadata( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_product_families_metadata.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.post(url, query_parameters, header_parameters) + + request = build_list_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_product_families_metadata.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_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('ProductFamiliesMetadata', pipeline_response) + deserialized = self._deserialize("ProductFamiliesMetadata", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -411,23 +1237,24 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata'} # type: ignore + @distributed_trace def list_order_at_subscription_level( self, - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderResourceList"] + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderResourceList"]: """Lists order at subscription level. :param skip_token: $skipToken is supported on Get list of order, which provides the next page @@ -435,7 +1262,8 @@ def list_order_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -443,36 +1271,31 @@ def list_order_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_order_at_subscription_level.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_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -485,25 +1308,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace def list_order_items_at_subscription_level( self, - filter=None, # type: Optional[str] - expand=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderItemResourceList"] + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderItemResourceList"]: """Lists order item at subscription level. :param filter: $filter is supported to filter based on order id. Filter supports only equals @@ -518,8 +1342,10 @@ def list_order_items_at_subscription_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -527,40 +1353,35 @@ def list_order_items_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_items_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_subscription_level.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_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -573,25 +1394,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace def list_addresses_at_resource_group_level( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.AddressResourceList"] + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.AddressResourceList"]: """Lists all the addresses available under the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -604,7 +1426,8 @@ def list_addresses_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -612,39 +1435,35 @@ def list_addresses_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_addresses_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_resource_group_level.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_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -657,24 +1476,25 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace def get_address_by_name( self, - address_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.AddressResource" + address_name: str, + resource_group_name: str, + **kwargs: Any + ) -> "_models.AddressResource": """Gets information about the specified address. :param address_name: The name of the address Resource within the specified resource group. @@ -693,33 +1513,23 @@ def get_address_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_address_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self.get_address_by_name.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.failsafe_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('AddressResource', pipeline_response) @@ -728,54 +1538,44 @@ def get_address_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + def _create_address_initial( self, - address_name, # type: str - resource_group_name, # type: str - address_resource, # type: "_models.AddressResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_resource: "_models.AddressResource", + **kwargs: Any + ) -> Optional["_models.AddressResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AddressResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(address_resource, 'AddressResource') + + request = build_create_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_address_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(address_resource, 'AddressResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -785,16 +1585,18 @@ def _create_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace def begin_create_address( self, - address_name, # type: str - resource_group_name, # type: str - address_resource, # type: "_models.AddressResource" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_resource: "_models.AddressResource", + **kwargs: Any + ) -> LROPoller["_models.AddressResource"]: """Creates a new address with the specified parameters. Existing address cannot be updated with this API and should instead be updated with the Update address API. @@ -808,15 +1610,20 @@ def begin_create_address( :type address_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] + :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -828,27 +1635,21 @@ def begin_create_address( address_name=address_name, resource_group_name=resource_group_name, address_resource=address_resource, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -860,61 +1661,51 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore def _delete_address_by_name_initial( self, - address_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + address_name: str, + resource_group_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 = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self._delete_address_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_address_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_address_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace def begin_delete_address_by_name( self, - address_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + address_name: str, + resource_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Deletes an address. :param address_name: The name of the address Resource within the specified resource group. @@ -925,15 +1716,17 @@ def begin_delete_address_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -947,21 +1740,14 @@ def begin_delete_address_by_name( 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 = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -973,57 +1759,45 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore def _update_address_initial( self, - address_name, # type: str - resource_group_name, # type: str - address_update_parameter, # type: "_models.AddressUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_update_parameter: "_models.AddressUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.AddressResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AddressResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') + + request = build_update_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_address_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1033,17 +1807,19 @@ def _update_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace def begin_update_address( self, - address_name, # type: str - resource_group_name, # type: str - address_update_parameter, # type: "_models.AddressUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_update_parameter: "_models.AddressUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.AddressResource"]: """Updates the properties of an existing address. :param address_name: The name of the address Resource within the specified resource group. @@ -1053,21 +1829,27 @@ def begin_update_address( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param address_update_parameter: Address update parameters from request body. - :type address_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter + :type address_update_parameter: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the job on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource] + :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1080,27 +1862,21 @@ def begin_update_address( resource_group_name=resource_group_name, address_update_parameter=address_update_parameter, if_match=if_match, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1112,15 +1888,16 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + @distributed_trace def list_order_at_resource_group_level( self, - resource_group_name, # type: str - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderResourceList"] + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderResourceList"]: """Lists order at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1130,7 +1907,8 @@ def list_order_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -1138,37 +1916,33 @@ def list_order_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + template_url=self.list_order_at_resource_group_level.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_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1181,25 +1955,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace def get_order_by_name( self, - order_name, # type: str - resource_group_name, # type: str - location, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OrderResource" + order_name: str, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> "_models.OrderResource": """Gets an order. :param order_name: The name of the order. @@ -1218,34 +1993,24 @@ def get_order_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_order_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderName': self._serialize.url("order_name", order_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'location': self._serialize.url("location", location, 'str', min_length=1), - } - url = self._client.format_url(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_order_by_name_request( + order_name=order_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + template_url=self.get_order_by_name.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.failsafe_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('OrderResource', pipeline_response) @@ -1254,17 +2019,19 @@ def get_order_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName}'} # type: ignore + + @distributed_trace def list_order_items_at_resource_group_level( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - expand=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderItemResourceList"] + resource_group_name: str, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderItemResourceList"]: """Lists order item at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1281,8 +2048,10 @@ def list_order_items_at_resource_group_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -1290,41 +2059,37 @@ def list_order_items_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - 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_order_items_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_resource_group_level.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_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1337,25 +2102,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace def get_order_item_by_name( self, - order_item_name, # type: str - resource_group_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.OrderItemResource" + order_item_name: str, + resource_group_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.OrderItemResource": """Gets an order item. :param order_item_name: The name of the order item. @@ -1377,35 +2143,24 @@ def get_order_item_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self.get_order_item_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_order_item_by_name_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + expand=expand, + template_url=self.get_order_item_by_name.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.failsafe_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('OrderItemResource', pipeline_response) @@ -1414,54 +2169,44 @@ def get_order_item_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + def _create_order_item_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_resource, # type: "_models.OrderItemResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_resource: "_models.OrderItemResource", + **kwargs: Any + ) -> Optional["_models.OrderItemResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OrderItemResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(order_item_resource, 'OrderItemResource') + + request = build_create_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_order_item_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(order_item_resource, 'OrderItemResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1471,16 +2216,18 @@ def _create_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace def begin_create_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_resource, # type: "_models.OrderItemResource" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_resource: "_models.OrderItemResource", + **kwargs: Any + ) -> LROPoller["_models.OrderItemResource"]: """Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API. @@ -1492,15 +2239,20 @@ def begin_create_order_item( :type order_item_resource: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1512,27 +2264,21 @@ def begin_create_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, order_item_resource=order_item_resource, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1544,61 +2290,51 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore def _delete_order_item_by_name_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + order_item_name: str, + resource_group_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 = "2020-12-01-preview" - accept = "application/json" - - # Construct URL - url = self._delete_order_item_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_order_item_by_name_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_order_item_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_order_item_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace def begin_delete_order_item_by_name( self, - order_item_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + order_item_name: str, + resource_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Deletes an order item. :param order_item_name: The name of the order item. @@ -1607,15 +2343,17 @@ def begin_delete_order_item_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1629,21 +2367,14 @@ def begin_delete_order_item_by_name( 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1655,57 +2386,45 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore def _update_order_item_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_update_parameter, # type: "_models.OrderItemUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_update_parameter: "_models.OrderItemUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.OrderItemResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OrderItemResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') + + request = build_update_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_order_item_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1715,17 +2434,19 @@ def _update_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace def begin_update_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_update_parameter, # type: "_models.OrderItemUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_update_parameter: "_models.OrderItemUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.OrderItemResource"]: """Updates the properties of an existing order item. :param order_item_name: The name of the order item. @@ -1733,21 +2454,27 @@ def begin_update_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param order_item_update_parameter: order item update parameters from request body. - :type order_item_update_parameter: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter + :type order_item_update_parameter: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1760,27 +2487,21 @@ def begin_update_order_item( resource_group_name=resource_group_name, order_item_update_parameter=order_item_update_parameter, if_match=if_match, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1792,16 +2513,17 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + @distributed_trace def cancel_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - cancellation_reason, # type: "_models.CancellationReason" - **kwargs # type: Any - ): - # type: (...) -> None + order_item_name: str, + resource_group_name: str, + cancellation_reason: "_models.CancellationReason", + **kwargs: Any + ) -> None: """Cancel order item. :param order_item_name: The name of the order item. @@ -1820,38 +2542,28 @@ def cancel_order_item( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.cancel_order_item.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(cancellation_reason, 'CancellationReason') + + request = build_cancel_order_item_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self.cancel_order_item.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(cancellation_reason, 'CancellationReason') - 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, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1859,66 +2571,56 @@ def cancel_order_item( cancel_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/cancel'} # type: ignore + def _return_order_item_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - return_order_item_details, # type: "_models.ReturnOrderItemDetails" - **kwargs # type: Any - ): - # type: (...) -> None + order_item_name: str, + resource_group_name: str, + return_order_item_details: "_models.ReturnOrderItemDetails", + **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 = "2020-12-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._return_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(return_order_item_details, 'ReturnOrderItemDetails') + + request = build_return_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._return_order_item_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(return_order_item_details, 'ReturnOrderItemDetails') - 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.failsafe_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, {}) _return_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore + + @distributed_trace def begin_return_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - return_order_item_details, # type: "_models.ReturnOrderItemDetails" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + order_item_name: str, + resource_group_name: str, + return_order_item_details: "_models.ReturnOrderItemDetails", + **kwargs: Any + ) -> LROPoller[None]: """Return order item. :param order_item_name: The name of the order item. @@ -1926,18 +2628,22 @@ def begin_return_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param return_order_item_details: Return order item CurrentStatus. - :type return_order_item_details: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails + :type return_order_item_details: + ~azure.mgmt.edgeorder.v2020_12_01_preview.models.ReturnOrderItemDetails :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1949,24 +2655,18 @@ def begin_return_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, return_order_item_details=return_order_item_details, + 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1978,4 +2678,5 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_return_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/__init__.py index 6a0b62b08a4ce..24111d1edffbc 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/__init__.py @@ -12,8 +12,7 @@ __version__ = VERSION __all__ = ['EdgeOrderManagementClient'] -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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_configuration.py index f0a779062d5ce..36514f422b696 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_configuration.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_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 EdgeOrderManagementClientConfiguration(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(EdgeOrderManagementClientConfiguration, 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(EdgeOrderManagementClientConfiguration, 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_edge_order_management_client.py index bd6f90006bc18..9e6456f803d0e 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_edge_order_management_client.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_edge_order_management_client.py @@ -6,22 +6,20 @@ # 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 -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - +from . import models from ._configuration import EdgeOrderManagementClientConfiguration from .operations import EdgeOrderManagementClientOperationsMixin -from . import models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): """The EdgeOrder Client. @@ -30,46 +28,53 @@ class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. :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 = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs) + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = EdgeOrderManagementClientConfiguration(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 - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs: Any + ) -> HttpResponse: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> 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.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_metadata.json b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_metadata.json index f53b9e9e72d0c..0d670dd71a5f0 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_metadata.json +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_metadata.json @@ -5,13 +5,13 @@ "name": "EdgeOrderManagementClient", "filename": "_edge_order_management_client", "description": "The EdgeOrder Client.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, + "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\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "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\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"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\": [\"EdgeOrderManagementClientConfiguration\"], \"._operations_mixin\": [\"EdgeOrderManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -54,7 +54,7 @@ "required": false }, "base_url": { - "signature": "base_url=None, # type: Optional[str]", + "signature": "base_url=\"https://management.azure.com\", # type: str", "description": "Service URL", "docstring_type": "str", "required": false @@ -74,7 +74,7 @@ "required": false }, "base_url": { - "signature": "base_url: Optional[str] = None,", + "signature": "base_url: str = \"https://management.azure.com\",", "description": "Service URL", "docstring_type": "str", "required": false @@ -91,117 +91,116 @@ "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"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\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + "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": { }, "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.mgmt.core.polling.arm_polling\": [\"ARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.mgmt.core.polling.async_arm_polling\": [\"AsyncARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Iterable\", \"Optional\"]}, \"azurecore\": {\"azure.core.paging\": [\"ItemPaged\"], \"azure.core.polling\": [\"LROPoller\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Optional\"]}, \"azurecore\": {\"azure.core.async_paging\": [\"AsyncItemPaged\"], \"azure.core.polling\": [\"AsyncLROPoller\"]}}}", "operations": { "list_operations" : { "sync": { - "signature": "def list_operations(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_operations(\n self,\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OperationListResult\"]\n", + "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_operations(\n self,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OperationListResult\"]:\n", - "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_operations(\n self,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OperationListResult\"]:\n", + "doc": "\"\"\"This method gets all the operations that are exposed for customer.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OperationListResult or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "" }, "list_addresses_at_subscription_level" : { "sync": { - "signature": "def list_addresses_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.AddressResourceList\"]\n", + "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_addresses_at_subscription_level(\n self,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.AddressResourceList\"]:\n", - "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_subscription_level(\n self,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.AddressResourceList\"]:\n", + "doc": "\"\"\"Lists all the addresses available under the subscription.\n\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of addresses.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "filter, skip_token" }, "list_product_families" : { "sync": { - "signature": "def list_product_families(\n self,\n product_families_request, # type: \"_models.ProductFamiliesRequest\"\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "signature": "def list_product_families(\n self,\n product_families_request, # type: \"_models.ProductFamiliesRequest\"\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.ProductFamilies\"]\n", "doc": "\"\"\"This method provides the list of product families for the given subscription.\n\n:param product_families_request: Filters for showing the product families.\n:type product_families_request: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesRequest\n:param expand: $expand is supported on configurations parameter for product, which provides\n details on the configurations for the product.\n:type expand: str\n:param skip_token: $skipToken is supported on list of product families, which provides the next\n page in the list of product families.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamilies or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_product_families(\n self,\n product_families_request: \"_models.ProductFamiliesRequest\",\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.ProductFamilies\"]:\n", - "doc": "\"\"\"This method provides the list of product families for the given subscription.\n\n:param product_families_request: Filters for showing the product families.\n:type product_families_request: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesRequest\n:param expand: $expand is supported on configurations parameter for product, which provides\n details on the configurations for the product.\n:type expand: str\n:param skip_token: $skipToken is supported on list of product families, which provides the next\n page in the list of product families.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamilies or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_product_families(\n self,\n product_families_request: \"_models.ProductFamiliesRequest\",\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.ProductFamilies\"]:\n", + "doc": "\"\"\"This method provides the list of product families for the given subscription.\n\n:param product_families_request: Filters for showing the product families.\n:type product_families_request: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesRequest\n:param expand: $expand is supported on configurations parameter for product, which provides\n details on the configurations for the product.\n:type expand: str\n:param skip_token: $skipToken is supported on list of product families, which provides the next\n page in the list of product families.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamilies or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "product_families_request, expand, skip_token" }, "list_configurations" : { "sync": { - "signature": "def list_configurations(\n self,\n configurations_request, # type: \"_models.ConfigurationsRequest\"\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "signature": "def list_configurations(\n self,\n configurations_request, # type: \"_models.ConfigurationsRequest\"\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.Configurations\"]\n", "doc": "\"\"\"This method provides the list of configurations for the given product family, product line and\nproduct under subscription.\n\n:param configurations_request: Filters for showing the configurations.\n:type configurations_request: ~azure.mgmt.edgeorder.v2021_12_01.models.ConfigurationsRequest\n:param skip_token: $skipToken is supported on list of configurations, which provides the next\n page in the list of configurations.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either Configurations or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_configurations(\n self,\n configurations_request: \"_models.ConfigurationsRequest\",\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.Configurations\"]:\n", - "doc": "\"\"\"This method provides the list of configurations for the given product family, product line and\nproduct under subscription.\n\n:param configurations_request: Filters for showing the configurations.\n:type configurations_request: ~azure.mgmt.edgeorder.v2021_12_01.models.ConfigurationsRequest\n:param skip_token: $skipToken is supported on list of configurations, which provides the next\n page in the list of configurations.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either Configurations or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_configurations(\n self,\n configurations_request: \"_models.ConfigurationsRequest\",\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.Configurations\"]:\n", + "doc": "\"\"\"This method provides the list of configurations for the given product family, product line and\nproduct under subscription.\n\n:param configurations_request: Filters for showing the configurations.\n:type configurations_request: ~azure.mgmt.edgeorder.v2021_12_01.models.ConfigurationsRequest\n:param skip_token: $skipToken is supported on list of configurations, which provides the next\n page in the list of configurations.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either Configurations or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "configurations_request, skip_token" }, "list_product_families_metadata" : { "sync": { - "signature": "def list_product_families_metadata(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_product_families_metadata(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.ProductFamiliesMetadata\"]\n", + "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_product_families_metadata(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.ProductFamiliesMetadata\"]:\n", - "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_product_families_metadata(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.ProductFamiliesMetadata\"]:\n", + "doc": "\"\"\"This method provides the list of product families metadata for the given subscription.\n\n:param skip_token: $skipToken is supported on list of product families metadata, which provides\n the next page in the list of product families metadata.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either ProductFamiliesMetadata or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "skip_token" }, "list_order_at_subscription_level" : { "sync": { - "signature": "def list_order_at_subscription_level(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_subscription_level(\n self,\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderResourceList\"]\n", + "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_at_subscription_level(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderResourceList\"]:\n", - "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_subscription_level(\n self,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderResourceList\"]:\n", + "doc": "\"\"\"Lists order at subscription level.\n\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "skip_token" }, "list_order_items_at_subscription_level" : { "sync": { - "signature": "def list_order_items_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_subscription_level(\n self,\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderItemResourceList\"]\n", + "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_items_at_subscription_level(\n self,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderItemResourceList\"]:\n", - "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_subscription_level(\n self,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderItemResourceList\"]:\n", + "doc": "\"\"\"Lists order item at subscription level.\n\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "filter, expand, skip_token" }, "list_addresses_at_resource_group_level" : { "sync": { - "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.AddressResourceList\"]\n", + "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.AddressResourceList\"]:\n", - "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_addresses_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.AddressResourceList\"]:\n", + "doc": "\"\"\"Lists all the addresses available under the given resource group.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on shipping address properties. Filter\n supports only equals operation.\n:type filter: str\n:param skip_token: $skipToken is supported on Get list of addresses, which provides the next\n page in the list of address.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either AddressResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, filter, skip_token" }, "get_address_by_name" : { "sync": { - "signature": "def get_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", + "signature": "def get_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.AddressResource\"\n", "doc": "\"\"\"Gets information about the specified address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -213,91 +212,91 @@ }, "_create_address_initial" : { "sync": { - "signature": "def _create_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _create_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.AddressResource\"]\n", + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _create_address_initial(\n self,\n address_name: str,\n resource_group_name: str,\n address_resource: \"_models.AddressResource\",\n **kwargs: Any\n) -\u003e Optional[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_resource" }, "begin_create_address" : { "sync": { - "signature": "def begin_create_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Creates a new address with the specified parameters. Existing address can be updated with this\nAPI.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_create_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_resource, # type: \"_models.AddressResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.AddressResource\"]\n", + "doc": "\"\"\"Creates a new address with the specified parameters. Existing address can be updated with this\nAPI.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_create_address(\n self,\n address_name: str,\n resource_group_name: str,\n address_resource: \"_models.AddressResource\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"Creates a new address with the specified parameters. Existing address can be updated with this\nAPI.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Creates a new address with the specified parameters. Existing address can be updated with this\nAPI.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_resource: Address details from request body.\n:type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_resource" }, "_delete_address_by_name_initial" : { "sync": { - "signature": "def _delete_address_by_name_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _delete_address_by_name_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _delete_address_by_name_initial(\n self,\n address_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name" }, "begin_delete_address_by_name" : { "sync": { - "signature": "def begin_delete_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_delete_address_by_name(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_delete_address_by_name(\n self,\n address_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Deletes an address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name" }, "_update_address_initial" : { "sync": { - "signature": "def _update_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _update_address_initial(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.AddressResource\"]\n", + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _update_address_initial(\n self,\n address_name: str,\n resource_group_name: str,\n address_update_parameter: \"_models.AddressUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AddressResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_update_parameter, if_match" }, "begin_update_address" : { "sync": { - "signature": "def begin_update_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_update_address(\n self,\n address_name, # type: str\n resource_group_name, # type: str\n address_update_parameter, # type: \"_models.AddressUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.AddressResource\"]\n", + "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_update_address(\n self,\n address_name: str,\n resource_group_name: str,\n address_update_parameter: \"_models.AddressUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.AddressResource\"]:\n", - "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Updates the properties of an existing address.\n\n:param address_name: The name of the address Resource within the specified resource group.\n address names must be between 3 and 24 characters in length and use any alphanumeric and\n underscore only.\n:type address_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param address_update_parameter: Address update parameters from request body.\n:type address_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the job on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either AddressResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "address_name, resource_group_name, address_update_parameter, if_match" }, "list_order_at_resource_group_level" : { "sync": { - "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name, # type: str\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name, # type: str\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderResourceList\"]\n", + "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name: str,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderResourceList\"]:\n", - "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_at_resource_group_level(\n self,\n resource_group_name: str,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderResourceList\"]:\n", + "doc": "\"\"\"Lists order at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param skip_token: $skipToken is supported on Get list of order, which provides the next page\n in the list of order.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderResourceList or the result of cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, skip_token" }, "get_order_by_name" : { "sync": { - "signature": "def get_order_by_name(\n self,\n order_name, # type: str\n resource_group_name, # type: str\n location, # type: str\n **kwargs # type: Any\n):\n", + "signature": "def get_order_by_name(\n self,\n order_name, # type: str\n resource_group_name, # type: str\n location, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.OrderResource\"\n", "doc": "\"\"\"Gets an order.\n\n:param order_name: The name of the order.\n:type order_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param location: The name of Azure region.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderResource\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -309,19 +308,19 @@ }, "list_order_items_at_resource_group_level" : { "sync": { - "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name, # type: str\n filter=None, # type: Optional[str]\n expand=None, # type: Optional[str]\n skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Iterable[\"_models.OrderItemResourceList\"]\n", + "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": false, - "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderItemResourceList\"]:\n", - "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def list_order_items_at_resource_group_level(\n self,\n resource_group_name: str,\n filter: Optional[str] = None,\n expand: Optional[str] = None,\n skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncIterable[\"_models.OrderItemResourceList\"]:\n", + "doc": "\"\"\"Lists order item at resource group level.\n\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param filter: $filter is supported to filter based on order id. Filter supports only equals\n operation.\n:type filter: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:param skip_token: $skipToken is supported on Get list of order items, which provides the next\n page in the list of order items.\n:type skip_token: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either OrderItemResourceList or the result of\n cls(response)\n:rtype:\n ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "resource_group_name, filter, expand, skip_token" }, "get_order_item_by_name" : { "sync": { - "signature": "def get_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n expand=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "signature": "def get_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n expand=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.OrderItemResource\"\n", "doc": "\"\"\"Gets an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param expand: $expand is supported on device details, forward shipping details and reverse\n shipping details parameters. Each of these can be provided as a comma separated list. Device\n Details for order item provides details on the devices of the product, Forward and Reverse\n Shipping details provide forward and reverse shipping details respectively.\n:type expand: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -333,79 +332,79 @@ }, "_create_order_item_initial" : { "sync": { - "signature": "def _create_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _create_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.OrderItemResource\"]\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _create_order_item_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_resource: \"_models.OrderItemResource\",\n **kwargs: Any\n) -\u003e Optional[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_resource" }, "begin_create_order_item" : { "sync": { - "signature": "def begin_create_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_create_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_resource, # type: \"_models.OrderItemResource\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.OrderItemResource\"]\n", + "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_create_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_resource: \"_models.OrderItemResource\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Creates an order item. Existing order item cannot be updated with this api and should instead\nbe updated with the Update order item API.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_resource: Order item details from request body.\n:type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_resource" }, "_delete_order_item_by_name_initial" : { "sync": { - "signature": "def _delete_order_item_by_name_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _delete_order_item_by_name_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _delete_order_item_by_name_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name" }, "begin_delete_order_item_by_name" : { "sync": { - "signature": "def begin_delete_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_delete_order_item_by_name(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_delete_order_item_by_name(\n self,\n order_item_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Deletes an order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name" }, "_update_order_item_initial" : { "sync": { - "signature": "def _update_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _update_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.OrderItemResource\"]\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _update_order_item_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_update_parameter: \"_models.OrderItemUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: OrderItemResource, or the result of cls(response)\n:rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_update_parameter, if_match" }, "begin_update_order_item" : { "sync": { - "signature": "def begin_update_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_update_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n order_item_update_parameter, # type: \"_models.OrderItemUpdateParameter\"\n if_match=None, # type: Optional[str]\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[\"_models.OrderItemResource\"]\n", + "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_update_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n order_item_update_parameter: \"_models.OrderItemUpdateParameter\",\n if_match: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.OrderItemResource\"]:\n", - "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Updates the properties of an existing order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param order_item_update_parameter: order item update parameters from request body.\n:type order_item_update_parameter:\n ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter\n:param if_match: Defines the If-Match condition. The patch will be performed only if the ETag\n of the order on the server matches this value.\n:type if_match: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either OrderItemResource or the result of\n cls(response)\n:rtype:\n ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, order_item_update_parameter, if_match" }, "cancel_order_item" : { "sync": { - "signature": "def cancel_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n cancellation_reason, # type: \"_models.CancellationReason\"\n **kwargs # type: Any\n):\n", + "signature": "def cancel_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n cancellation_reason, # type: \"_models.CancellationReason\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", "doc": "\"\"\"Cancel order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param cancellation_reason: Reason for cancellation.\n:type cancellation_reason: ~azure.mgmt.edgeorder.v2021_12_01.models.CancellationReason\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -417,25 +416,25 @@ }, "_return_order_item_initial" : { "sync": { - "signature": "def _return_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _return_order_item_initial(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _return_order_item_initial(\n self,\n order_item_name: str,\n resource_group_name: str,\n return_order_item_details: \"_models.ReturnOrderItemDetails\",\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, return_order_item_details" }, "begin_return_order_item" : { "sync": { - "signature": "def begin_return_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_return_order_item(\n self,\n order_item_name, # type: str\n resource_group_name, # type: str\n return_order_item_details, # type: \"_models.ReturnOrderItemDetails\"\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling. Pass in False for this\n operation to not poll, or pass in your own initialized polling object for a personal polling\n strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_return_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n return_order_item_details: \"_models.ReturnOrderItemDetails\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Return order item.\n\n:param order_item_name: The name of the order item.\n:type order_item_name: str\n:param resource_group_name: The name of the resource group. The name is case insensitive.\n:type resource_group_name: str\n:param return_order_item_details: Return order item CurrentStatus.\n:type return_order_item_details:\n ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "order_item_name, resource_group_name, return_order_item_details" } diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_patch.py new file mode 100644 index 0000000000000..74e48ecd07cf3 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_vendor.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_vendor.py new file mode 100644 index 0000000000000..138f663c53a4e --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_version.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_version.py index c47f66669f1bf..e5754a47ce68f 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_version.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/__init__.py index b8c98d8145e85..02e64d7ffdd9b 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/__init__.py @@ -8,3 +8,8 @@ from ._edge_order_management_client import EdgeOrderManagementClient __all__ = ['EdgeOrderManagementClient'] + +# `._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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_configuration.py index 4d23b41124c2b..e87cb28de5635 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_configuration.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/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(EdgeOrderManagementClientConfiguration, 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(EdgeOrderManagementClientConfiguration, 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_edge_order_management_client.py index 5c0a179b37890..59735f19df04c 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_edge_order_management_client.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_edge_order_management_client.py @@ -6,20 +6,20 @@ # 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.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - +from .. import models from ._configuration import EdgeOrderManagementClientConfiguration from .operations import EdgeOrderManagementClientOperationsMixin -from .. import models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): """The EdgeOrder Client. @@ -28,44 +28,53 @@ class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. :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 = EdgeOrderManagementClientConfiguration(credential, subscription_id, **kwargs) + self._config = EdgeOrderManagementClientConfiguration(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 - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> 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.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + 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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_patch.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_patch.py new file mode 100644 index 0000000000000..74e48ecd07cf3 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/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/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/_edge_order_management_client_operations.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/_edge_order_management_client_operations.py index 0238d927339ed..cf381452b474a 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/_edge_order_management_client_operations.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/_edge_order_management_client_operations.py @@ -5,24 +5,30 @@ # 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._edge_order_management_client_operations import build_cancel_order_item_request, build_create_address_request_initial, build_create_order_item_request_initial, build_delete_address_by_name_request_initial, build_delete_order_item_by_name_request_initial, build_get_address_by_name_request, build_get_order_by_name_request, build_get_order_item_by_name_request, build_list_addresses_at_resource_group_level_request, build_list_addresses_at_subscription_level_request, build_list_configurations_request, build_list_operations_request, build_list_order_at_resource_group_level_request, build_list_order_at_subscription_level_request, build_list_order_items_at_resource_group_level_request, build_list_order_items_at_subscription_level_request, build_list_product_families_metadata_request, build_list_product_families_request, build_return_order_item_request_initial, build_update_address_request_initial, build_update_order_item_request_initial T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class EdgeOrderManagementClientOperationsMixin: + @distributed_trace def list_operations( self, **kwargs: Any @@ -31,7 +37,8 @@ def list_operations( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -39,30 +46,27 @@ def list_operations( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_operations.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_operations_request( + template_url=self.list_operations.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_operations_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) @@ -75,17 +79,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_operations.metadata = {'url': '/providers/Microsoft.EdgeOrder/operations'} # type: ignore + @distributed_trace def list_addresses_at_subscription_level( self, filter: Optional[str] = None, @@ -102,7 +108,8 @@ def list_addresses_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -110,38 +117,33 @@ def list_addresses_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_addresses_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_subscription_level.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_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -154,17 +156,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace def list_product_families( self, product_families_request: "_models.ProductFamiliesRequest", @@ -184,54 +188,50 @@ def list_product_families( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ProductFamilies or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamilies"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_product_families.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + template_url=self.list_product_families.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(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + 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('ProductFamilies', pipeline_response) + deserialized = self._deserialize("ProductFamilies", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -244,17 +244,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies'} # type: ignore + @distributed_trace def list_configurations( self, configurations_request: "_models.ConfigurationsRequest", @@ -271,52 +273,48 @@ def list_configurations( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Configurations or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configurations"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_configurations.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + template_url=self.list_configurations.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(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + 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('Configurations', pipeline_response) + deserialized = self._deserialize("Configurations", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -329,17 +327,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listConfigurations'} # type: ignore + @distributed_trace def list_product_families_metadata( self, skip_token: Optional[str] = None, @@ -351,8 +351,10 @@ def list_product_families_metadata( the next page in the list of product families metadata. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] + :return: An iterator like instance of either ProductFamiliesMetadata or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamiliesMetadata"] @@ -360,36 +362,31 @@ def list_product_families_metadata( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_product_families_metadata.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.post(url, query_parameters, header_parameters) + + request = build_list_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_product_families_metadata.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_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('ProductFamiliesMetadata', pipeline_response) + deserialized = self._deserialize("ProductFamiliesMetadata", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -402,17 +399,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata'} # type: ignore + @distributed_trace def list_order_at_subscription_level( self, skip_token: Optional[str] = None, @@ -425,7 +424,8 @@ def list_order_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -433,36 +433,31 @@ def list_order_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_order_at_subscription_level.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_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -475,17 +470,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace def list_order_items_at_subscription_level( self, filter: Optional[str] = None, @@ -507,8 +504,10 @@ def list_order_items_at_subscription_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -516,40 +515,35 @@ def list_order_items_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_items_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_subscription_level.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_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -562,17 +556,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace def list_addresses_at_resource_group_level( self, resource_group_name: str, @@ -592,7 +588,8 @@ def list_addresses_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -600,39 +597,35 @@ def list_addresses_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_addresses_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_resource_group_level.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_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -645,17 +638,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace_async async def get_address_by_name( self, address_name: str, @@ -680,33 +675,23 @@ async def get_address_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self.get_address_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self.get_address_by_name.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.failsafe_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('AddressResource', pipeline_response) @@ -715,8 +700,10 @@ async def get_address_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + async def _create_address_initial( self, address_name: str, @@ -729,39 +716,28 @@ async def _create_address_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(address_resource, 'AddressResource') + + request = build_create_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_address_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(address_resource, 'AddressResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -771,8 +747,11 @@ async def _create_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace_async async def begin_create_address( self, address_name: str, @@ -793,15 +772,20 @@ async def begin_create_address( :type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] + :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -813,27 +797,21 @@ async def begin_create_address( address_name=address_name, resource_group_name=resource_group_name, address_resource=address_resource, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -845,6 +823,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore async def _delete_address_by_name_initial( @@ -858,40 +837,31 @@ async def _delete_address_by_name_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self._delete_address_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_address_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_address_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace_async async def begin_delete_address_by_name( self, address_name: str, @@ -908,15 +878,17 @@ async def begin_delete_address_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -930,21 +902,14 @@ async def begin_delete_address_by_name( 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 = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -956,6 +921,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore async def _update_address_initial( @@ -971,41 +937,29 @@ async def _update_address_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') + + request = build_update_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_address_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1015,8 +969,11 @@ async def _update_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace_async async def begin_update_address( self, address_name: str, @@ -1040,15 +997,20 @@ async def begin_update_address( :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :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 AddressResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] + :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1061,27 +1023,21 @@ async def begin_update_address( resource_group_name=resource_group_name, address_update_parameter=address_update_parameter, if_match=if_match, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1093,8 +1049,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + @distributed_trace def list_order_at_resource_group_level( self, resource_group_name: str, @@ -1110,7 +1068,8 @@ def list_order_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -1118,37 +1077,33 @@ def list_order_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + template_url=self.list_order_at_resource_group_level.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_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1161,17 +1116,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace_async async def get_order_by_name( self, order_name: str, @@ -1197,34 +1154,24 @@ async def get_order_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self.get_order_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderName': self._serialize.url("order_name", order_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'location': self._serialize.url("location", location, 'str', min_length=1), - } - url = self._client.format_url(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_order_by_name_request( + order_name=order_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + template_url=self.get_order_by_name.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.failsafe_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('OrderResource', pipeline_response) @@ -1233,8 +1180,11 @@ async def get_order_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName}'} # type: ignore + + @distributed_trace def list_order_items_at_resource_group_level( self, resource_group_name: str, @@ -1259,8 +1209,10 @@ def list_order_items_at_resource_group_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -1268,41 +1220,37 @@ def list_order_items_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_items_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_resource_group_level.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_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1315,17 +1263,19 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace_async async def get_order_item_by_name( self, order_item_name: str, @@ -1354,35 +1304,24 @@ async def get_order_item_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self.get_order_item_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_order_item_by_name_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + expand=expand, + template_url=self.get_order_item_by_name.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.failsafe_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('OrderItemResource', pipeline_response) @@ -1391,8 +1330,10 @@ async def get_order_item_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + async def _create_order_item_initial( self, order_item_name: str, @@ -1405,39 +1346,28 @@ async def _create_order_item_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(order_item_resource, 'OrderItemResource') + + request = build_create_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_order_item_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(order_item_resource, 'OrderItemResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1447,8 +1377,11 @@ async def _create_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace_async async def begin_create_order_item( self, order_item_name: str, @@ -1467,15 +1400,20 @@ async def begin_create_order_item( :type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1487,27 +1425,21 @@ async def begin_create_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, order_item_resource=order_item_resource, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1519,6 +1451,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore async def _delete_order_item_by_name_initial( @@ -1532,40 +1465,31 @@ async def _delete_order_item_by_name_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self._delete_order_item_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_order_item_by_name_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_order_item_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_order_item_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace_async async def begin_delete_order_item_by_name( self, order_item_name: str, @@ -1580,15 +1504,17 @@ async def begin_delete_order_item_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1602,21 +1528,14 @@ async def begin_delete_order_item_by_name( 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1628,6 +1547,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore async def _update_order_item_initial( @@ -1643,41 +1563,29 @@ async def _update_order_item_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') + + request = build_update_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_order_item_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1687,8 +1595,11 @@ async def _update_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace_async async def begin_update_order_item( self, order_item_name: str, @@ -1704,21 +1615,27 @@ async def begin_update_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param order_item_update_parameter: order item update parameters from request body. - :type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter + :type order_item_update_parameter: + ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1731,27 +1648,21 @@ async def begin_update_order_item( resource_group_name=resource_group_name, order_item_update_parameter=order_item_update_parameter, if_match=if_match, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1763,8 +1674,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + @distributed_trace_async async def cancel_order_item( self, order_item_name: str, @@ -1790,38 +1703,28 @@ async def cancel_order_item( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.cancel_order_item.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(cancellation_reason, 'CancellationReason') + + request = build_cancel_order_item_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self.cancel_order_item.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(cancellation_reason, 'CancellationReason') - 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, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1829,6 +1732,7 @@ async def cancel_order_item( cancel_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/cancel'} # type: ignore + async def _return_order_item_initial( self, order_item_name: str, @@ -1841,45 +1745,36 @@ async def _return_order_item_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._return_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(return_order_item_details, 'ReturnOrderItemDetails') + + request = build_return_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._return_order_item_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(return_order_item_details, 'ReturnOrderItemDetails') - 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.failsafe_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, {}) _return_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore + + @distributed_trace_async async def begin_return_order_item( self, order_item_name: str, @@ -1894,18 +1789,22 @@ async def begin_return_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param return_order_item_details: Return order item CurrentStatus. - :type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails + :type return_order_item_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1917,24 +1816,18 @@ async def begin_return_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, return_order_item_details=return_order_item_details, + 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1946,4 +1839,5 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_return_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/__init__.py index 4ad497e9c13df..50e3bb1f90098 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/__init__.py @@ -6,150 +6,78 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -try: - from ._models_py3 import AddressDetails - from ._models_py3 import AddressProperties - from ._models_py3 import AddressResource - from ._models_py3 import AddressResourceList - from ._models_py3 import AddressUpdateParameter - from ._models_py3 import AvailabilityInformation - from ._models_py3 import BasicInformation - from ._models_py3 import BillingMeterDetails - from ._models_py3 import CancellationReason - from ._models_py3 import CommonProperties - from ._models_py3 import Configuration - from ._models_py3 import ConfigurationFilters - from ._models_py3 import ConfigurationProperties - from ._models_py3 import Configurations - from ._models_py3 import ConfigurationsRequest - from ._models_py3 import ContactDetails - from ._models_py3 import CostInformation - from ._models_py3 import CustomerSubscriptionDetails - from ._models_py3 import CustomerSubscriptionRegisteredFeatures - from ._models_py3 import Description - from ._models_py3 import DeviceDetails - from ._models_py3 import Dimensions - from ._models_py3 import DisplayInfo - from ._models_py3 import EncryptionPreferences - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorDetail - from ._models_py3 import ErrorResponse - from ._models_py3 import FilterableProperty - from ._models_py3 import ForwardShippingDetails - from ._models_py3 import HierarchyInformation - from ._models_py3 import ImageInformation - from ._models_py3 import Link - from ._models_py3 import ManagementResourcePreferences - from ._models_py3 import MeterDetails - from ._models_py3 import NotificationPreference - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import OrderItemDetails - from ._models_py3 import OrderItemResource - from ._models_py3 import OrderItemResourceList - from ._models_py3 import OrderItemUpdateParameter - from ._models_py3 import OrderResource - from ._models_py3 import OrderResourceList - from ._models_py3 import Pav2MeterDetails - from ._models_py3 import Preferences - from ._models_py3 import Product - from ._models_py3 import ProductDetails - from ._models_py3 import ProductFamilies - from ._models_py3 import ProductFamiliesMetadata - from ._models_py3 import ProductFamiliesMetadataDetails - from ._models_py3 import ProductFamiliesRequest - from ._models_py3 import ProductFamily - from ._models_py3 import ProductFamilyProperties - from ._models_py3 import ProductLine - from ._models_py3 import ProductLineProperties - from ._models_py3 import ProductProperties - from ._models_py3 import ProxyResource - from ._models_py3 import PurchaseMeterDetails - from ._models_py3 import Resource - from ._models_py3 import ResourceIdentity - from ._models_py3 import ResourceProviderDetails - from ._models_py3 import ReturnOrderItemDetails - from ._models_py3 import ReverseShippingDetails - from ._models_py3 import ShippingAddress - from ._models_py3 import ShippingDetails - from ._models_py3 import Specification - from ._models_py3 import StageDetails - from ._models_py3 import SystemData - from ._models_py3 import TrackedResource - from ._models_py3 import TransportPreferences -except (SyntaxError, ImportError): - from ._models import AddressDetails # type: ignore - from ._models import AddressProperties # type: ignore - from ._models import AddressResource # type: ignore - from ._models import AddressResourceList # type: ignore - from ._models import AddressUpdateParameter # type: ignore - from ._models import AvailabilityInformation # type: ignore - from ._models import BasicInformation # type: ignore - from ._models import BillingMeterDetails # type: ignore - from ._models import CancellationReason # type: ignore - from ._models import CommonProperties # type: ignore - from ._models import Configuration # type: ignore - from ._models import ConfigurationFilters # type: ignore - from ._models import ConfigurationProperties # type: ignore - from ._models import Configurations # type: ignore - from ._models import ConfigurationsRequest # type: ignore - from ._models import ContactDetails # type: ignore - from ._models import CostInformation # type: ignore - from ._models import CustomerSubscriptionDetails # type: ignore - from ._models import CustomerSubscriptionRegisteredFeatures # type: ignore - from ._models import Description # type: ignore - from ._models import DeviceDetails # type: ignore - from ._models import Dimensions # type: ignore - from ._models import DisplayInfo # type: ignore - from ._models import EncryptionPreferences # type: ignore - from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorDetail # type: ignore - from ._models import ErrorResponse # type: ignore - from ._models import FilterableProperty # type: ignore - from ._models import ForwardShippingDetails # type: ignore - from ._models import HierarchyInformation # type: ignore - from ._models import ImageInformation # type: ignore - from ._models import Link # type: ignore - from ._models import ManagementResourcePreferences # type: ignore - from ._models import MeterDetails # type: ignore - from ._models import NotificationPreference # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationListResult # type: ignore - from ._models import OrderItemDetails # type: ignore - from ._models import OrderItemResource # type: ignore - from ._models import OrderItemResourceList # type: ignore - from ._models import OrderItemUpdateParameter # type: ignore - from ._models import OrderResource # type: ignore - from ._models import OrderResourceList # type: ignore - from ._models import Pav2MeterDetails # type: ignore - from ._models import Preferences # type: ignore - from ._models import Product # type: ignore - from ._models import ProductDetails # type: ignore - from ._models import ProductFamilies # type: ignore - from ._models import ProductFamiliesMetadata # type: ignore - from ._models import ProductFamiliesMetadataDetails # type: ignore - from ._models import ProductFamiliesRequest # type: ignore - from ._models import ProductFamily # type: ignore - from ._models import ProductFamilyProperties # type: ignore - from ._models import ProductLine # type: ignore - from ._models import ProductLineProperties # type: ignore - from ._models import ProductProperties # type: ignore - from ._models import ProxyResource # type: ignore - from ._models import PurchaseMeterDetails # type: ignore - from ._models import Resource # type: ignore - from ._models import ResourceIdentity # type: ignore - from ._models import ResourceProviderDetails # type: ignore - from ._models import ReturnOrderItemDetails # type: ignore - from ._models import ReverseShippingDetails # type: ignore - from ._models import ShippingAddress # type: ignore - from ._models import ShippingDetails # type: ignore - from ._models import Specification # type: ignore - from ._models import StageDetails # type: ignore - from ._models import SystemData # type: ignore - from ._models import TrackedResource # type: ignore - from ._models import TransportPreferences # type: ignore +from ._models_py3 import AddressDetails +from ._models_py3 import AddressProperties +from ._models_py3 import AddressResource +from ._models_py3 import AddressResourceList +from ._models_py3 import AddressUpdateParameter +from ._models_py3 import AvailabilityInformation +from ._models_py3 import BasicInformation +from ._models_py3 import BillingMeterDetails +from ._models_py3 import CancellationReason +from ._models_py3 import CommonProperties +from ._models_py3 import Configuration +from ._models_py3 import ConfigurationFilters +from ._models_py3 import ConfigurationProperties +from ._models_py3 import Configurations +from ._models_py3 import ConfigurationsRequest +from ._models_py3 import ContactDetails +from ._models_py3 import CostInformation +from ._models_py3 import CustomerSubscriptionDetails +from ._models_py3 import CustomerSubscriptionRegisteredFeatures +from ._models_py3 import Description +from ._models_py3 import DeviceDetails +from ._models_py3 import Dimensions +from ._models_py3 import DisplayInfo +from ._models_py3 import EncryptionPreferences +from ._models_py3 import ErrorAdditionalInfo +from ._models_py3 import ErrorDetail +from ._models_py3 import ErrorResponse +from ._models_py3 import FilterableProperty +from ._models_py3 import ForwardShippingDetails +from ._models_py3 import HierarchyInformation +from ._models_py3 import ImageInformation +from ._models_py3 import Link +from ._models_py3 import ManagementResourcePreferences +from ._models_py3 import MeterDetails +from ._models_py3 import NotificationPreference +from ._models_py3 import Operation +from ._models_py3 import OperationDisplay +from ._models_py3 import OperationListResult +from ._models_py3 import OrderItemDetails +from ._models_py3 import OrderItemResource +from ._models_py3 import OrderItemResourceList +from ._models_py3 import OrderItemUpdateParameter +from ._models_py3 import OrderResource +from ._models_py3 import OrderResourceList +from ._models_py3 import Pav2MeterDetails +from ._models_py3 import Preferences +from ._models_py3 import Product +from ._models_py3 import ProductDetails +from ._models_py3 import ProductFamilies +from ._models_py3 import ProductFamiliesMetadata +from ._models_py3 import ProductFamiliesMetadataDetails +from ._models_py3 import ProductFamiliesRequest +from ._models_py3 import ProductFamily +from ._models_py3 import ProductFamilyProperties +from ._models_py3 import ProductLine +from ._models_py3 import ProductLineProperties +from ._models_py3 import ProductProperties +from ._models_py3 import ProxyResource +from ._models_py3 import PurchaseMeterDetails +from ._models_py3 import Resource +from ._models_py3 import ResourceIdentity +from ._models_py3 import ResourceProviderDetails +from ._models_py3 import ReturnOrderItemDetails +from ._models_py3 import ReverseShippingDetails +from ._models_py3 import ShippingAddress +from ._models_py3 import ShippingDetails +from ._models_py3 import Specification +from ._models_py3 import StageDetails +from ._models_py3 import SystemData +from ._models_py3 import TrackedResource +from ._models_py3 import TransportPreferences + from ._edge_order_management_client_enums import ( ActionStatusEnum, diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_edge_order_management_client_enums.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_edge_order_management_client_enums.py index 9ca4d57a1387e..2c5de0b2e0db5 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_edge_order_management_client_enums.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_edge_order_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 ActionStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ActionStatusEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes whether the order item is deletable or not. """ @@ -35,13 +20,13 @@ class ActionStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Not Allowed flag. NOT_ALLOWED = "NotAllowed" -class ActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ActionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. """ INTERNAL = "Internal" -class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AddressType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of address. """ @@ -52,7 +37,7 @@ class AddressType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Commercial Address. COMMERCIAL = "Commercial" -class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AddressValidationStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Status of address validation """ @@ -63,7 +48,7 @@ class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum #: Address provided is ambiguous, please choose one of the alternate addresses returned. AMBIGUOUS = "Ambiguous" -class AvailabilityStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AvailabilityStage(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Current availability stage of the product. Availability stage """ @@ -80,7 +65,7 @@ class AvailabilityStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Product is not available. UNAVAILABLE = "Unavailable" -class BillingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class BillingType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Represents billing type. """ @@ -89,7 +74,7 @@ class BillingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Purchase billing. PURCHASE = "Purchase" -class ChargingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ChargingType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Charging type. """ @@ -98,7 +83,7 @@ class ChargingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Per device charging type. PER_DEVICE = "PerDevice" -class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class CreatedByType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type of identity that created the resource. """ @@ -107,14 +92,14 @@ class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" -class DescriptionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DescriptionType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of description. """ #: Base description. BASE = "Base" -class DisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DisabledReason(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Reason why the product is disabled. """ @@ -136,7 +121,7 @@ class DisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: The product is out of stock. OUT_OF_STOCK = "OutOfStock" -class DoubleEncryptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DoubleEncryptionStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Double encryption status as entered by the customer. It is compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. """ @@ -146,7 +131,7 @@ class DoubleEncryptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) #: Double encryption is enabled. ENABLED = "Enabled" -class ImageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ImageType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of the image """ @@ -157,7 +142,7 @@ class ImageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Generic image. GENERIC_IMAGE = "GenericImage" -class LengthHeightUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class LengthHeightUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Unit for the dimensions of length, height and width. """ @@ -166,7 +151,7 @@ class LengthHeightUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Centimeter. CM = "CM" -class LinkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class LinkType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of link """ @@ -183,7 +168,7 @@ class LinkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Link to sign up for products. SIGN_UP = "SignUp" -class MeteringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MeteringType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Represents Metering type (eg one-time or recurrent) """ @@ -194,7 +179,7 @@ class MeteringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Adhoc billing. ADHOC = "Adhoc" -class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class NotificationStageName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Name of the stage. """ @@ -203,7 +188,7 @@ class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) #: Notification at order item delivered to customer. DELIVERED = "Delivered" -class OrderItemCancellationEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OrderItemCancellationEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes whether the order item is cancellable or not. """ @@ -214,7 +199,7 @@ class OrderItemCancellationEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, En #: Order item not cancellable. NOT_CANCELLABLE = "NotCancellable" -class OrderItemReturnEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OrderItemReturnEnum(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes whether the order item is returnable or not. """ @@ -225,7 +210,7 @@ class OrderItemReturnEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Order item not returnable. NOT_RETURNABLE = "NotReturnable" -class OrderItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OrderItemType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Order item type. """ @@ -234,7 +219,7 @@ class OrderItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Rental OrderItem. RENTAL = "Rental" -class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Origin(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" """ @@ -243,7 +228,7 @@ class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SYSTEM = "system" USER_SYSTEM = "user,system" -class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StageName(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Stage name """ @@ -272,7 +257,7 @@ class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Order has been cancelled. CANCELLED = "Cancelled" -class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StageStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Stage status. """ @@ -289,7 +274,7 @@ class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Stage is cancelling. CANCELLING = "Cancelling" -class SupportedFilterTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SupportedFilterTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of product filter. """ @@ -298,7 +283,7 @@ class SupportedFilterTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Double encryption status. DOUBLE_ENCRYPTION_STATUS = "DoubleEncryptionStatus" -class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TransportShipmentTypes(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Indicates Shipment Logistics type that the customer preferred. """ @@ -307,7 +292,7 @@ class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) #: Shipment Logistics is handled by Microsoft. MICROSOFT_MANAGED = "MicrosoftManaged" -class WeightMeasurementUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WeightMeasurementUnit(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Unit for the dimensions of weight. """ diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models.py deleted file mode 100644 index ae4b56047e319..0000000000000 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models.py +++ /dev/null @@ -1,2948 +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 AddressDetails(msrest.serialization.Model): - """Address details for an order item. - - 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. - - :param forward_address: Required. Customer address and contact details. It should be address - resource. - :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties - :ivar return_address: Return shipping address. - :vartype return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties - """ - - _validation = { - 'forward_address': {'required': True}, - 'return_address': {'readonly': True}, - } - - _attribute_map = { - 'forward_address': {'key': 'forwardAddress', 'type': 'AddressProperties'}, - 'return_address': {'key': 'returnAddress', 'type': 'AddressProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressDetails, self).__init__(**kwargs) - self.forward_address = kwargs['forward_address'] - self.return_address = None - - -class AddressProperties(msrest.serialization.Model): - """Address 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. - - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails - :ivar address_validation_status: Status of address validation. Possible values include: - "Valid", "Invalid", "Ambiguous". - :vartype address_validation_status: str or - ~azure.mgmt.edgeorder.v2021_12_01.models.AddressValidationStatus - """ - - _validation = { - 'contact_details': {'required': True}, - 'address_validation_status': {'readonly': True}, - } - - _attribute_map = { - 'shipping_address': {'key': 'shippingAddress', 'type': 'ShippingAddress'}, - 'contact_details': {'key': 'contactDetails', 'type': 'ContactDetails'}, - 'address_validation_status': {'key': 'addressValidationStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressProperties, self).__init__(**kwargs) - self.shipping_address = kwargs.get('shipping_address', None) - self.contact_details = kwargs['contact_details'] - self.address_validation_status = None - - -class Resource(msrest.serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: 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'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - - 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: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs['location'] - - -class AddressResource(TrackedResource): - """Address Resource. - - 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: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails - :ivar address_validation_status: Status of address validation. Possible values include: - "Valid", "Invalid", "Ambiguous". - :vartype address_validation_status: str or - ~azure.mgmt.edgeorder.v2021_12_01.models.AddressValidationStatus - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'contact_details': {'required': True}, - 'address_validation_status': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'ShippingAddress'}, - 'contact_details': {'key': 'properties.contactDetails', 'type': 'ContactDetails'}, - 'address_validation_status': {'key': 'properties.addressValidationStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressResource, self).__init__(**kwargs) - self.system_data = None - self.shipping_address = kwargs.get('shipping_address', None) - self.contact_details = kwargs['contact_details'] - self.address_validation_status = None - - -class AddressResourceList(msrest.serialization.Model): - """Address Resource Collection. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of address resources. - :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :param next_link: Link for the next set of job resources. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[AddressResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressResourceList, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class AddressUpdateParameter(msrest.serialization.Model): - """The Address update parameters. - - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags - can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress - :param contact_details: Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'shipping_address': {'key': 'properties.shippingAddress', 'type': 'ShippingAddress'}, - 'contact_details': {'key': 'properties.contactDetails', 'type': 'ContactDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressUpdateParameter, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.shipping_address = kwargs.get('shipping_address', None) - self.contact_details = kwargs.get('contact_details', None) - - -class AvailabilityInformation(msrest.serialization.Model): - """Availability information of a product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar availability_stage: Current availability stage of the product. Availability stage. - Possible values include: "Available", "ComingSoon", "Preview", "Deprecated", "Signup", - "Unavailable". - :vartype availability_stage: str or ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityStage - :ivar disabled_reason: Reason why the product is disabled. Possible values include: "None", - "Country", "Region", "Feature", "OfferType", "NoSubscriptionInfo", "NotAvailable", - "OutOfStock". - :vartype disabled_reason: str or ~azure.mgmt.edgeorder.v2021_12_01.models.DisabledReason - :ivar disabled_reason_message: Message for why the product is disabled. - :vartype disabled_reason_message: str - """ - - _validation = { - 'availability_stage': {'readonly': True}, - 'disabled_reason': {'readonly': True}, - 'disabled_reason_message': {'readonly': True}, - } - - _attribute_map = { - 'availability_stage': {'key': 'availabilityStage', 'type': 'str'}, - 'disabled_reason': {'key': 'disabledReason', 'type': 'str'}, - 'disabled_reason_message': {'key': 'disabledReasonMessage', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailabilityInformation, self).__init__(**kwargs) - self.availability_stage = None - self.disabled_reason = None - self.disabled_reason_message = None - - -class BasicInformation(msrest.serialization.Model): - """Basic information for any product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - } - - def __init__( - self, - **kwargs - ): - super(BasicInformation, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - - -class BillingMeterDetails(msrest.serialization.Model): - """Holds billing meter details for each type of billing. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Represents Billing type name. - :vartype name: str - :ivar meter_details: Represents MeterDetails. - :vartype meter_details: ~azure.mgmt.edgeorder.v2021_12_01.models.MeterDetails - :ivar metering_type: Represents Metering type (eg one-time or recurrent). Possible values - include: "OneTime", "Recurring", "Adhoc". - :vartype metering_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.MeteringType - :ivar frequency: Frequency of recurrence. - :vartype frequency: str - """ - - _validation = { - 'name': {'readonly': True}, - 'meter_details': {'readonly': True}, - 'metering_type': {'readonly': True}, - 'frequency': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'meter_details': {'key': 'meterDetails', 'type': 'MeterDetails'}, - 'metering_type': {'key': 'meteringType', 'type': 'str'}, - 'frequency': {'key': 'frequency', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BillingMeterDetails, self).__init__(**kwargs) - self.name = None - self.meter_details = None - self.metering_type = None - self.frequency = None - - -class CancellationReason(msrest.serialization.Model): - """Reason for cancellation. - - All required parameters must be populated in order to send to Azure. - - :param reason: Required. Reason for cancellation. - :type reason: str - """ - - _validation = { - 'reason': {'required': True}, - } - - _attribute_map = { - 'reason': {'key': 'reason', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CancellationReason, self).__init__(**kwargs) - self.reason = kwargs['reason'] - - -class CommonProperties(BasicInformation): - """Represents common properties across product hierarchy. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - } - - def __init__( - self, - **kwargs - ): - super(CommonProperties, self).__init__(**kwargs) - self.filterable_properties = None - - -class Configuration(msrest.serialization.Model): - """Configuration object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~azure.mgmt.edgeorder.v2021_12_01.models.Specification] - :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~azure.mgmt.edgeorder.v2021_12_01.models.Dimensions - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'specifications': {'readonly': True}, - 'dimensions': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'specifications': {'key': 'properties.specifications', 'type': '[Specification]'}, - 'dimensions': {'key': 'properties.dimensions', 'type': 'Dimensions'}, - } - - def __init__( - self, - **kwargs - ): - super(Configuration, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.specifications = None - self.dimensions = None - - -class ConfigurationFilters(msrest.serialization.Model): - """Configuration filters. - - All required parameters must be populated in order to send to Azure. - - :param hierarchy_information: Required. Product hierarchy information. - :type hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :param filterable_property: Filters specific to product. - :type filterable_property: list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - """ - - _validation = { - 'hierarchy_information': {'required': True}, - } - - _attribute_map = { - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_property': {'key': 'filterableProperty', 'type': '[FilterableProperty]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfigurationFilters, self).__init__(**kwargs) - self.hierarchy_information = kwargs['hierarchy_information'] - self.filterable_property = kwargs.get('filterable_property', None) - - -class ConfigurationProperties(CommonProperties): - """Properties of configuration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~azure.mgmt.edgeorder.v2021_12_01.models.Specification] - :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~azure.mgmt.edgeorder.v2021_12_01.models.Dimensions - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'specifications': {'readonly': True}, - 'dimensions': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'specifications': {'key': 'specifications', 'type': '[Specification]'}, - 'dimensions': {'key': 'dimensions', 'type': 'Dimensions'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfigurationProperties, self).__init__(**kwargs) - self.specifications = None - self.dimensions = None - - -class Configurations(msrest.serialization.Model): - """The list of configurations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of configurations. - :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] - :param next_link: Link for the next set of configurations. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Configuration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Configurations, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class ConfigurationsRequest(msrest.serialization.Model): - """Configuration request object. - - All required parameters must be populated in order to send to Azure. - - :param configuration_filters: Required. Holds details about product hierarchy information and - filterable property. - :type configuration_filters: - list[~azure.mgmt.edgeorder.v2021_12_01.models.ConfigurationFilters] - :param customer_subscription_details: Customer subscription properties. Clients can display - available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: - ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails - """ - - _validation = { - 'configuration_filters': {'required': True, 'unique': True}, - } - - _attribute_map = { - 'configuration_filters': {'key': 'configurationFilters', 'type': '[ConfigurationFilters]'}, - 'customer_subscription_details': {'key': 'customerSubscriptionDetails', 'type': 'CustomerSubscriptionDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(ConfigurationsRequest, self).__init__(**kwargs) - self.configuration_filters = kwargs['configuration_filters'] - self.customer_subscription_details = kwargs.get('customer_subscription_details', None) - - -class ContactDetails(msrest.serialization.Model): - """Contact Details. - - All required parameters must be populated in order to send to Azure. - - :param contact_name: Required. Contact name of the person. - :type contact_name: str - :param phone: Required. Phone number of the contact person. - :type phone: str - :param phone_extension: Phone extension number of the contact person. - :type phone_extension: str - :param mobile: Mobile number of the contact person. - :type mobile: str - :param email_list: Required. List of Email-ids to be notified about job progress. - :type email_list: list[str] - """ - - _validation = { - 'contact_name': {'required': True}, - 'phone': {'required': True}, - 'email_list': {'required': True}, - } - - _attribute_map = { - 'contact_name': {'key': 'contactName', 'type': 'str'}, - 'phone': {'key': 'phone', 'type': 'str'}, - 'phone_extension': {'key': 'phoneExtension', 'type': 'str'}, - 'mobile': {'key': 'mobile', 'type': 'str'}, - 'email_list': {'key': 'emailList', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ContactDetails, self).__init__(**kwargs) - self.contact_name = kwargs['contact_name'] - self.phone = kwargs['phone'] - self.phone_extension = kwargs.get('phone_extension', None) - self.mobile = kwargs.get('mobile', None) - self.email_list = kwargs['email_list'] - - -class CostInformation(msrest.serialization.Model): - """Cost information for the product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar billing_meter_details: Details on the various billing aspects for the product system. - :vartype billing_meter_details: - list[~azure.mgmt.edgeorder.v2021_12_01.models.BillingMeterDetails] - :ivar billing_info_url: Default url to display billing information. - :vartype billing_info_url: str - """ - - _validation = { - 'billing_meter_details': {'readonly': True}, - 'billing_info_url': {'readonly': True}, - } - - _attribute_map = { - 'billing_meter_details': {'key': 'billingMeterDetails', 'type': '[BillingMeterDetails]'}, - 'billing_info_url': {'key': 'billingInfoUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CostInformation, self).__init__(**kwargs) - self.billing_meter_details = None - self.billing_info_url = None - - -class CustomerSubscriptionDetails(msrest.serialization.Model): - """Holds Customer subscription details. Clients can display available products to unregistered customers by explicitly passing subscription details. - - All required parameters must be populated in order to send to Azure. - - :param registered_features: List of registered feature flags for subscription. - :type registered_features: - list[~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionRegisteredFeatures] - :param location_placement_id: Location placement Id of a subscription. - :type location_placement_id: str - :param quota_id: Required. Quota ID of a subscription. - :type quota_id: str - """ - - _validation = { - 'quota_id': {'required': True}, - } - - _attribute_map = { - 'registered_features': {'key': 'registeredFeatures', 'type': '[CustomerSubscriptionRegisteredFeatures]'}, - 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, - 'quota_id': {'key': 'quotaId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CustomerSubscriptionDetails, self).__init__(**kwargs) - self.registered_features = kwargs.get('registered_features', None) - self.location_placement_id = kwargs.get('location_placement_id', None) - self.quota_id = kwargs['quota_id'] - - -class CustomerSubscriptionRegisteredFeatures(msrest.serialization.Model): - """Represents subscription registered features. - - :param name: Name of subscription registered feature. - :type name: str - :param state: State of subscription registered feature. - :type state: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CustomerSubscriptionRegisteredFeatures, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.state = kwargs.get('state', None) - - -class Description(msrest.serialization.Model): - """Description related properties of a product system. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar description_type: Type of description. Possible values include: "Base". - :vartype description_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.DescriptionType - :ivar short_description: Short description of the product system. - :vartype short_description: str - :ivar long_description: Long description of the product system. - :vartype long_description: str - :ivar keywords: Keywords for the product system. - :vartype keywords: list[str] - :ivar attributes: Attributes for the product system. - :vartype attributes: list[str] - :ivar links: Links for the product system. - :vartype links: list[~azure.mgmt.edgeorder.v2021_12_01.models.Link] - """ - - _validation = { - 'description_type': {'readonly': True}, - 'short_description': {'readonly': True}, - 'long_description': {'readonly': True}, - 'keywords': {'readonly': True}, - 'attributes': {'readonly': True}, - 'links': {'readonly': True}, - } - - _attribute_map = { - 'description_type': {'key': 'descriptionType', 'type': 'str'}, - 'short_description': {'key': 'shortDescription', 'type': 'str'}, - 'long_description': {'key': 'longDescription', 'type': 'str'}, - 'keywords': {'key': 'keywords', 'type': '[str]'}, - 'attributes': {'key': 'attributes', 'type': '[str]'}, - 'links': {'key': 'links', 'type': '[Link]'}, - } - - def __init__( - self, - **kwargs - ): - super(Description, self).__init__(**kwargs) - self.description_type = None - self.short_description = None - self.long_description = None - self.keywords = None - self.attributes = None - self.links = None - - -class DeviceDetails(msrest.serialization.Model): - """Device details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar serial_number: device serial number. - :vartype serial_number: str - :ivar management_resource_id: Management Resource Id. - :vartype management_resource_id: str - :ivar management_resource_tenant_id: Management Resource Tenant ID. - :vartype management_resource_tenant_id: str - """ - - _validation = { - 'serial_number': {'readonly': True}, - 'management_resource_id': {'readonly': True}, - 'management_resource_tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'serial_number': {'key': 'serialNumber', 'type': 'str'}, - 'management_resource_id': {'key': 'managementResourceId', 'type': 'str'}, - 'management_resource_tenant_id': {'key': 'managementResourceTenantId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DeviceDetails, self).__init__(**kwargs) - self.serial_number = None - self.management_resource_id = None - self.management_resource_tenant_id = None - - -class Dimensions(msrest.serialization.Model): - """Dimensions of a configuration. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar length: Length of the device. - :vartype length: float - :ivar height: Height of the device. - :vartype height: float - :ivar width: Width of the device. - :vartype width: float - :ivar length_height_unit: Unit for the dimensions of length, height and width. Possible values - include: "IN", "CM". - :vartype length_height_unit: str or ~azure.mgmt.edgeorder.v2021_12_01.models.LengthHeightUnit - :ivar weight: Weight of the device. - :vartype weight: float - :ivar depth: Depth of the device. - :vartype depth: float - :ivar weight_unit: Unit for the dimensions of weight. Possible values include: "LBS", "KGS". - :vartype weight_unit: str or ~azure.mgmt.edgeorder.v2021_12_01.models.WeightMeasurementUnit - """ - - _validation = { - 'length': {'readonly': True}, - 'height': {'readonly': True}, - 'width': {'readonly': True}, - 'length_height_unit': {'readonly': True}, - 'weight': {'readonly': True}, - 'depth': {'readonly': True}, - 'weight_unit': {'readonly': True}, - } - - _attribute_map = { - 'length': {'key': 'length', 'type': 'float'}, - 'height': {'key': 'height', 'type': 'float'}, - 'width': {'key': 'width', 'type': 'float'}, - 'length_height_unit': {'key': 'lengthHeightUnit', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'float'}, - 'depth': {'key': 'depth', 'type': 'float'}, - 'weight_unit': {'key': 'weightUnit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Dimensions, self).__init__(**kwargs) - self.length = None - self.height = None - self.width = None - self.length_height_unit = None - self.weight = None - self.depth = None - self.weight_unit = None - - -class DisplayInfo(msrest.serialization.Model): - """Describes product display information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar product_family_display_name: Product family display name. - :vartype product_family_display_name: str - :ivar configuration_display_name: Configuration display name. - :vartype configuration_display_name: str - """ - - _validation = { - 'product_family_display_name': {'readonly': True}, - 'configuration_display_name': {'readonly': True}, - } - - _attribute_map = { - 'product_family_display_name': {'key': 'productFamilyDisplayName', 'type': 'str'}, - 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DisplayInfo, self).__init__(**kwargs) - self.product_family_display_name = None - self.configuration_display_name = None - - -class EncryptionPreferences(msrest.serialization.Model): - """Preferences related to the double encryption. - - :param double_encryption_status: Double encryption status as entered by the customer. It is - compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. Possible - values include: "Disabled", "Enabled". - :type double_encryption_status: str or - ~azure.mgmt.edgeorder.v2021_12_01.models.DoubleEncryptionStatus - """ - - _attribute_map = { - 'double_encryption_status': {'key': 'doubleEncryptionStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EncryptionPreferences, self).__init__(**kwargs) - self.double_encryption_status = kwargs.get('double_encryption_status', None) - - -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: any - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorDetail(msrest.serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.edgeorder.v2021_12_01.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - - :param error: The error object. - :type error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class FilterableProperty(msrest.serialization.Model): - """Different types of filters supported and its values. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Type of product filter. Possible values include: "ShipToCountries", - "DoubleEncryptionStatus". - :type type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.SupportedFilterTypes - :param supported_values: Required. Values to be filtered. - :type supported_values: list[str] - """ - - _validation = { - 'type': {'required': True}, - 'supported_values': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'supported_values': {'key': 'supportedValues', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(FilterableProperty, self).__init__(**kwargs) - self.type = kwargs['type'] - self.supported_values = kwargs['supported_values'] - - -class ForwardShippingDetails(msrest.serialization.Model): - """Forward shipment details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar carrier_name: Name of the carrier. - :vartype carrier_name: str - :ivar carrier_display_name: Carrier Name for display purpose. Not to be used for any - processing. - :vartype carrier_display_name: str - :ivar tracking_id: TrackingId of the package. - :vartype tracking_id: str - :ivar tracking_url: TrackingUrl of the package. - :vartype tracking_url: str - """ - - _validation = { - 'carrier_name': {'readonly': True}, - 'carrier_display_name': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'tracking_url': {'readonly': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_display_name': {'key': 'carrierDisplayName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ForwardShippingDetails, self).__init__(**kwargs) - self.carrier_name = None - self.carrier_display_name = None - self.tracking_id = None - self.tracking_url = None - - -class HierarchyInformation(msrest.serialization.Model): - """Holds details about product hierarchy information. - - :param product_family_name: Represents product family name that uniquely identifies product - family. - :type product_family_name: str - :param product_line_name: Represents product line name that uniquely identifies product line. - :type product_line_name: str - :param product_name: Represents product name that uniquely identifies product. - :type product_name: str - :param configuration_name: Represents configuration name that uniquely identifies - configuration. - :type configuration_name: str - """ - - _attribute_map = { - 'product_family_name': {'key': 'productFamilyName', 'type': 'str'}, - 'product_line_name': {'key': 'productLineName', 'type': 'str'}, - 'product_name': {'key': 'productName', 'type': 'str'}, - 'configuration_name': {'key': 'configurationName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HierarchyInformation, self).__init__(**kwargs) - self.product_family_name = kwargs.get('product_family_name', None) - self.product_line_name = kwargs.get('product_line_name', None) - self.product_name = kwargs.get('product_name', None) - self.configuration_name = kwargs.get('configuration_name', None) - - -class ImageInformation(msrest.serialization.Model): - """Image for the product. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar image_type: Type of the image. Possible values include: "MainImage", "BulletImage", - "GenericImage". - :vartype image_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ImageType - :ivar image_url: Url of the image. - :vartype image_url: str - """ - - _validation = { - 'image_type': {'readonly': True}, - 'image_url': {'readonly': True}, - } - - _attribute_map = { - 'image_type': {'key': 'imageType', 'type': 'str'}, - 'image_url': {'key': 'imageUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ImageInformation, self).__init__(**kwargs) - self.image_type = None - self.image_url = None - - -class Link(msrest.serialization.Model): - """Returns link related to the product. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar link_type: Type of link. Possible values include: "Generic", "TermsAndConditions", - "Specification", "Documentation", "KnowMore", "SignUp". - :vartype link_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.LinkType - :ivar link_url: Url of the link. - :vartype link_url: str - """ - - _validation = { - 'link_type': {'readonly': True}, - 'link_url': {'readonly': True}, - } - - _attribute_map = { - 'link_type': {'key': 'linkType', 'type': 'str'}, - 'link_url': {'key': 'linkUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Link, self).__init__(**kwargs) - self.link_type = None - self.link_url = None - - -class ManagementResourcePreferences(msrest.serialization.Model): - """Management resource preference to link device. - - :param preferred_management_resource_id: Customer preferred Management resource ARM ID. - :type preferred_management_resource_id: str - """ - - _attribute_map = { - 'preferred_management_resource_id': {'key': 'preferredManagementResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ManagementResourcePreferences, self).__init__(**kwargs) - self.preferred_management_resource_id = kwargs.get('preferred_management_resource_id', None) - - -class MeterDetails(msrest.serialization.Model): - """Holds details about billing type and its meter guids. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: Pav2MeterDetails, PurchaseMeterDetails. - - 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. - - :param billing_type: Required. Represents billing type.Constant filled by server. Possible - values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType - :ivar multiplier: Billing unit applicable for Pav2 billing. - :vartype multiplier: float - :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". - :vartype charging_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ChargingType - """ - - _validation = { - 'billing_type': {'required': True}, - 'multiplier': {'readonly': True}, - 'charging_type': {'readonly': True}, - } - - _attribute_map = { - 'billing_type': {'key': 'billingType', 'type': 'str'}, - 'multiplier': {'key': 'multiplier', 'type': 'float'}, - 'charging_type': {'key': 'chargingType', 'type': 'str'}, - } - - _subtype_map = { - 'billing_type': {'Pav2': 'Pav2MeterDetails', 'Purchase': 'PurchaseMeterDetails'} - } - - def __init__( - self, - **kwargs - ): - super(MeterDetails, self).__init__(**kwargs) - self.billing_type = None # type: Optional[str] - self.multiplier = None - self.charging_type = None - - -class NotificationPreference(msrest.serialization.Model): - """Notification preference for a job stage. - - All required parameters must be populated in order to send to Azure. - - :param stage_name: Required. Name of the stage. Possible values include: "Shipped", - "Delivered". - :type stage_name: str or ~azure.mgmt.edgeorder.v2021_12_01.models.NotificationStageName - :param send_notification: Required. Notification is required or not. - :type send_notification: bool - """ - - _validation = { - 'stage_name': {'required': True}, - 'send_notification': {'required': True}, - } - - _attribute_map = { - 'stage_name': {'key': 'stageName', 'type': 'str'}, - 'send_notification': {'key': 'sendNotification', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(NotificationPreference, self).__init__(**kwargs) - self.stage_name = kwargs['stage_name'] - self.send_notification = kwargs['send_notification'] - - -class Operation(msrest.serialization.Model): - """Details of a REST API operation, returned from the Resource Provider Operations API. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: - "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for - data-plane operations and "false" for ARM/control-plane operations. - :vartype is_data_action: bool - :param display: Localized display information for this particular operation. - :type display: ~azure.mgmt.edgeorder.v2021_12_01.models.OperationDisplay - :ivar origin: The intended executor of the operation; as in Resource Based Access Control - (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", - "system", "user,system". - :vartype origin: str or ~azure.mgmt.edgeorder.v2021_12_01.models.Origin - :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for - internal only APIs. Possible values include: "Internal". - :vartype action_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ActionType - """ - - _validation = { - 'name': {'readonly': True}, - 'is_data_action': {'readonly': True}, - 'origin': {'readonly': True}, - 'action_type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = None - self.is_data_action = None - self.display = kwargs.get('display', None) - self.origin = None - self.action_type = None - - -class OperationDisplay(msrest.serialization.Model): - """Localized display information for this particular operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft - Monitoring Insights" or "Microsoft Compute". - :vartype provider: str - :ivar resource: The localized friendly name of the resource type related to this operation. - E.g. "Virtual Machines" or "Job Schedule Collections". - :vartype resource: str - :ivar operation: The concise, localized friendly name for the operation; suitable for - dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - :vartype operation: str - :ivar description: The short, localized friendly description of the operation; suitable for - tool tips and detailed views. - :vartype description: str - """ - - _validation = { - 'provider': {'readonly': True}, - 'resource': {'readonly': True}, - 'operation': {'readonly': True}, - 'description': {'readonly': True}, - } - - _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 = None - self.resource = None - self.operation = None - self.description = None - - -class OperationListResult(msrest.serialization.Model): - """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of operations supported by the resource provider. - :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.Operation] - :ivar next_link: URL to get the next set of operation list results (if there are any). - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationListResult, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class OrderItemDetails(msrest.serialization.Model): - """Order item details. - - 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. - - :param product_details: Required. Unique identifier for configuration. - :type product_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductDetails - :param order_item_type: Required. Order item type. Possible values include: "Purchase", - "Rental". - :type order_item_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemType - :ivar current_stage: Current Order item Status. - :vartype current_stage: ~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails - :ivar order_item_stage_history: Order item status history. - :vartype order_item_stage_history: list[~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails] - :param preferences: Customer notification Preferences. - :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences - :ivar forward_shipping_details: Forward Package Shipping details. - :vartype forward_shipping_details: - ~azure.mgmt.edgeorder.v2021_12_01.models.ForwardShippingDetails - :ivar reverse_shipping_details: Reverse Package Shipping details. - :vartype reverse_shipping_details: - ~azure.mgmt.edgeorder.v2021_12_01.models.ReverseShippingDetails - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] - :ivar cancellation_reason: Cancellation reason. - :vartype cancellation_reason: str - :ivar cancellation_status: Describes whether the order item is cancellable or not. Possible - values include: "Cancellable", "CancellableWithFee", "NotCancellable". - :vartype cancellation_status: str or - ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemCancellationEnum - :ivar deletion_status: Describes whether the order item is deletable or not. Possible values - include: "Allowed", "NotAllowed". - :vartype deletion_status: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ActionStatusEnum - :ivar return_reason: Return reason. - :vartype return_reason: str - :ivar return_status: Describes whether the order item is returnable or not. Possible values - include: "Returnable", "ReturnableWithFee", "NotReturnable". - :vartype return_status: str or ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemReturnEnum - :ivar management_rp_details: Parent RP details - this returns only the first or default parent - RP from the entire list. - :vartype management_rp_details: - ~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails - :ivar management_rp_details_list: List of parent RP details supported for configuration. - :vartype management_rp_details_list: - list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] - :ivar error: Top level error for the job. - :vartype error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail - """ - - _validation = { - 'product_details': {'required': True}, - 'order_item_type': {'required': True}, - 'current_stage': {'readonly': True}, - 'order_item_stage_history': {'readonly': True}, - 'forward_shipping_details': {'readonly': True}, - 'reverse_shipping_details': {'readonly': True}, - 'cancellation_reason': {'readonly': True}, - 'cancellation_status': {'readonly': True}, - 'deletion_status': {'readonly': True}, - 'return_reason': {'readonly': True}, - 'return_status': {'readonly': True}, - 'management_rp_details': {'readonly': True}, - 'management_rp_details_list': {'readonly': True}, - 'error': {'readonly': True}, - } - - _attribute_map = { - 'product_details': {'key': 'productDetails', 'type': 'ProductDetails'}, - 'order_item_type': {'key': 'orderItemType', 'type': 'str'}, - 'current_stage': {'key': 'currentStage', 'type': 'StageDetails'}, - 'order_item_stage_history': {'key': 'orderItemStageHistory', 'type': '[StageDetails]'}, - 'preferences': {'key': 'preferences', 'type': 'Preferences'}, - 'forward_shipping_details': {'key': 'forwardShippingDetails', 'type': 'ForwardShippingDetails'}, - 'reverse_shipping_details': {'key': 'reverseShippingDetails', 'type': 'ReverseShippingDetails'}, - 'notification_email_list': {'key': 'notificationEmailList', 'type': '[str]'}, - 'cancellation_reason': {'key': 'cancellationReason', 'type': 'str'}, - 'cancellation_status': {'key': 'cancellationStatus', 'type': 'str'}, - 'deletion_status': {'key': 'deletionStatus', 'type': 'str'}, - 'return_reason': {'key': 'returnReason', 'type': 'str'}, - 'return_status': {'key': 'returnStatus', 'type': 'str'}, - 'management_rp_details': {'key': 'managementRpDetails', 'type': 'ResourceProviderDetails'}, - 'management_rp_details_list': {'key': 'managementRpDetailsList', 'type': '[ResourceProviderDetails]'}, - 'error': {'key': 'error', 'type': 'ErrorDetail'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemDetails, self).__init__(**kwargs) - self.product_details = kwargs['product_details'] - self.order_item_type = kwargs['order_item_type'] - self.current_stage = None - self.order_item_stage_history = None - self.preferences = kwargs.get('preferences', None) - self.forward_shipping_details = None - self.reverse_shipping_details = None - self.notification_email_list = kwargs.get('notification_email_list', None) - self.cancellation_reason = None - self.cancellation_status = None - self.deletion_status = None - self.return_reason = None - self.return_status = None - self.management_rp_details = None - self.management_rp_details_list = None - self.error = None - - -class OrderItemResource(TrackedResource): - """Represents order item contract. - - 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: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData - :param order_item_details: Required. Represents order item details. - :type order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemDetails - :param address_details: Required. Represents shipping and return address for order item. - :type address_details: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressDetails - :ivar start_time: Start time of order item. - :vartype start_time: ~datetime.datetime - :param order_id: Required. Id of the order to which order item belongs to. - :type order_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, - 'order_item_details': {'required': True}, - 'address_details': {'required': True}, - 'start_time': {'readonly': True}, - 'order_id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'order_item_details': {'key': 'properties.orderItemDetails', 'type': 'OrderItemDetails'}, - 'address_details': {'key': 'properties.addressDetails', 'type': 'AddressDetails'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'order_id': {'key': 'properties.orderId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemResource, self).__init__(**kwargs) - self.system_data = None - self.order_item_details = kwargs['order_item_details'] - self.address_details = kwargs['address_details'] - self.start_time = None - self.order_id = kwargs['order_id'] - - -class OrderItemResourceList(msrest.serialization.Model): - """List of orderItems. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of order item resources. - :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :param next_link: Link for the next set of order item resources. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[OrderItemResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemResourceList, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class OrderItemUpdateParameter(msrest.serialization.Model): - """Updates order item parameters. - - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags - can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param forward_address: Updates forward shipping address and contact details. - :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties - :param preferences: Customer preference. - :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'forward_address': {'key': 'properties.forwardAddress', 'type': 'AddressProperties'}, - 'preferences': {'key': 'properties.preferences', 'type': 'Preferences'}, - 'notification_email_list': {'key': 'properties.notificationEmailList', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderItemUpdateParameter, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.forward_address = kwargs.get('forward_address', None) - self.preferences = kwargs.get('preferences', None) - self.notification_email_list = kwargs.get('notification_email_list', None) - - -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: 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'}, - } - - def __init__( - self, - **kwargs - ): - super(ProxyResource, self).__init__(**kwargs) - - -class OrderResource(ProxyResource): - """Specifies the properties or parameters for an order. Order is a grouping of one or more order items. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData - :ivar order_item_ids: List of order item ARM Ids which are part of an order. - :vartype order_item_ids: list[str] - :ivar current_stage: Order current status. - :vartype current_stage: ~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails - :ivar order_stage_history: Order status history. - :vartype order_stage_history: list[~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'order_item_ids': {'readonly': True}, - 'current_stage': {'readonly': True}, - 'order_stage_history': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'order_item_ids': {'key': 'properties.orderItemIds', 'type': '[str]'}, - 'current_stage': {'key': 'properties.currentStage', 'type': 'StageDetails'}, - 'order_stage_history': {'key': 'properties.orderStageHistory', 'type': '[StageDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderResource, self).__init__(**kwargs) - self.system_data = None - self.order_item_ids = None - self.current_stage = None - self.order_stage_history = None - - -class OrderResourceList(msrest.serialization.Model): - """List of orders. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of order resources. - :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResource] - :param next_link: Link for the next set of order resources. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[OrderResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OrderResourceList, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class Pav2MeterDetails(MeterDetails): - """Billing type PAV2 meter details. - - 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. - - :param billing_type: Required. Represents billing type.Constant filled by server. Possible - values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType - :ivar multiplier: Billing unit applicable for Pav2 billing. - :vartype multiplier: float - :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". - :vartype charging_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ChargingType - :ivar meter_guid: Validation status of requested data center and transport. - :vartype meter_guid: str - """ - - _validation = { - 'billing_type': {'required': True}, - 'multiplier': {'readonly': True}, - 'charging_type': {'readonly': True}, - 'meter_guid': {'readonly': True}, - } - - _attribute_map = { - 'billing_type': {'key': 'billingType', 'type': 'str'}, - 'multiplier': {'key': 'multiplier', 'type': 'float'}, - 'charging_type': {'key': 'chargingType', 'type': 'str'}, - 'meter_guid': {'key': 'meterGuid', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Pav2MeterDetails, self).__init__(**kwargs) - self.billing_type = 'Pav2' # type: str - self.meter_guid = None - - -class Preferences(msrest.serialization.Model): - """Preferences related to the order. - - :param notification_preferences: Notification preferences. - :type notification_preferences: - list[~azure.mgmt.edgeorder.v2021_12_01.models.NotificationPreference] - :param transport_preferences: Preferences related to the shipment logistics of the order. - :type transport_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.TransportPreferences - :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.EncryptionPreferences - :param management_resource_preferences: Preferences related to the Management resource. - :type management_resource_preferences: - ~azure.mgmt.edgeorder.v2021_12_01.models.ManagementResourcePreferences - """ - - _attribute_map = { - 'notification_preferences': {'key': 'notificationPreferences', 'type': '[NotificationPreference]'}, - 'transport_preferences': {'key': 'transportPreferences', 'type': 'TransportPreferences'}, - 'encryption_preferences': {'key': 'encryptionPreferences', 'type': 'EncryptionPreferences'}, - 'management_resource_preferences': {'key': 'managementResourcePreferences', 'type': 'ManagementResourcePreferences'}, - } - - def __init__( - self, - **kwargs - ): - super(Preferences, self).__init__(**kwargs) - self.notification_preferences = kwargs.get('notification_preferences', None) - self.transport_preferences = kwargs.get('transport_preferences', None) - self.encryption_preferences = kwargs.get('encryption_preferences', None) - self.management_resource_preferences = kwargs.get('management_resource_preferences', None) - - -class Product(msrest.serialization.Model): - """List of Products. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar configurations: List of configurations for the product. - :vartype configurations: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'configurations': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'configurations': {'key': 'properties.configurations', 'type': '[Configuration]'}, - } - - def __init__( - self, - **kwargs - ): - super(Product, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.configurations = None - - -class ProductDetails(msrest.serialization.Model): - """Represents product details. - - 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. - - :param display_info: Display details of the product. - :type display_info: ~azure.mgmt.edgeorder.v2021_12_01.models.DisplayInfo - :param hierarchy_information: Required. Hierarchy of the product which uniquely identifies the - product. - :type hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar count: Quantity of the product. - :vartype count: int - :ivar product_double_encryption_status: Double encryption status of the configuration. - Read-only field. Possible values include: "Disabled", "Enabled". - :vartype product_double_encryption_status: str or - ~azure.mgmt.edgeorder.v2021_12_01.models.DoubleEncryptionStatus - :ivar device_details: list of device details. - :vartype device_details: list[~azure.mgmt.edgeorder.v2021_12_01.models.DeviceDetails] - """ - - _validation = { - 'hierarchy_information': {'required': True}, - 'count': {'readonly': True}, - 'product_double_encryption_status': {'readonly': True}, - 'device_details': {'readonly': True}, - } - - _attribute_map = { - 'display_info': {'key': 'displayInfo', 'type': 'DisplayInfo'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'count': {'key': 'count', 'type': 'int'}, - 'product_double_encryption_status': {'key': 'productDoubleEncryptionStatus', 'type': 'str'}, - 'device_details': {'key': 'deviceDetails', 'type': '[DeviceDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductDetails, self).__init__(**kwargs) - self.display_info = kwargs.get('display_info', None) - self.hierarchy_information = kwargs['hierarchy_information'] - self.count = None - self.product_double_encryption_status = None - self.device_details = None - - -class ProductFamilies(msrest.serialization.Model): - """The list of product families. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of product families. - :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamily] - :param next_link: Link for the next set of product families. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ProductFamily]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamilies, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class ProductFamiliesMetadata(msrest.serialization.Model): - """Holds details about product family metadata. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of product family metadata details. - :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadataDetails] - :ivar next_link: Link for the next set of product families. - :vartype next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ProductFamiliesMetadataDetails]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamiliesMetadata, self).__init__(**kwargs) - self.value = None - self.next_link = None - - -class ProductFamiliesMetadataDetails(msrest.serialization.Model): - """Product families metadata details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar product_lines: List of product lines supported in the product family. - :vartype product_lines: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: - list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'product_lines': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'product_lines': {'key': 'properties.productLines', 'type': '[ProductLine]'}, - 'resource_provider_details': {'key': 'properties.resourceProviderDetails', 'type': '[ResourceProviderDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamiliesMetadataDetails, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.product_lines = None - self.resource_provider_details = kwargs.get('resource_provider_details', None) - - -class ProductFamiliesRequest(msrest.serialization.Model): - """The filters for showing the product families. - - All required parameters must be populated in order to send to Azure. - - :param filterable_properties: Required. Dictionary of filterable properties on product family. - :type filterable_properties: dict[str, - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty]] - :param customer_subscription_details: Customer subscription properties. Clients can display - available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: - ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails - """ - - _validation = { - 'filterable_properties': {'required': True}, - } - - _attribute_map = { - 'filterable_properties': {'key': 'filterableProperties', 'type': '{[FilterableProperty]}'}, - 'customer_subscription_details': {'key': 'customerSubscriptionDetails', 'type': 'CustomerSubscriptionDetails'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamiliesRequest, self).__init__(**kwargs) - self.filterable_properties = kwargs['filterable_properties'] - self.customer_subscription_details = kwargs.get('customer_subscription_details', None) - - -class ProductFamily(msrest.serialization.Model): - """Product Family. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar product_lines: List of product lines supported in the product family. - :vartype product_lines: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: - list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'product_lines': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'product_lines': {'key': 'properties.productLines', 'type': '[ProductLine]'}, - 'resource_provider_details': {'key': 'properties.resourceProviderDetails', 'type': '[ResourceProviderDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamily, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.product_lines = None - self.resource_provider_details = kwargs.get('resource_provider_details', None) - - -class ProductFamilyProperties(CommonProperties): - """Properties of product family. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar product_lines: List of product lines supported in the product family. - :vartype product_lines: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: - list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'product_lines': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'product_lines': {'key': 'productLines', 'type': '[ProductLine]'}, - 'resource_provider_details': {'key': 'resourceProviderDetails', 'type': '[ResourceProviderDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductFamilyProperties, self).__init__(**kwargs) - self.product_lines = None - self.resource_provider_details = kwargs.get('resource_provider_details', None) - - -class ProductLine(msrest.serialization.Model): - """Product line. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar products: List of products in the product line. - :vartype products: list[~azure.mgmt.edgeorder.v2021_12_01.models.Product] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'products': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'Description'}, - 'image_information': {'key': 'properties.imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'properties.costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'properties.availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'properties.hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'properties.filterableProperties', 'type': '[FilterableProperty]'}, - 'products': {'key': 'properties.products', 'type': '[Product]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductLine, self).__init__(**kwargs) - self.display_name = None - self.description = None - self.image_information = None - self.cost_information = None - self.availability_information = None - self.hierarchy_information = None - self.filterable_properties = None - self.products = None - - -class ProductLineProperties(CommonProperties): - """Properties of product line. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar products: List of products in the product line. - :vartype products: list[~azure.mgmt.edgeorder.v2021_12_01.models.Product] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'products': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'products': {'key': 'products', 'type': '[Product]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductLineProperties, self).__init__(**kwargs) - self.products = None - - -class ProductProperties(CommonProperties): - """Properties of products. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar display_name: Display Name for the product system. - :vartype display_name: str - :ivar description: Description related to the product system. - :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description - :ivar image_information: Image information for the product system. - :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] - :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation - :ivar availability_information: Availability information of the product system. - :vartype availability_information: - ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation - :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :ivar filterable_properties: list of filters supported for a product. - :vartype filterable_properties: - list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] - :ivar configurations: List of configurations for the product. - :vartype configurations: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] - """ - - _validation = { - 'display_name': {'readonly': True}, - 'description': {'readonly': True}, - 'image_information': {'readonly': True}, - 'cost_information': {'readonly': True}, - 'availability_information': {'readonly': True}, - 'hierarchy_information': {'readonly': True}, - 'filterable_properties': {'readonly': True}, - 'configurations': {'readonly': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'Description'}, - 'image_information': {'key': 'imageInformation', 'type': '[ImageInformation]'}, - 'cost_information': {'key': 'costInformation', 'type': 'CostInformation'}, - 'availability_information': {'key': 'availabilityInformation', 'type': 'AvailabilityInformation'}, - 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, - 'filterable_properties': {'key': 'filterableProperties', 'type': '[FilterableProperty]'}, - 'configurations': {'key': 'configurations', 'type': '[Configuration]'}, - } - - def __init__( - self, - **kwargs - ): - super(ProductProperties, self).__init__(**kwargs) - self.configurations = None - - -class PurchaseMeterDetails(MeterDetails): - """Billing type Purchase meter details. - - 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. - - :param billing_type: Required. Represents billing type.Constant filled by server. Possible - values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType - :ivar multiplier: Billing unit applicable for Pav2 billing. - :vartype multiplier: float - :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". - :vartype charging_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ChargingType - :ivar product_id: Product Id. - :vartype product_id: str - :ivar sku_id: Sku Id. - :vartype sku_id: str - :ivar term_id: Term Id. - :vartype term_id: str - """ - - _validation = { - 'billing_type': {'required': True}, - 'multiplier': {'readonly': True}, - 'charging_type': {'readonly': True}, - 'product_id': {'readonly': True}, - 'sku_id': {'readonly': True}, - 'term_id': {'readonly': True}, - } - - _attribute_map = { - 'billing_type': {'key': 'billingType', 'type': 'str'}, - 'multiplier': {'key': 'multiplier', 'type': 'float'}, - 'charging_type': {'key': 'chargingType', 'type': 'str'}, - 'product_id': {'key': 'productId', 'type': 'str'}, - 'sku_id': {'key': 'skuId', 'type': 'str'}, - 'term_id': {'key': 'termId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PurchaseMeterDetails, self).__init__(**kwargs) - self.billing_type = 'Purchase' # type: str - self.product_id = None - self.sku_id = None - self.term_id = None - - -class ResourceIdentity(msrest.serialization.Model): - """Msi identity details of the resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param type: Identity type. - :type type: str - :ivar principal_id: Service Principal Id backing the Msi. - :vartype principal_id: str - :ivar tenant_id: Home Tenant Id. - :vartype tenant_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceIdentity, self).__init__(**kwargs) - self.type = kwargs.get('type', None) - self.principal_id = None - self.tenant_id = None - - -class ResourceProviderDetails(msrest.serialization.Model): - """Management RP details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar resource_provider_namespace: Resource provider namespace. - :vartype resource_provider_namespace: str - """ - - _validation = { - 'resource_provider_namespace': {'readonly': True}, - } - - _attribute_map = { - 'resource_provider_namespace': {'key': 'resourceProviderNamespace', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceProviderDetails, self).__init__(**kwargs) - self.resource_provider_namespace = None - - -class ReturnOrderItemDetails(msrest.serialization.Model): - """Return order item request body. - - All required parameters must be populated in order to send to Azure. - - :param return_address: customer return address. - :type return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties - :param return_reason: Required. Return Reason. - :type return_reason: str - :param service_tag: Service tag (located on the bottom-right corner of the device). - :type service_tag: str - :param shipping_box_required: Shipping Box required. - :type shipping_box_required: bool - """ - - _validation = { - 'return_reason': {'required': True}, - } - - _attribute_map = { - 'return_address': {'key': 'returnAddress', 'type': 'AddressProperties'}, - 'return_reason': {'key': 'returnReason', 'type': 'str'}, - 'service_tag': {'key': 'serviceTag', 'type': 'str'}, - 'shipping_box_required': {'key': 'shippingBoxRequired', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(ReturnOrderItemDetails, self).__init__(**kwargs) - self.return_address = kwargs.get('return_address', None) - self.return_reason = kwargs['return_reason'] - self.service_tag = kwargs.get('service_tag', None) - self.shipping_box_required = kwargs.get('shipping_box_required', False) - - -class ReverseShippingDetails(msrest.serialization.Model): - """Reverse shipment details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar sas_key_for_label: SAS key to download the reverse shipment label of the package. - :vartype sas_key_for_label: str - :ivar carrier_name: Name of the carrier. - :vartype carrier_name: str - :ivar carrier_display_name: Carrier Name for display purpose. Not to be used for any - processing. - :vartype carrier_display_name: str - :ivar tracking_id: TrackingId of the package. - :vartype tracking_id: str - :ivar tracking_url: TrackingUrl of the package. - :vartype tracking_url: str - """ - - _validation = { - 'sas_key_for_label': {'readonly': True}, - 'carrier_name': {'readonly': True}, - 'carrier_display_name': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'tracking_url': {'readonly': True}, - } - - _attribute_map = { - 'sas_key_for_label': {'key': 'sasKeyForLabel', 'type': 'str'}, - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_display_name': {'key': 'carrierDisplayName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ReverseShippingDetails, self).__init__(**kwargs) - self.sas_key_for_label = None - self.carrier_name = None - self.carrier_display_name = None - self.tracking_id = None - self.tracking_url = None - - -class ShippingAddress(msrest.serialization.Model): - """Shipping address where customer wishes to receive the device. - - All required parameters must be populated in order to send to Azure. - - :param street_address1: Required. Street Address line 1. - :type street_address1: str - :param street_address2: Street Address line 2. - :type street_address2: str - :param street_address3: Street Address line 3. - :type street_address3: str - :param city: Name of the City. - :type city: str - :param state_or_province: Name of the State or Province. - :type state_or_province: str - :param country: Required. Name of the Country. - :type country: str - :param postal_code: Postal code. - :type postal_code: str - :param zip_extended_code: Extended Zip Code. - :type zip_extended_code: str - :param company_name: Name of the company. - :type company_name: str - :param address_type: Type of address. Possible values include: "None", "Residential", - "Commercial". - :type address_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.AddressType - """ - - _validation = { - 'street_address1': {'required': True}, - 'country': {'required': True}, - } - - _attribute_map = { - 'street_address1': {'key': 'streetAddress1', 'type': 'str'}, - 'street_address2': {'key': 'streetAddress2', 'type': 'str'}, - 'street_address3': {'key': 'streetAddress3', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'country': {'key': 'country', 'type': 'str'}, - 'postal_code': {'key': 'postalCode', 'type': 'str'}, - 'zip_extended_code': {'key': 'zipExtendedCode', 'type': 'str'}, - 'company_name': {'key': 'companyName', 'type': 'str'}, - 'address_type': {'key': 'addressType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ShippingAddress, self).__init__(**kwargs) - self.street_address1 = kwargs['street_address1'] - self.street_address2 = kwargs.get('street_address2', None) - self.street_address3 = kwargs.get('street_address3', None) - self.city = kwargs.get('city', None) - self.state_or_province = kwargs.get('state_or_province', None) - self.country = kwargs['country'] - self.postal_code = kwargs.get('postal_code', None) - self.zip_extended_code = kwargs.get('zip_extended_code', None) - self.company_name = kwargs.get('company_name', None) - self.address_type = kwargs.get('address_type', None) - - -class ShippingDetails(msrest.serialization.Model): - """Package shipping details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar carrier_name: Name of the carrier. - :vartype carrier_name: str - :ivar carrier_display_name: Carrier Name for display purpose. Not to be used for any - processing. - :vartype carrier_display_name: str - :ivar tracking_id: TrackingId of the package. - :vartype tracking_id: str - :ivar tracking_url: TrackingUrl of the package. - :vartype tracking_url: str - """ - - _validation = { - 'carrier_name': {'readonly': True}, - 'carrier_display_name': {'readonly': True}, - 'tracking_id': {'readonly': True}, - 'tracking_url': {'readonly': True}, - } - - _attribute_map = { - 'carrier_name': {'key': 'carrierName', 'type': 'str'}, - 'carrier_display_name': {'key': 'carrierDisplayName', 'type': 'str'}, - 'tracking_id': {'key': 'trackingId', 'type': 'str'}, - 'tracking_url': {'key': 'trackingUrl', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ShippingDetails, self).__init__(**kwargs) - self.carrier_name = None - self.carrier_display_name = None - self.tracking_id = None - self.tracking_url = None - - -class Specification(msrest.serialization.Model): - """Specifications of the configurations. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the specification. - :vartype name: str - :ivar value: Value of the specification. - :vartype value: str - """ - - _validation = { - 'name': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Specification, self).__init__(**kwargs) - self.name = None - self.value = None - - -class StageDetails(msrest.serialization.Model): - """Resource stage details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar stage_status: Stage status. Possible values include: "None", "InProgress", "Succeeded", - "Failed", "Cancelled", "Cancelling". - :vartype stage_status: str or ~azure.mgmt.edgeorder.v2021_12_01.models.StageStatus - :ivar stage_name: Stage name. Possible values include: "Placed", "InReview", "Confirmed", - "ReadyToShip", "Shipped", "Delivered", "InUse", "ReturnInitiated", "ReturnPickedUp", - "ReturnedToMicrosoft", "ReturnCompleted", "Cancelled". - :vartype stage_name: str or ~azure.mgmt.edgeorder.v2021_12_01.models.StageName - :ivar display_name: Display name of the resource stage. - :vartype display_name: str - :ivar start_time: Stage start time. - :vartype start_time: ~datetime.datetime - """ - - _validation = { - 'stage_status': {'readonly': True}, - 'stage_name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'start_time': {'readonly': True}, - } - - _attribute_map = { - 'stage_status': {'key': 'stageStatus', 'type': 'str'}, - 'stage_name': {'key': 'stageName', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(StageDetails, self).__init__(**kwargs) - self.stage_status = None - self.stage_name = None - self.display_name = None - self.start_time = None - - -class SystemData(msrest.serialization.Model): - """Metadata pertaining to creation and last modification of the resource. - - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :type created_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the resource. Possible - values include: "User", "Application", "ManagedIdentity", "Key". - :type last_modified_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC). - :type last_modified_at: ~datetime.datetime - """ - - _attribute_map = { - 'created_by': {'key': 'createdBy', 'type': 'str'}, - 'created_by_type': {'key': 'createdByType', 'type': 'str'}, - 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, - 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, - 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, - 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(SystemData, self).__init__(**kwargs) - self.created_by = kwargs.get('created_by', None) - self.created_by_type = kwargs.get('created_by_type', None) - self.created_at = kwargs.get('created_at', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.last_modified_by_type = kwargs.get('last_modified_by_type', None) - self.last_modified_at = kwargs.get('last_modified_at', None) - - -class TransportPreferences(msrest.serialization.Model): - """Preferences related to the shipment logistics of the sku. - - All required parameters must be populated in order to send to Azure. - - :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer - preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or - ~azure.mgmt.edgeorder.v2021_12_01.models.TransportShipmentTypes - """ - - _validation = { - 'preferred_shipment_type': {'required': True}, - } - - _attribute_map = { - 'preferred_shipment_type': {'key': 'preferredShipmentType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TransportPreferences, self).__init__(**kwargs) - self.preferred_shipment_type = kwargs['preferred_shipment_type'] diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models_py3.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models_py3.py index a41d29e1df468..1edf8ec826a9f 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models_py3.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models_py3.py @@ -22,9 +22,9 @@ class AddressDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param forward_address: Required. Customer address and contact details. It should be address + :ivar forward_address: Required. Customer address and contact details. It should be address resource. - :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties + :vartype forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties :ivar return_address: Return shipping address. :vartype return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties """ @@ -45,6 +45,11 @@ def __init__( forward_address: "AddressProperties", **kwargs ): + """ + :keyword forward_address: Required. Customer address and contact details. It should be address + resource. + :paramtype forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties + """ super(AddressDetails, self).__init__(**kwargs) self.forward_address = forward_address self.return_address = None @@ -57,10 +62,10 @@ class AddressProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails + :ivar shipping_address: Shipping details for the address. + :vartype shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress + :ivar contact_details: Required. Contact details for the address. + :vartype contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails :ivar address_validation_status: Status of address validation. Possible values include: "Valid", "Invalid", "Ambiguous". :vartype address_validation_status: str or @@ -85,6 +90,12 @@ def __init__( shipping_address: Optional["ShippingAddress"] = None, **kwargs ): + """ + :keyword shipping_address: Shipping details for the address. + :paramtype shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress + :keyword contact_details: Required. Contact details for the address. + :paramtype contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails + """ super(AddressProperties, self).__init__(**kwargs) self.shipping_address = shipping_address self.contact_details = contact_details @@ -122,6 +133,8 @@ def __init__( self, **kwargs ): + """ + """ super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -143,10 +156,10 @@ class TrackedResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str """ _validation = { @@ -171,6 +184,12 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + """ super(TrackedResource, self).__init__(**kwargs) self.tags = tags self.location = location @@ -191,16 +210,16 @@ class AddressResource(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str :ivar system_data: Represents resource creation and update time. :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress - :param contact_details: Required. Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails + :ivar shipping_address: Shipping details for the address. + :vartype shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress + :ivar contact_details: Required. Contact details for the address. + :vartype contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails :ivar address_validation_status: Status of address validation. Possible values include: "Valid", "Invalid", "Ambiguous". :vartype address_validation_status: str or @@ -238,6 +257,16 @@ def __init__( shipping_address: Optional["ShippingAddress"] = None, **kwargs ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword shipping_address: Shipping details for the address. + :paramtype shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress + :keyword contact_details: Required. Contact details for the address. + :paramtype contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails + """ super(AddressResource, self).__init__(tags=tags, location=location, **kwargs) self.system_data = None self.shipping_address = shipping_address @@ -252,8 +281,8 @@ class AddressResourceList(msrest.serialization.Model): :ivar value: List of address resources. :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :param next_link: Link for the next set of job resources. - :type next_link: str + :ivar next_link: Link for the next set of job resources. + :vartype next_link: str """ _validation = { @@ -271,6 +300,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of job resources. + :paramtype next_link: str + """ super(AddressResourceList, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -279,13 +312,13 @@ def __init__( class AddressUpdateParameter(msrest.serialization.Model): """The Address update parameters. - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + :ivar tags: A set of tags. The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param shipping_address: Shipping details for the address. - :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress - :param contact_details: Contact details for the address. - :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails + :vartype tags: dict[str, str] + :ivar shipping_address: Shipping details for the address. + :vartype shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress + :ivar contact_details: Contact details for the address. + :vartype contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails """ _attribute_map = { @@ -302,6 +335,15 @@ def __init__( contact_details: Optional["ContactDetails"] = None, **kwargs ): + """ + :keyword tags: A set of tags. The list of key value pairs that describe the resource. These + tags can be used in viewing and grouping this resource (across resource groups). + :paramtype tags: dict[str, str] + :keyword shipping_address: Shipping details for the address. + :paramtype shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress + :keyword contact_details: Contact details for the address. + :paramtype contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails + """ super(AddressUpdateParameter, self).__init__(**kwargs) self.tags = tags self.shipping_address = shipping_address @@ -341,6 +383,8 @@ def __init__( self, **kwargs ): + """ + """ super(AvailabilityInformation, self).__init__(**kwargs) self.availability_stage = None self.disabled_reason = None @@ -389,6 +433,8 @@ def __init__( self, **kwargs ): + """ + """ super(BasicInformation, self).__init__(**kwargs) self.display_name = None self.description = None @@ -432,6 +478,8 @@ def __init__( self, **kwargs ): + """ + """ super(BillingMeterDetails, self).__init__(**kwargs) self.name = None self.meter_details = None @@ -444,8 +492,8 @@ class CancellationReason(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param reason: Required. Reason for cancellation. - :type reason: str + :ivar reason: Required. Reason for cancellation. + :vartype reason: str """ _validation = { @@ -462,6 +510,10 @@ def __init__( reason: str, **kwargs ): + """ + :keyword reason: Required. Reason for cancellation. + :paramtype reason: str + """ super(CancellationReason, self).__init__(**kwargs) self.reason = reason @@ -513,6 +565,8 @@ def __init__( self, **kwargs ): + """ + """ super(CommonProperties, self).__init__(**kwargs) self.filterable_properties = None @@ -572,6 +626,8 @@ def __init__( self, **kwargs ): + """ + """ super(Configuration, self).__init__(**kwargs) self.display_name = None self.description = None @@ -589,10 +645,10 @@ class ConfigurationFilters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param hierarchy_information: Required. Product hierarchy information. - :type hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation - :param filterable_property: Filters specific to product. - :type filterable_property: list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] + :ivar hierarchy_information: Required. Product hierarchy information. + :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation + :ivar filterable_property: Filters specific to product. + :vartype filterable_property: list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] """ _validation = { @@ -611,6 +667,13 @@ def __init__( filterable_property: Optional[List["FilterableProperty"]] = None, **kwargs ): + """ + :keyword hierarchy_information: Required. Product hierarchy information. + :paramtype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation + :keyword filterable_property: Filters specific to product. + :paramtype filterable_property: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] + """ super(ConfigurationFilters, self).__init__(**kwargs) self.hierarchy_information = hierarchy_information self.filterable_property = filterable_property @@ -671,6 +734,8 @@ def __init__( self, **kwargs ): + """ + """ super(ConfigurationProperties, self).__init__(**kwargs) self.specifications = None self.dimensions = None @@ -683,8 +748,8 @@ class Configurations(msrest.serialization.Model): :ivar value: List of configurations. :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] - :param next_link: Link for the next set of configurations. - :type next_link: str + :ivar next_link: Link for the next set of configurations. + :vartype next_link: str """ _validation = { @@ -702,6 +767,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of configurations. + :paramtype next_link: str + """ super(Configurations, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -712,13 +781,13 @@ class ConfigurationsRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param configuration_filters: Required. Holds details about product hierarchy information and + :ivar configuration_filters: Required. Holds details about product hierarchy information and filterable property. - :type configuration_filters: + :vartype configuration_filters: list[~azure.mgmt.edgeorder.v2021_12_01.models.ConfigurationFilters] - :param customer_subscription_details: Customer subscription properties. Clients can display + :ivar customer_subscription_details: Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: + :vartype customer_subscription_details: ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails """ @@ -738,6 +807,16 @@ def __init__( customer_subscription_details: Optional["CustomerSubscriptionDetails"] = None, **kwargs ): + """ + :keyword configuration_filters: Required. Holds details about product hierarchy information and + filterable property. + :paramtype configuration_filters: + list[~azure.mgmt.edgeorder.v2021_12_01.models.ConfigurationFilters] + :keyword customer_subscription_details: Customer subscription properties. Clients can display + available products to unregistered customers by explicitly passing subscription details. + :paramtype customer_subscription_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails + """ super(ConfigurationsRequest, self).__init__(**kwargs) self.configuration_filters = configuration_filters self.customer_subscription_details = customer_subscription_details @@ -748,16 +827,16 @@ class ContactDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param contact_name: Required. Contact name of the person. - :type contact_name: str - :param phone: Required. Phone number of the contact person. - :type phone: str - :param phone_extension: Phone extension number of the contact person. - :type phone_extension: str - :param mobile: Mobile number of the contact person. - :type mobile: str - :param email_list: Required. List of Email-ids to be notified about job progress. - :type email_list: list[str] + :ivar contact_name: Required. Contact name of the person. + :vartype contact_name: str + :ivar phone: Required. Phone number of the contact person. + :vartype phone: str + :ivar phone_extension: Phone extension number of the contact person. + :vartype phone_extension: str + :ivar mobile: Mobile number of the contact person. + :vartype mobile: str + :ivar email_list: Required. List of Email-ids to be notified about job progress. + :vartype email_list: list[str] """ _validation = { @@ -784,6 +863,18 @@ def __init__( mobile: Optional[str] = None, **kwargs ): + """ + :keyword contact_name: Required. Contact name of the person. + :paramtype contact_name: str + :keyword phone: Required. Phone number of the contact person. + :paramtype phone: str + :keyword phone_extension: Phone extension number of the contact person. + :paramtype phone_extension: str + :keyword mobile: Mobile number of the contact person. + :paramtype mobile: str + :keyword email_list: Required. List of Email-ids to be notified about job progress. + :paramtype email_list: list[str] + """ super(ContactDetails, self).__init__(**kwargs) self.contact_name = contact_name self.phone = phone @@ -818,6 +909,8 @@ def __init__( self, **kwargs ): + """ + """ super(CostInformation, self).__init__(**kwargs) self.billing_meter_details = None self.billing_info_url = None @@ -828,13 +921,13 @@ class CustomerSubscriptionDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param registered_features: List of registered feature flags for subscription. - :type registered_features: + :ivar registered_features: List of registered feature flags for subscription. + :vartype registered_features: list[~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionRegisteredFeatures] - :param location_placement_id: Location placement Id of a subscription. - :type location_placement_id: str - :param quota_id: Required. Quota ID of a subscription. - :type quota_id: str + :ivar location_placement_id: Location placement Id of a subscription. + :vartype location_placement_id: str + :ivar quota_id: Required. Quota ID of a subscription. + :vartype quota_id: str """ _validation = { @@ -855,6 +948,15 @@ def __init__( location_placement_id: Optional[str] = None, **kwargs ): + """ + :keyword registered_features: List of registered feature flags for subscription. + :paramtype registered_features: + list[~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionRegisteredFeatures] + :keyword location_placement_id: Location placement Id of a subscription. + :paramtype location_placement_id: str + :keyword quota_id: Required. Quota ID of a subscription. + :paramtype quota_id: str + """ super(CustomerSubscriptionDetails, self).__init__(**kwargs) self.registered_features = registered_features self.location_placement_id = location_placement_id @@ -864,10 +966,10 @@ def __init__( class CustomerSubscriptionRegisteredFeatures(msrest.serialization.Model): """Represents subscription registered features. - :param name: Name of subscription registered feature. - :type name: str - :param state: State of subscription registered feature. - :type state: str + :ivar name: Name of subscription registered feature. + :vartype name: str + :ivar state: State of subscription registered feature. + :vartype state: str """ _attribute_map = { @@ -882,6 +984,12 @@ def __init__( state: Optional[str] = None, **kwargs ): + """ + :keyword name: Name of subscription registered feature. + :paramtype name: str + :keyword state: State of subscription registered feature. + :paramtype state: str + """ super(CustomerSubscriptionRegisteredFeatures, self).__init__(**kwargs) self.name = name self.state = state @@ -928,6 +1036,8 @@ def __init__( self, **kwargs ): + """ + """ super(Description, self).__init__(**kwargs) self.description_type = None self.short_description = None @@ -966,6 +1076,8 @@ def __init__( self, **kwargs ): + """ + """ super(DeviceDetails, self).__init__(**kwargs) self.serial_number = None self.management_resource_id = None @@ -1018,6 +1130,8 @@ def __init__( self, **kwargs ): + """ + """ super(Dimensions, self).__init__(**kwargs) self.length = None self.height = None @@ -1053,6 +1167,8 @@ def __init__( self, **kwargs ): + """ + """ super(DisplayInfo, self).__init__(**kwargs) self.product_family_display_name = None self.configuration_display_name = None @@ -1061,10 +1177,10 @@ def __init__( class EncryptionPreferences(msrest.serialization.Model): """Preferences related to the double encryption. - :param double_encryption_status: Double encryption status as entered by the customer. It is + :ivar double_encryption_status: Double encryption status as entered by the customer. It is compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. Possible values include: "Disabled", "Enabled". - :type double_encryption_status: str or + :vartype double_encryption_status: str or ~azure.mgmt.edgeorder.v2021_12_01.models.DoubleEncryptionStatus """ @@ -1078,6 +1194,13 @@ def __init__( double_encryption_status: Optional[Union[str, "DoubleEncryptionStatus"]] = None, **kwargs ): + """ + :keyword double_encryption_status: Double encryption status as entered by the customer. It is + compulsory to give this parameter if the 'Deny' or 'Disabled' policy is configured. Possible + values include: "Disabled", "Enabled". + :paramtype double_encryption_status: str or + ~azure.mgmt.edgeorder.v2021_12_01.models.DoubleEncryptionStatus + """ super(EncryptionPreferences, self).__init__(**kwargs) self.double_encryption_status = double_encryption_status @@ -1107,6 +1230,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorAdditionalInfo, self).__init__(**kwargs) self.type = None self.info = None @@ -1149,6 +1274,8 @@ def __init__( self, **kwargs ): + """ + """ super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None @@ -1160,8 +1287,8 @@ def __init__( class ErrorResponse(msrest.serialization.Model): """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - :param error: The error object. - :type error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail + :ivar error: The error object. + :vartype error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail """ _attribute_map = { @@ -1174,6 +1301,10 @@ def __init__( error: Optional["ErrorDetail"] = None, **kwargs ): + """ + :keyword error: The error object. + :paramtype error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail + """ super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -1183,11 +1314,11 @@ class FilterableProperty(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type of product filter. Possible values include: "ShipToCountries", + :ivar type: Required. Type of product filter. Possible values include: "ShipToCountries", "DoubleEncryptionStatus". - :type type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.SupportedFilterTypes - :param supported_values: Required. Values to be filtered. - :type supported_values: list[str] + :vartype type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.SupportedFilterTypes + :ivar supported_values: Required. Values to be filtered. + :vartype supported_values: list[str] """ _validation = { @@ -1207,6 +1338,13 @@ def __init__( supported_values: List[str], **kwargs ): + """ + :keyword type: Required. Type of product filter. Possible values include: "ShipToCountries", + "DoubleEncryptionStatus". + :paramtype type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.SupportedFilterTypes + :keyword supported_values: Required. Values to be filtered. + :paramtype supported_values: list[str] + """ super(FilterableProperty, self).__init__(**kwargs) self.type = type self.supported_values = supported_values @@ -1246,6 +1384,8 @@ def __init__( self, **kwargs ): + """ + """ super(ForwardShippingDetails, self).__init__(**kwargs) self.carrier_name = None self.carrier_display_name = None @@ -1256,16 +1396,15 @@ def __init__( class HierarchyInformation(msrest.serialization.Model): """Holds details about product hierarchy information. - :param product_family_name: Represents product family name that uniquely identifies product + :ivar product_family_name: Represents product family name that uniquely identifies product family. - :type product_family_name: str - :param product_line_name: Represents product line name that uniquely identifies product line. - :type product_line_name: str - :param product_name: Represents product name that uniquely identifies product. - :type product_name: str - :param configuration_name: Represents configuration name that uniquely identifies - configuration. - :type configuration_name: str + :vartype product_family_name: str + :ivar product_line_name: Represents product line name that uniquely identifies product line. + :vartype product_line_name: str + :ivar product_name: Represents product name that uniquely identifies product. + :vartype product_name: str + :ivar configuration_name: Represents configuration name that uniquely identifies configuration. + :vartype configuration_name: str """ _attribute_map = { @@ -1284,6 +1423,18 @@ def __init__( configuration_name: Optional[str] = None, **kwargs ): + """ + :keyword product_family_name: Represents product family name that uniquely identifies product + family. + :paramtype product_family_name: str + :keyword product_line_name: Represents product line name that uniquely identifies product line. + :paramtype product_line_name: str + :keyword product_name: Represents product name that uniquely identifies product. + :paramtype product_name: str + :keyword configuration_name: Represents configuration name that uniquely identifies + configuration. + :paramtype configuration_name: str + """ super(HierarchyInformation, self).__init__(**kwargs) self.product_family_name = product_family_name self.product_line_name = product_line_name @@ -1317,6 +1468,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageInformation, self).__init__(**kwargs) self.image_type = None self.image_url = None @@ -1348,6 +1501,8 @@ def __init__( self, **kwargs ): + """ + """ super(Link, self).__init__(**kwargs) self.link_type = None self.link_url = None @@ -1356,8 +1511,8 @@ def __init__( class ManagementResourcePreferences(msrest.serialization.Model): """Management resource preference to link device. - :param preferred_management_resource_id: Customer preferred Management resource ARM ID. - :type preferred_management_resource_id: str + :ivar preferred_management_resource_id: Customer preferred Management resource ARM ID. + :vartype preferred_management_resource_id: str """ _attribute_map = { @@ -1370,6 +1525,10 @@ def __init__( preferred_management_resource_id: Optional[str] = None, **kwargs ): + """ + :keyword preferred_management_resource_id: Customer preferred Management resource ARM ID. + :paramtype preferred_management_resource_id: str + """ super(ManagementResourcePreferences, self).__init__(**kwargs) self.preferred_management_resource_id = preferred_management_resource_id @@ -1384,9 +1543,9 @@ class MeterDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param billing_type: Required. Represents billing type.Constant filled by server. Possible + :ivar billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType + :vartype billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType :ivar multiplier: Billing unit applicable for Pav2 billing. :vartype multiplier: float :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". @@ -1413,6 +1572,8 @@ def __init__( self, **kwargs ): + """ + """ super(MeterDetails, self).__init__(**kwargs) self.billing_type = None # type: Optional[str] self.multiplier = None @@ -1424,11 +1585,10 @@ class NotificationPreference(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param stage_name: Required. Name of the stage. Possible values include: "Shipped", - "Delivered". - :type stage_name: str or ~azure.mgmt.edgeorder.v2021_12_01.models.NotificationStageName - :param send_notification: Required. Notification is required or not. - :type send_notification: bool + :ivar stage_name: Required. Name of the stage. Possible values include: "Shipped", "Delivered". + :vartype stage_name: str or ~azure.mgmt.edgeorder.v2021_12_01.models.NotificationStageName + :ivar send_notification: Required. Notification is required or not. + :vartype send_notification: bool """ _validation = { @@ -1448,6 +1608,13 @@ def __init__( send_notification: bool, **kwargs ): + """ + :keyword stage_name: Required. Name of the stage. Possible values include: "Shipped", + "Delivered". + :paramtype stage_name: str or ~azure.mgmt.edgeorder.v2021_12_01.models.NotificationStageName + :keyword send_notification: Required. Notification is required or not. + :paramtype send_notification: bool + """ super(NotificationPreference, self).__init__(**kwargs) self.stage_name = stage_name self.send_notification = send_notification @@ -1464,8 +1631,8 @@ class Operation(msrest.serialization.Model): :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane operations. :vartype is_data_action: bool - :param display: Localized display information for this particular operation. - :type display: ~azure.mgmt.edgeorder.v2021_12_01.models.OperationDisplay + :ivar display: Localized display information for this particular operation. + :vartype display: ~azure.mgmt.edgeorder.v2021_12_01.models.OperationDisplay :ivar origin: The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", "system", "user,system". @@ -1496,6 +1663,10 @@ def __init__( display: Optional["OperationDisplay"] = None, **kwargs ): + """ + :keyword display: Localized display information for this particular operation. + :paramtype display: ~azure.mgmt.edgeorder.v2021_12_01.models.OperationDisplay + """ super(Operation, self).__init__(**kwargs) self.name = None self.is_data_action = None @@ -1541,6 +1712,8 @@ def __init__( self, **kwargs ): + """ + """ super(OperationDisplay, self).__init__(**kwargs) self.provider = None self.resource = None @@ -1573,6 +1746,8 @@ def __init__( self, **kwargs ): + """ + """ super(OperationListResult, self).__init__(**kwargs) self.value = None self.next_link = None @@ -1585,25 +1760,25 @@ class OrderItemDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param product_details: Required. Unique identifier for configuration. - :type product_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductDetails - :param order_item_type: Required. Order item type. Possible values include: "Purchase", + :ivar product_details: Required. Unique identifier for configuration. + :vartype product_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductDetails + :ivar order_item_type: Required. Order item type. Possible values include: "Purchase", "Rental". - :type order_item_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemType + :vartype order_item_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemType :ivar current_stage: Current Order item Status. :vartype current_stage: ~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails :ivar order_item_stage_history: Order item status history. :vartype order_item_stage_history: list[~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails] - :param preferences: Customer notification Preferences. - :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences + :ivar preferences: Customer notification Preferences. + :vartype preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences :ivar forward_shipping_details: Forward Package Shipping details. :vartype forward_shipping_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ForwardShippingDetails :ivar reverse_shipping_details: Reverse Package Shipping details. :vartype reverse_shipping_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReverseShippingDetails - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] + :ivar notification_email_list: Additional notification email list. + :vartype notification_email_list: list[str] :ivar cancellation_reason: Cancellation reason. :vartype cancellation_reason: str :ivar cancellation_status: Describes whether the order item is cancellable or not. Possible @@ -1674,6 +1849,17 @@ def __init__( notification_email_list: Optional[List[str]] = None, **kwargs ): + """ + :keyword product_details: Required. Unique identifier for configuration. + :paramtype product_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductDetails + :keyword order_item_type: Required. Order item type. Possible values include: "Purchase", + "Rental". + :paramtype order_item_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemType + :keyword preferences: Customer notification Preferences. + :paramtype preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences + :keyword notification_email_list: Additional notification email list. + :paramtype notification_email_list: list[str] + """ super(OrderItemDetails, self).__init__(**kwargs) self.product_details = product_details self.order_item_type = order_item_type @@ -1708,20 +1894,20 @@ class OrderItemResource(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str + :ivar tags: A set of tags. Resource tags. + :vartype tags: dict[str, str] + :ivar location: Required. The geo-location where the resource lives. + :vartype location: str :ivar system_data: Represents resource creation and update time. :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData - :param order_item_details: Required. Represents order item details. - :type order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemDetails - :param address_details: Required. Represents shipping and return address for order item. - :type address_details: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressDetails + :ivar order_item_details: Required. Represents order item details. + :vartype order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemDetails + :ivar address_details: Required. Represents shipping and return address for order item. + :vartype address_details: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressDetails :ivar start_time: Start time of order item. :vartype start_time: ~datetime.datetime - :param order_id: Required. Id of the order to which order item belongs to. - :type order_id: str + :ivar order_id: Required. Id of the order to which order item belongs to. + :vartype order_id: str """ _validation = { @@ -1759,6 +1945,18 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): + """ + :keyword tags: A set of tags. Resource tags. + :paramtype tags: dict[str, str] + :keyword location: Required. The geo-location where the resource lives. + :paramtype location: str + :keyword order_item_details: Required. Represents order item details. + :paramtype order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemDetails + :keyword address_details: Required. Represents shipping and return address for order item. + :paramtype address_details: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressDetails + :keyword order_id: Required. Id of the order to which order item belongs to. + :paramtype order_id: str + """ super(OrderItemResource, self).__init__(tags=tags, location=location, **kwargs) self.system_data = None self.order_item_details = order_item_details @@ -1774,8 +1972,8 @@ class OrderItemResourceList(msrest.serialization.Model): :ivar value: List of order item resources. :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :param next_link: Link for the next set of order item resources. - :type next_link: str + :ivar next_link: Link for the next set of order item resources. + :vartype next_link: str """ _validation = { @@ -1793,6 +1991,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of order item resources. + :paramtype next_link: str + """ super(OrderItemResourceList, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -1801,15 +2003,15 @@ def __init__( class OrderItemUpdateParameter(msrest.serialization.Model): """Updates order item parameters. - :param tags: A set of tags. The list of key value pairs that describe the resource. These tags + :ivar tags: A set of tags. The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). - :type tags: dict[str, str] - :param forward_address: Updates forward shipping address and contact details. - :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties - :param preferences: Customer preference. - :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences - :param notification_email_list: Additional notification email list. - :type notification_email_list: list[str] + :vartype tags: dict[str, str] + :ivar forward_address: Updates forward shipping address and contact details. + :vartype forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties + :ivar preferences: Customer preference. + :vartype preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences + :ivar notification_email_list: Additional notification email list. + :vartype notification_email_list: list[str] """ _attribute_map = { @@ -1828,6 +2030,17 @@ def __init__( notification_email_list: Optional[List[str]] = None, **kwargs ): + """ + :keyword tags: A set of tags. The list of key value pairs that describe the resource. These + tags can be used in viewing and grouping this resource (across resource groups). + :paramtype tags: dict[str, str] + :keyword forward_address: Updates forward shipping address and contact details. + :paramtype forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties + :keyword preferences: Customer preference. + :paramtype preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences + :keyword notification_email_list: Additional notification email list. + :paramtype notification_email_list: list[str] + """ super(OrderItemUpdateParameter, self).__init__(**kwargs) self.tags = tags self.forward_address = forward_address @@ -1866,6 +2079,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProxyResource, self).__init__(**kwargs) @@ -1916,6 +2131,8 @@ def __init__( self, **kwargs ): + """ + """ super(OrderResource, self).__init__(**kwargs) self.system_data = None self.order_item_ids = None @@ -1930,8 +2147,8 @@ class OrderResourceList(msrest.serialization.Model): :ivar value: List of order resources. :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResource] - :param next_link: Link for the next set of order resources. - :type next_link: str + :ivar next_link: Link for the next set of order resources. + :vartype next_link: str """ _validation = { @@ -1949,6 +2166,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of order resources. + :paramtype next_link: str + """ super(OrderResourceList, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -1961,9 +2182,9 @@ class Pav2MeterDetails(MeterDetails): All required parameters must be populated in order to send to Azure. - :param billing_type: Required. Represents billing type.Constant filled by server. Possible + :ivar billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType + :vartype billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType :ivar multiplier: Billing unit applicable for Pav2 billing. :vartype multiplier: float :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". @@ -1990,6 +2211,8 @@ def __init__( self, **kwargs ): + """ + """ super(Pav2MeterDetails, self).__init__(**kwargs) self.billing_type = 'Pav2' # type: str self.meter_guid = None @@ -1998,15 +2221,15 @@ def __init__( class Preferences(msrest.serialization.Model): """Preferences related to the order. - :param notification_preferences: Notification preferences. - :type notification_preferences: + :ivar notification_preferences: Notification preferences. + :vartype notification_preferences: list[~azure.mgmt.edgeorder.v2021_12_01.models.NotificationPreference] - :param transport_preferences: Preferences related to the shipment logistics of the order. - :type transport_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.TransportPreferences - :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.EncryptionPreferences - :param management_resource_preferences: Preferences related to the Management resource. - :type management_resource_preferences: + :ivar transport_preferences: Preferences related to the shipment logistics of the order. + :vartype transport_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.TransportPreferences + :ivar encryption_preferences: Preferences related to the Encryption. + :vartype encryption_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.EncryptionPreferences + :ivar management_resource_preferences: Preferences related to the Management resource. + :vartype management_resource_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.ManagementResourcePreferences """ @@ -2026,6 +2249,19 @@ def __init__( management_resource_preferences: Optional["ManagementResourcePreferences"] = None, **kwargs ): + """ + :keyword notification_preferences: Notification preferences. + :paramtype notification_preferences: + list[~azure.mgmt.edgeorder.v2021_12_01.models.NotificationPreference] + :keyword transport_preferences: Preferences related to the shipment logistics of the order. + :paramtype transport_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.TransportPreferences + :keyword encryption_preferences: Preferences related to the Encryption. + :paramtype encryption_preferences: + ~azure.mgmt.edgeorder.v2021_12_01.models.EncryptionPreferences + :keyword management_resource_preferences: Preferences related to the Management resource. + :paramtype management_resource_preferences: + ~azure.mgmt.edgeorder.v2021_12_01.models.ManagementResourcePreferences + """ super(Preferences, self).__init__(**kwargs) self.notification_preferences = notification_preferences self.transport_preferences = transport_preferences @@ -2084,6 +2320,8 @@ def __init__( self, **kwargs ): + """ + """ super(Product, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2102,11 +2340,11 @@ class ProductDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param display_info: Display details of the product. - :type display_info: ~azure.mgmt.edgeorder.v2021_12_01.models.DisplayInfo - :param hierarchy_information: Required. Hierarchy of the product which uniquely identifies the + :ivar display_info: Display details of the product. + :vartype display_info: ~azure.mgmt.edgeorder.v2021_12_01.models.DisplayInfo + :ivar hierarchy_information: Required. Hierarchy of the product which uniquely identifies the product. - :type hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation + :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation :ivar count: Quantity of the product. :vartype count: int :ivar product_double_encryption_status: Double encryption status of the configuration. @@ -2139,6 +2377,13 @@ def __init__( display_info: Optional["DisplayInfo"] = None, **kwargs ): + """ + :keyword display_info: Display details of the product. + :paramtype display_info: ~azure.mgmt.edgeorder.v2021_12_01.models.DisplayInfo + :keyword hierarchy_information: Required. Hierarchy of the product which uniquely identifies + the product. + :paramtype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation + """ super(ProductDetails, self).__init__(**kwargs) self.display_info = display_info self.hierarchy_information = hierarchy_information @@ -2154,8 +2399,8 @@ class ProductFamilies(msrest.serialization.Model): :ivar value: List of product families. :vartype value: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamily] - :param next_link: Link for the next set of product families. - :type next_link: str + :ivar next_link: Link for the next set of product families. + :vartype next_link: str """ _validation = { @@ -2173,6 +2418,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: Link for the next set of product families. + :paramtype next_link: str + """ super(ProductFamilies, self).__init__(**kwargs) self.value = None self.next_link = next_link @@ -2203,6 +2452,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductFamiliesMetadata, self).__init__(**kwargs) self.value = None self.next_link = None @@ -2231,8 +2482,8 @@ class ProductFamiliesMetadataDetails(msrest.serialization.Model): list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar product_lines: List of product lines supported in the product family. :vartype product_lines: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: + :ivar resource_provider_details: Contains details related to resource provider. + :vartype resource_provider_details: list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] """ @@ -2265,6 +2516,11 @@ def __init__( resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): + """ + :keyword resource_provider_details: Contains details related to resource provider. + :paramtype resource_provider_details: + list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] + """ super(ProductFamiliesMetadataDetails, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2282,12 +2538,12 @@ class ProductFamiliesRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param filterable_properties: Required. Dictionary of filterable properties on product family. - :type filterable_properties: dict[str, + :ivar filterable_properties: Required. Dictionary of filterable properties on product family. + :vartype filterable_properties: dict[str, list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty]] - :param customer_subscription_details: Customer subscription properties. Clients can display + :ivar customer_subscription_details: Customer subscription properties. Clients can display available products to unregistered customers by explicitly passing subscription details. - :type customer_subscription_details: + :vartype customer_subscription_details: ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails """ @@ -2307,6 +2563,16 @@ def __init__( customer_subscription_details: Optional["CustomerSubscriptionDetails"] = None, **kwargs ): + """ + :keyword filterable_properties: Required. Dictionary of filterable properties on product + family. + :paramtype filterable_properties: dict[str, + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty]] + :keyword customer_subscription_details: Customer subscription properties. Clients can display + available products to unregistered customers by explicitly passing subscription details. + :paramtype customer_subscription_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails + """ super(ProductFamiliesRequest, self).__init__(**kwargs) self.filterable_properties = filterable_properties self.customer_subscription_details = customer_subscription_details @@ -2335,8 +2601,8 @@ class ProductFamily(msrest.serialization.Model): list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar product_lines: List of product lines supported in the product family. :vartype product_lines: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: + :ivar resource_provider_details: Contains details related to resource provider. + :vartype resource_provider_details: list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] """ @@ -2369,6 +2635,11 @@ def __init__( resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): + """ + :keyword resource_provider_details: Contains details related to resource provider. + :paramtype resource_provider_details: + list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] + """ super(ProductFamily, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2404,8 +2675,8 @@ class ProductFamilyProperties(CommonProperties): list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar product_lines: List of product lines supported in the product family. :vartype product_lines: list[~azure.mgmt.edgeorder.v2021_12_01.models.ProductLine] - :param resource_provider_details: Contains details related to resource provider. - :type resource_provider_details: + :ivar resource_provider_details: Contains details related to resource provider. + :vartype resource_provider_details: list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] """ @@ -2438,6 +2709,11 @@ def __init__( resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): + """ + :keyword resource_provider_details: Contains details related to resource provider. + :paramtype resource_provider_details: + list[~azure.mgmt.edgeorder.v2021_12_01.models.ResourceProviderDetails] + """ super(ProductFamilyProperties, self).__init__(**kwargs) self.product_lines = None self.resource_provider_details = resource_provider_details @@ -2494,6 +2770,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductLine, self).__init__(**kwargs) self.display_name = None self.description = None @@ -2556,6 +2834,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductLineProperties, self).__init__(**kwargs) self.products = None @@ -2611,6 +2891,8 @@ def __init__( self, **kwargs ): + """ + """ super(ProductProperties, self).__init__(**kwargs) self.configurations = None @@ -2622,9 +2904,9 @@ class PurchaseMeterDetails(MeterDetails): All required parameters must be populated in order to send to Azure. - :param billing_type: Required. Represents billing type.Constant filled by server. Possible + :ivar billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType + :vartype billing_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.BillingType :ivar multiplier: Billing unit applicable for Pav2 billing. :vartype multiplier: float :ivar charging_type: Charging type. Possible values include: "PerOrder", "PerDevice". @@ -2659,6 +2941,8 @@ def __init__( self, **kwargs ): + """ + """ super(PurchaseMeterDetails, self).__init__(**kwargs) self.billing_type = 'Purchase' # type: str self.product_id = None @@ -2671,8 +2955,8 @@ class ResourceIdentity(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param type: Identity type. - :type type: str + :ivar type: Identity type. + :vartype type: str :ivar principal_id: Service Principal Id backing the Msi. :vartype principal_id: str :ivar tenant_id: Home Tenant Id. @@ -2696,6 +2980,10 @@ def __init__( type: Optional[str] = None, **kwargs ): + """ + :keyword type: Identity type. + :paramtype type: str + """ super(ResourceIdentity, self).__init__(**kwargs) self.type = type self.principal_id = None @@ -2723,6 +3011,8 @@ def __init__( self, **kwargs ): + """ + """ super(ResourceProviderDetails, self).__init__(**kwargs) self.resource_provider_namespace = None @@ -2732,14 +3022,14 @@ class ReturnOrderItemDetails(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param return_address: customer return address. - :type return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties - :param return_reason: Required. Return Reason. - :type return_reason: str - :param service_tag: Service tag (located on the bottom-right corner of the device). - :type service_tag: str - :param shipping_box_required: Shipping Box required. - :type shipping_box_required: bool + :ivar return_address: customer return address. + :vartype return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties + :ivar return_reason: Required. Return Reason. + :vartype return_reason: str + :ivar service_tag: Service tag (located on the bottom-right corner of the device). + :vartype service_tag: str + :ivar shipping_box_required: Shipping Box required. + :vartype shipping_box_required: bool """ _validation = { @@ -2762,6 +3052,16 @@ def __init__( shipping_box_required: Optional[bool] = False, **kwargs ): + """ + :keyword return_address: customer return address. + :paramtype return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties + :keyword return_reason: Required. Return Reason. + :paramtype return_reason: str + :keyword service_tag: Service tag (located on the bottom-right corner of the device). + :paramtype service_tag: str + :keyword shipping_box_required: Shipping Box required. + :paramtype shipping_box_required: bool + """ super(ReturnOrderItemDetails, self).__init__(**kwargs) self.return_address = return_address self.return_reason = return_reason @@ -2807,6 +3107,8 @@ def __init__( self, **kwargs ): + """ + """ super(ReverseShippingDetails, self).__init__(**kwargs) self.sas_key_for_label = None self.carrier_name = None @@ -2820,27 +3122,27 @@ class ShippingAddress(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param street_address1: Required. Street Address line 1. - :type street_address1: str - :param street_address2: Street Address line 2. - :type street_address2: str - :param street_address3: Street Address line 3. - :type street_address3: str - :param city: Name of the City. - :type city: str - :param state_or_province: Name of the State or Province. - :type state_or_province: str - :param country: Required. Name of the Country. - :type country: str - :param postal_code: Postal code. - :type postal_code: str - :param zip_extended_code: Extended Zip Code. - :type zip_extended_code: str - :param company_name: Name of the company. - :type company_name: str - :param address_type: Type of address. Possible values include: "None", "Residential", + :ivar street_address1: Required. Street Address line 1. + :vartype street_address1: str + :ivar street_address2: Street Address line 2. + :vartype street_address2: str + :ivar street_address3: Street Address line 3. + :vartype street_address3: str + :ivar city: Name of the City. + :vartype city: str + :ivar state_or_province: Name of the State or Province. + :vartype state_or_province: str + :ivar country: Required. Name of the Country. + :vartype country: str + :ivar postal_code: Postal code. + :vartype postal_code: str + :ivar zip_extended_code: Extended Zip Code. + :vartype zip_extended_code: str + :ivar company_name: Name of the company. + :vartype company_name: str + :ivar address_type: Type of address. Possible values include: "None", "Residential", "Commercial". - :type address_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.AddressType + :vartype address_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.AddressType """ _validation = { @@ -2876,6 +3178,29 @@ def __init__( address_type: Optional[Union[str, "AddressType"]] = None, **kwargs ): + """ + :keyword street_address1: Required. Street Address line 1. + :paramtype street_address1: str + :keyword street_address2: Street Address line 2. + :paramtype street_address2: str + :keyword street_address3: Street Address line 3. + :paramtype street_address3: str + :keyword city: Name of the City. + :paramtype city: str + :keyword state_or_province: Name of the State or Province. + :paramtype state_or_province: str + :keyword country: Required. Name of the Country. + :paramtype country: str + :keyword postal_code: Postal code. + :paramtype postal_code: str + :keyword zip_extended_code: Extended Zip Code. + :paramtype zip_extended_code: str + :keyword company_name: Name of the company. + :paramtype company_name: str + :keyword address_type: Type of address. Possible values include: "None", "Residential", + "Commercial". + :paramtype address_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.AddressType + """ super(ShippingAddress, self).__init__(**kwargs) self.street_address1 = street_address1 self.street_address2 = street_address2 @@ -2923,6 +3248,8 @@ def __init__( self, **kwargs ): + """ + """ super(ShippingDetails, self).__init__(**kwargs) self.carrier_name = None self.carrier_display_name = None @@ -2955,6 +3282,8 @@ def __init__( self, **kwargs ): + """ + """ super(Specification, self).__init__(**kwargs) self.name = None self.value = None @@ -2996,6 +3325,8 @@ def __init__( self, **kwargs ): + """ + """ super(StageDetails, self).__init__(**kwargs) self.stage_status = None self.stage_name = None @@ -3006,20 +3337,20 @@ def __init__( class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. - :param created_by: The identity that created the resource. - :type created_by: str - :param created_by_type: The type of identity that created the resource. Possible values - include: "User", "Application", "ManagedIdentity", "Key". - :type created_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.datetime - :param last_modified_by: The identity that last modified the resource. - :type last_modified_by: str - :param last_modified_by_type: The type of identity that last modified the resource. Possible + :ivar created_by: The identity that created the resource. + :vartype created_by: str + :ivar created_by_type: The type of identity that created the resource. Possible values include: + "User", "Application", "ManagedIdentity", "Key". + :vartype created_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType + :ivar created_at: The timestamp of resource creation (UTC). + :vartype created_at: ~datetime.datetime + :ivar last_modified_by: The identity that last modified the resource. + :vartype last_modified_by: str + :ivar last_modified_by_type: The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". - :type last_modified_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC). - :type last_modified_at: ~datetime.datetime + :vartype last_modified_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType + :ivar last_modified_at: The timestamp of resource last modification (UTC). + :vartype last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -3042,6 +3373,22 @@ def __init__( last_modified_at: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword created_by: The identity that created the resource. + :paramtype created_by: str + :keyword created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :paramtype created_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType + :keyword created_at: The timestamp of resource creation (UTC). + :paramtype created_at: ~datetime.datetime + :keyword last_modified_by: The identity that last modified the resource. + :paramtype last_modified_by: str + :keyword last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :paramtype last_modified_by_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.CreatedByType + :keyword last_modified_at: The timestamp of resource last modification (UTC). + :paramtype last_modified_at: ~datetime.datetime + """ super(SystemData, self).__init__(**kwargs) self.created_by = created_by self.created_by_type = created_by_type @@ -3056,9 +3403,9 @@ class TransportPreferences(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + :ivar preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". - :type preferred_shipment_type: str or + :vartype preferred_shipment_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.TransportShipmentTypes """ @@ -3076,5 +3423,11 @@ def __init__( preferred_shipment_type: Union[str, "TransportShipmentTypes"], **kwargs ): + """ + :keyword preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer + preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". + :paramtype preferred_shipment_type: str or + ~azure.mgmt.edgeorder.v2021_12_01.models.TransportShipmentTypes + """ super(TransportPreferences, self).__init__(**kwargs) self.preferred_shipment_type = preferred_shipment_type diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/_edge_order_management_client_operations.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/_edge_order_management_client_operations.py index b3a3cdfc047c2..e10da4a53f7ef 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/_edge_order_management_client_operations.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/_edge_order_management_client_operations.py @@ -5,38 +5,876 @@ # 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_operations_request( + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/providers/Microsoft.EdgeOrder/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 + ) + + +def build_list_addresses_at_subscription_level_request( + subscription_id: str, + *, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_product_families_request( + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_configurations_request( + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listConfigurations') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_product_families_metadata_request( + subscription_id: str, + *, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_list_order_at_subscription_level_request( + subscription_id: str, + *, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_order_items_at_subscription_level_request( + subscription_id: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_addresses_at_resource_group_level_request( + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_address_by_name_request( + address_name: str, + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_address_request_initial( + address_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_address_by_name_request_initial( + address_name: str, + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_update_address_request_initial( + address_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + if_match: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}') + path_format_arguments = { + "addressName": _SERIALIZER.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 if_match is not None: + header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') + 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_list_order_at_resource_group_level_request( + subscription_id: str, + resource_group_name: str, + *, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_order_by_name_request( + order_name: str, + subscription_id: str, + resource_group_name: str, + location: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName}') + path_format_arguments = { + "orderName": _SERIALIZER.url("order_name", order_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + "location": _SERIALIZER.url("location", location, 'str', min_length=1), + } + + 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_order_items_at_resource_group_level_request( + subscription_id: str, + resource_group_name: str, + *, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems') + path_format_arguments = { + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 filter is not None: + query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') + if expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, '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_order_item_by_name_request( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + expand: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 expand is not None: + query_parameters['$expand'] = _SERIALIZER.query("expand", expand, '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_order_item_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_order_item_by_name_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + **kwargs: Any +) -> HttpRequest: + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_update_order_item_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + if_match: Optional[str] = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 if_match is not None: + header_parameters['If-Match'] = _SERIALIZER.header("if_match", if_match, 'str') + 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_cancel_order_item_request( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/cancel') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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_return_order_item_request_initial( + order_item_name: str, + subscription_id: str, + resource_group_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-12-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return') + path_format_arguments = { + "orderItemName": _SERIALIZER.url("order_item_name", order_item_name, 'str'), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str', min_length=1), + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + + 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 EdgeOrderManagementClientOperationsMixin(object): + @distributed_trace def list_operations( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationListResult"] + **kwargs: Any + ) -> Iterable["_models.OperationListResult"]: """This method gets all the operations that are exposed for customer. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -44,30 +882,27 @@ def list_operations( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_operations.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_operations_request( + template_url=self.list_operations.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_operations_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) @@ -80,24 +915,25 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_operations.metadata = {'url': '/providers/Microsoft.EdgeOrder/operations'} # type: ignore + @distributed_trace def list_addresses_at_subscription_level( self, - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.AddressResourceList"] + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.AddressResourceList"]: """Lists all the addresses available under the subscription. :param filter: $filter is supported to filter based on shipping address properties. Filter @@ -108,7 +944,8 @@ def list_addresses_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -116,38 +953,33 @@ def list_addresses_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_addresses_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_subscription_level.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_addresses_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -160,25 +992,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace def list_product_families( self, - product_families_request, # type: "_models.ProductFamiliesRequest" - expand=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProductFamilies"] + product_families_request: "_models.ProductFamiliesRequest", + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.ProductFamilies"]: """This method provides the list of product families for the given subscription. :param product_families_request: Filters for showing the product families. @@ -194,51 +1027,46 @@ def list_product_families( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamilies] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamilies"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_product_families.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + template_url=self.list_product_families.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(product_families_request, 'ProductFamiliesRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(product_families_request, 'ProductFamiliesRequest') + + request = build_list_product_families_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + expand=expand, + skip_token=skip_token, + 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('ProductFamilies', pipeline_response) + deserialized = self._deserialize("ProductFamilies", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -251,24 +1079,25 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listProductFamilies'} # type: ignore + @distributed_trace def list_configurations( self, - configurations_request, # type: "_models.ConfigurationsRequest" - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.Configurations"] + configurations_request: "_models.ConfigurationsRequest", + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.Configurations"]: """This method provides the list of configurations for the given product family, product line and product under subscription. @@ -282,49 +1111,44 @@ def list_configurations( :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.Configurations] :raises: ~azure.core.exceptions.HttpResponseError """ + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Configurations"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_configurations.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + template_url=self.list_configurations.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(configurations_request, 'ConfigurationsRequest') - body_content_kwargs['content'] = body_content - request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + _json = self._serialize.body(configurations_request, 'ConfigurationsRequest') + + request = build_list_configurations_request( + subscription_id=self._config.subscription_id, + content_type=content_type, + json=_json, + skip_token=skip_token, + 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('Configurations', pipeline_response) + deserialized = self._deserialize("Configurations", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -337,31 +1161,34 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/listConfigurations'} # type: ignore + @distributed_trace def list_product_families_metadata( self, - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ProductFamiliesMetadata"] + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.ProductFamiliesMetadata"]: """This method provides the list of product families metadata for the given subscription. :param skip_token: $skipToken is supported on list of product families metadata, which provides the next page in the list of product families metadata. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ProductFamiliesMetadata or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] + :return: An iterator like instance of either ProductFamiliesMetadata or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesMetadata] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamiliesMetadata"] @@ -369,36 +1196,31 @@ def list_product_families_metadata( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_product_families_metadata.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.post(url, query_parameters, header_parameters) + + request = build_list_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_product_families_metadata.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_product_families_metadata_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('ProductFamiliesMetadata', pipeline_response) + deserialized = self._deserialize("ProductFamiliesMetadata", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -411,23 +1233,24 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_product_families_metadata.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/productFamiliesMetadata'} # type: ignore + @distributed_trace def list_order_at_subscription_level( self, - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderResourceList"] + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderResourceList"]: """Lists order at subscription level. :param skip_token: $skipToken is supported on Get list of order, which provides the next page @@ -435,7 +1258,8 @@ def list_order_at_subscription_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -443,36 +1267,31 @@ def list_order_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + template_url=self.list_order_at_subscription_level.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_order_at_subscription_level_request( + subscription_id=self._config.subscription_id, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -485,25 +1304,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace def list_order_items_at_subscription_level( self, - filter=None, # type: Optional[str] - expand=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderItemResourceList"] + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderItemResourceList"]: """Lists order item at subscription level. :param filter: $filter is supported to filter based on order id. Filter supports only equals @@ -518,8 +1338,10 @@ def list_order_items_at_subscription_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -527,40 +1349,35 @@ def list_order_items_at_subscription_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_items_at_subscription_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_subscription_level.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_order_items_at_subscription_level_request( + subscription_id=self._config.subscription_id, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -573,25 +1390,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_subscription_level.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace def list_addresses_at_resource_group_level( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.AddressResourceList"] + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.AddressResourceList"]: """Lists all the addresses available under the given resource group. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -604,7 +1422,8 @@ def list_addresses_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AddressResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] @@ -612,39 +1431,35 @@ def list_addresses_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_addresses_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + template_url=self.list_addresses_at_resource_group_level.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_addresses_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + skip_token=skip_token, + 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('AddressResourceList', pipeline_response) + deserialized = self._deserialize("AddressResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -657,24 +1472,25 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_addresses_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses'} # type: ignore + @distributed_trace def get_address_by_name( self, - address_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.AddressResource" + address_name: str, + resource_group_name: str, + **kwargs: Any + ) -> "_models.AddressResource": """Gets information about the specified address. :param address_name: The name of the address Resource within the specified resource group. @@ -693,33 +1509,23 @@ def get_address_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self.get_address_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self.get_address_by_name.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.failsafe_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('AddressResource', pipeline_response) @@ -728,54 +1534,44 @@ def get_address_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + def _create_address_initial( self, - address_name, # type: str - resource_group_name, # type: str - address_resource, # type: "_models.AddressResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_resource: "_models.AddressResource", + **kwargs: Any + ) -> Optional["_models.AddressResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AddressResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(address_resource, 'AddressResource') + + request = build_create_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_address_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(address_resource, 'AddressResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -785,16 +1581,18 @@ def _create_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace def begin_create_address( self, - address_name, # type: str - resource_group_name, # type: str - address_resource, # type: "_models.AddressResource" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_resource: "_models.AddressResource", + **kwargs: Any + ) -> LROPoller["_models.AddressResource"]: """Creates a new address with the specified parameters. Existing address can be updated with this API. @@ -808,15 +1606,19 @@ def begin_create_address( :type address_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource 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 AddressResource or the result of + cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -828,27 +1630,21 @@ def begin_create_address( address_name=address_name, resource_group_name=resource_group_name, address_resource=address_resource, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -860,61 +1656,51 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore def _delete_address_by_name_initial( self, - address_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + address_name: str, + resource_group_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 = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self._delete_address_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_address_by_name_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_address_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_address_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace def begin_delete_address_by_name( self, - address_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + address_name: str, + resource_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Deletes an address. :param address_name: The name of the address Resource within the specified resource group. @@ -925,15 +1711,17 @@ def begin_delete_address_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -947,21 +1735,14 @@ def begin_delete_address_by_name( 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 = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -973,57 +1754,45 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_address_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore def _update_address_initial( self, - address_name, # type: str - resource_group_name, # type: str - address_update_parameter, # type: "_models.AddressUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_update_parameter: "_models.AddressUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.AddressResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AddressResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_address_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(address_update_parameter, 'AddressUpdateParameter') + + request = build_update_address_request_initial( + address_name=address_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_address_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1033,17 +1802,19 @@ def _update_address_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + @distributed_trace def begin_update_address( self, - address_name, # type: str - resource_group_name, # type: str - address_update_parameter, # type: "_models.AddressUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.AddressResource"] + address_name: str, + resource_group_name: str, + address_update_parameter: "_models.AddressUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.AddressResource"]: """Updates the properties of an existing address. :param address_name: The name of the address Resource within the specified resource group. @@ -1059,15 +1830,19 @@ def begin_update_address( :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 AddressResource 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 AddressResource or the result of + cls(response) :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource] - :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.AddressResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1080,27 +1855,21 @@ def begin_update_address( resource_group_name=resource_group_name, address_update_parameter=address_update_parameter, if_match=if_match, + 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('AddressResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'addressName': self._serialize.url("address_name", address_name, 'str', max_length=24, min_length=3, pattern=r'^[-\w\.]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1112,15 +1881,16 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + @distributed_trace def list_order_at_resource_group_level( self, - resource_group_name, # type: str - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderResourceList"] + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderResourceList"]: """Lists order at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1130,7 +1900,8 @@ def list_order_at_resource_group_level( :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OrderResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] @@ -1138,37 +1909,33 @@ def list_order_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + template_url=self.list_order_at_resource_group_level.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_order_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + skip_token=skip_token, + 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('OrderResourceList', pipeline_response) + deserialized = self._deserialize("OrderResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1181,25 +1948,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orders'} # type: ignore + @distributed_trace def get_order_by_name( self, - order_name, # type: str - resource_group_name, # type: str - location, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.OrderResource" + order_name: str, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> "_models.OrderResource": """Gets an order. :param order_name: The name of the order. @@ -1218,34 +1986,24 @@ def get_order_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self.get_order_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderName': self._serialize.url("order_name", order_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'location': self._serialize.url("location", location, 'str', min_length=1), - } - url = self._client.format_url(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_order_by_name_request( + order_name=order_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + location=location, + template_url=self.get_order_by_name.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.failsafe_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('OrderResource', pipeline_response) @@ -1254,17 +2012,19 @@ def get_order_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/locations/{location}/orders/{orderName}'} # type: ignore + + @distributed_trace def list_order_items_at_resource_group_level( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - expand=None, # type: Optional[str] - skip_token=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OrderItemResourceList"] + resource_group_name: str, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> Iterable["_models.OrderItemResourceList"]: """Lists order item at resource group level. :param resource_group_name: The name of the resource group. The name is case insensitive. @@ -1281,8 +2041,10 @@ def list_order_items_at_resource_group_level( page in the list of order items. :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either OrderItemResourceList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] + :return: An iterator like instance of either OrderItemResourceList or the result of + cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] @@ -1290,41 +2052,37 @@ def list_order_items_at_resource_group_level( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-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_order_items_at_resource_group_level.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - if skip_token is not None: - query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + + request = build_list_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + template_url=self.list_order_items_at_resource_group_level.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_order_items_at_resource_group_level_request( + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + filter=filter, + expand=expand, + skip_token=skip_token, + 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('OrderItemResourceList', pipeline_response) + deserialized = self._deserialize("OrderItemResourceList", pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1337,25 +2095,26 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_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_order_items_at_resource_group_level.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems'} # type: ignore + @distributed_trace def get_order_item_by_name( self, - order_item_name, # type: str - resource_group_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.OrderItemResource" + order_item_name: str, + resource_group_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.OrderItemResource": """Gets an order item. :param order_item_name: The name of the order item. @@ -1377,35 +2136,24 @@ def get_order_item_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self.get_order_item_by_name.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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 expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = build_get_order_item_by_name_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + expand=expand, + template_url=self.get_order_item_by_name.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.failsafe_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('OrderItemResource', pipeline_response) @@ -1414,54 +2162,44 @@ def get_order_item_by_name( return cls(pipeline_response, deserialized, {}) return deserialized + get_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + def _create_order_item_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_resource, # type: "_models.OrderItemResource" - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_resource: "_models.OrderItemResource", + **kwargs: Any + ) -> Optional["_models.OrderItemResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OrderItemResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(order_item_resource, 'OrderItemResource') + + request = build_create_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._create_order_item_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(order_item_resource, 'OrderItemResource') - 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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1471,16 +2209,18 @@ def _create_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _create_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace def begin_create_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_resource, # type: "_models.OrderItemResource" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_resource: "_models.OrderItemResource", + **kwargs: Any + ) -> LROPoller["_models.OrderItemResource"]: """Creates an order item. Existing order item cannot be updated with this api and should instead be updated with the Update order item API. @@ -1492,15 +2232,20 @@ def begin_create_order_item( :type order_item_resource: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1512,27 +2257,21 @@ def begin_create_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, order_item_resource=order_item_resource, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1544,61 +2283,51 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore def _delete_order_item_by_name_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + order_item_name: str, + resource_group_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 = "2021-12-01" - accept = "application/json" - - # Construct URL - url = self._delete_order_item_by_name_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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_order_item_by_name_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + template_url=self._delete_order_item_by_name_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 [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_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_order_item_by_name_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace def begin_delete_order_item_by_name( self, - order_item_name, # type: str - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + order_item_name: str, + resource_group_name: str, + **kwargs: Any + ) -> LROPoller[None]: """Deletes an order item. :param order_item_name: The name of the order item. @@ -1607,15 +2336,17 @@ def begin_delete_order_item_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1629,21 +2360,14 @@ def begin_delete_order_item_by_name( 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1655,57 +2379,45 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_order_item_by_name.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore def _update_order_item_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_update_parameter, # type: "_models.OrderItemUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_update_parameter: "_models.OrderItemUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.OrderItemResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OrderItemResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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] - if if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _json = self._serialize.body(order_item_update_parameter, 'OrderItemUpdateParameter') + + request = build_update_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + if_match=if_match, + template_url=self._update_order_item_initial.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, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -1715,17 +2427,19 @@ def _update_order_item_initial( return cls(pipeline_response, deserialized, {}) return deserialized + _update_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + @distributed_trace def begin_update_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - order_item_update_parameter, # type: "_models.OrderItemUpdateParameter" - if_match=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.OrderItemResource"] + order_item_name: str, + resource_group_name: str, + order_item_update_parameter: "_models.OrderItemUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> LROPoller["_models.OrderItemResource"]: """Updates the properties of an existing order item. :param order_item_name: The name of the order item. @@ -1733,21 +2447,27 @@ def begin_update_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param order_item_update_parameter: order item update parameters from request body. - :type order_item_update_parameter: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter + :type order_item_update_parameter: + ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemUpdateParameter :param if_match: Defines the If-Match condition. The patch will be performed only if the ETag of the order on the server matches this value. :type if_match: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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 OrderItemResource or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] - :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 OrderItemResource or the result of + cls(response) + :rtype: + ~azure.core.polling.LROPoller[~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource] + :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.OrderItemResource"] lro_delay = kwargs.pop( 'polling_interval', @@ -1760,27 +2480,21 @@ def begin_update_order_item( resource_group_name=resource_group_name, order_item_update_parameter=order_item_update_parameter, if_match=if_match, + 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('OrderItemResource', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1792,16 +2506,17 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + @distributed_trace def cancel_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - cancellation_reason, # type: "_models.CancellationReason" - **kwargs # type: Any - ): - # type: (...) -> None + order_item_name: str, + resource_group_name: str, + cancellation_reason: "_models.CancellationReason", + **kwargs: Any + ) -> None: """Cancel order item. :param order_item_name: The name of the order item. @@ -1820,38 +2535,28 @@ def cancel_order_item( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.cancel_order_item.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(cancellation_reason, 'CancellationReason') + + request = build_cancel_order_item_request( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self.cancel_order_item.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(cancellation_reason, 'CancellationReason') - 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, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1859,66 +2564,56 @@ def cancel_order_item( cancel_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/cancel'} # type: ignore + def _return_order_item_initial( self, - order_item_name, # type: str - resource_group_name, # type: str - return_order_item_details, # type: "_models.ReturnOrderItemDetails" - **kwargs # type: Any - ): - # type: (...) -> None + order_item_name: str, + resource_group_name: str, + return_order_item_details: "_models.ReturnOrderItemDetails", + **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 = "2021-12-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._return_order_item_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - url = self._client.format_url(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(return_order_item_details, 'ReturnOrderItemDetails') + + request = build_return_order_item_request_initial( + order_item_name=order_item_name, + subscription_id=self._config.subscription_id, + resource_group_name=resource_group_name, + content_type=content_type, + json=_json, + template_url=self._return_order_item_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(return_order_item_details, 'ReturnOrderItemDetails') - 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.failsafe_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, {}) _return_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore + + @distributed_trace def begin_return_order_item( self, - order_item_name, # type: str - resource_group_name, # type: str - return_order_item_details, # type: "_models.ReturnOrderItemDetails" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + order_item_name: str, + resource_group_name: str, + return_order_item_details: "_models.ReturnOrderItemDetails", + **kwargs: Any + ) -> LROPoller[None]: """Return order item. :param order_item_name: The name of the order item. @@ -1926,18 +2621,22 @@ def begin_return_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param return_order_item_details: Return order item CurrentStatus. - :type return_order_item_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails + :type return_order_item_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.ReturnOrderItemDetails :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :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', @@ -1949,24 +2648,18 @@ def begin_return_order_item( order_item_name=order_item_name, resource_group_name=resource_group_name, return_order_item_details=return_order_item_details, + 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 = { - 'orderItemName': self._serialize.url("order_item_name", order_item_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - } - 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: @@ -1978,4 +2671,5 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_return_order_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}/return'} # type: ignore