diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md b/sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md index 90701112138a..23c8c5114841 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md +++ b/sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md @@ -1,5 +1,24 @@ # Release History +## 1.0.0 (2021-12-23) + +**Features** + + - Model OrderItemDetails has a new parameter management_rp_details_list + - Model ReturnOrderItemDetails has a new parameter shipping_box_required + - Model ReturnOrderItemDetails has a new parameter service_tag + - Model AddressResource has a new parameter address_validation_status + - Model DeviceDetails has a new parameter management_resource_tenant_id + - Model ProductFamily has a new parameter resource_provider_details + - Model ProductFamilyProperties has a new parameter resource_provider_details + - Model ProductFamiliesMetadataDetails has a new parameter resource_provider_details + - Model ProductDetails has a new parameter product_double_encryption_status + - Model AddressProperties has a new parameter address_validation_status + +**Breaking changes** + + - Operation EdgeOrderManagementClientOperationsMixin.list_order_items_at_subscription_level has a new signature + ## 1.0.0b1 (2021-07-27) * Initial Release diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json b/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json index d96537615fcd..c6dafdaa517c 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json +++ b/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.2", + "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.1", + "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "f985f05e68b7720cd5cd4c55bd89ce8463f7e554", + "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.1 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "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", "readme": "specification/edgeorder/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__init__.py index 6a0b62b08a4c..9b25065a52f8 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__init__.py @@ -7,9 +7,6 @@ # -------------------------------------------------------------------------- from ._edge_order_management_client import EdgeOrderManagementClient -from ._version import VERSION - -__version__ = VERSION __all__ = ['EdgeOrderManagementClient'] try: 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 1ef1c6f5917f..99ef324273b8 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py @@ -1,11 +1,13 @@ # 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. +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. # -------------------------------------------------------------------------- - from typing import TYPE_CHECKING from azure.core.configuration import Configuration @@ -20,7 +22,6 @@ from azure.core.credentials import TokenCredential - class EdgeOrderManagementClientConfiguration(Configuration): """Configuration for EdgeOrderManagementClient. @@ -48,9 +49,8 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-12-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-edgeorder/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-edgeorder/{}'.format(VERSION)) self._configure(**kwargs) def _configure( 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 fb1dad36ff75..dd000ceba0d1 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 @@ -1,16 +1,24 @@ # 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. +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. # -------------------------------------------------------------------------- from typing import TYPE_CHECKING from azure.mgmt.core import ARMPipelineClient +from azure.profiles import KnownProfiles, ProfileDefinition +from azure.profiles.multiapiclient import MultiApiClientMixin from msrest import Deserializer, Serializer +from ._configuration import EdgeOrderManagementClientConfiguration +from ._operations_mixin import EdgeOrderManagementClientOperationsMixin + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any, Optional @@ -18,68 +26,87 @@ from azure.core.credentials import TokenCredential from azure.core.pipeline.transport import HttpRequest, HttpResponse -from ._configuration import EdgeOrderManagementClientConfiguration -from .operations import EdgeOrderManagementClientOperationsMixin -from . import models +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass +class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): + """The EdgeOrder Client. -class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): - """Edge Order API's. + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. :param credential: Credential needed for the client to connect to Azure. :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 + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ + DEFAULT_API_VERSION = '2021-12-01' + _PROFILE_TAG = "azure.mgmt.edgeorder.EdgeOrderManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str + api_version=None, # type: Optional[str] base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): - # type: (...) -> None 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__( + api_version=api_version, + profile=profile + ) - 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) - + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: - :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. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + * 2020-12-01-preview: :mod:`v2020_12_01_preview.models` + * 2021-12-01: :mod:`v2021_12_01.models` """ - 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 + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview import models + return models + elif api_version == '2021-12-01': + from .v2021_12_01 import models + return models + raise ValueError("API version {} is not available".format(api_version)) def close(self): - # type: () -> None self._client.close() - def __enter__(self): - # type: () -> EdgeOrderManagementClient self._client.__enter__() return self - def __exit__(self, *exc_details): - # type: (Any) -> None self._client.__exit__(*exc_details) 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 new file mode 100644 index 000000000000..7327f72cb09a --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_operations_mixin.py @@ -0,0 +1,804 @@ +# 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 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 + + +class EdgeOrderManagementClientOperationsMixin(object): + + def begin_create_address( + self, + address_name, # type: str + resource_group_name, # type: str + address_resource, # type: "_models.AddressResource" + **kwargs # type: Any + ): + """Creates a new address with the specified parameters. Existing address can be updated with this + API. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param address_resource: Address details from request body. + :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. + :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.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': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_create_address'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_create_address(address_name, resource_group_name, address_resource, **kwargs) + + 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 + ): + """Creates an order item. Existing order item cannot be updated with this api and should instead + be updated with the Update order item API. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param order_item_resource: Order item details from request body. + :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. + :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: + """ + api_version = self._get_api_version('begin_create_order_item') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_create_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_create_order_item(order_item_name, resource_group_name, order_item_resource, **kwargs) + + def begin_delete_address_by_name( + self, + address_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + """Deletes an address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_delete_address_by_name') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_delete_address_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_delete_address_by_name(address_name, resource_group_name, **kwargs) + + def begin_delete_order_item_by_name( + self, + order_item_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + """Deletes an order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_delete_order_item_by_name') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_delete_order_item_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_delete_order_item_by_name(order_item_name, resource_group_name, **kwargs) + + 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 + ): + """Return order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_return_order_item') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_return_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_return_order_item(order_item_name, resource_group_name, return_order_item_details, **kwargs) + + 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 + ): + """Updates the properties of an existing address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :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.v2021_12_01.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. + :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.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': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_update_address'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_update_address(address_name, resource_group_name, address_update_parameter, if_match, **kwargs) + + 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 + ): + """Updates the properties of an existing order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :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. + :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: + """ + api_version = self._get_api_version('begin_update_order_item') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_update_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.begin_update_order_item(order_item_name, resource_group_name, order_item_update_parameter, if_match, **kwargs) + + def cancel_order_item( + self, + order_item_name, # type: str + resource_group_name, # type: str + cancellation_reason, # type: "_models.CancellationReason" + **kwargs # type: Any + ): + """Cancel order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.edgeorder.v2021_12_01.models.CancellationReason + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('cancel_order_item') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'cancel_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.cancel_order_item(order_item_name, resource_group_name, cancellation_reason, **kwargs) + + def get_address_by_name( + self, + address_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + """Gets information about the specified address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_address_by_name') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_address_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.get_address_by_name(address_name, resource_group_name, **kwargs) + + def get_order_by_name( + self, + order_name, # type: str + resource_group_name, # type: str + location, # type: str + **kwargs # type: Any + ): + """Gets an order. + + :param order_name: The name of the order. + :type order_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param location: The name of Azure region. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_order_by_name') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_order_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.get_order_by_name(order_name, resource_group_name, location, **kwargs) + + 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 + ): + """Gets an order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderItemResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_order_item_by_name') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_order_item_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.get_order_item_by_name(order_item_name, resource_group_name, expand, **kwargs) + + 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 + ): + """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. + :type resource_group_name: str + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of address. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_addresses_at_resource_group_level') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_addresses_at_resource_group_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_addresses_at_resource_group_level(resource_group_name, filter, skip_token, **kwargs) + + def list_addresses_at_subscription_level( + self, + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + """Lists all the addresses available under the subscription. + + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of addresses. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_addresses_at_subscription_level') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_addresses_at_subscription_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_addresses_at_subscription_level(filter, skip_token, **kwargs) + + def list_configurations( + self, + configurations_request, # type: "_models.ConfigurationsRequest" + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + """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.v2021_12_01.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.v2021_12_01.models.Configurations] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_configurations') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_configurations'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_configurations(configurations_request, skip_token, **kwargs) + + def list_operations( + self, + **kwargs # type: Any + ): + """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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_operations') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_operations'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_operations(**kwargs) + + def list_order_at_resource_group_level( + self, + resource_group_name, # type: str + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + """Lists order at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_at_resource_group_level') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_at_resource_group_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_at_resource_group_level(resource_group_name, skip_token, **kwargs) + + def list_order_at_subscription_level( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + """Lists order at subscription level. + + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_at_subscription_level') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_at_subscription_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_at_subscription_level(skip_token, **kwargs) + + 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 + ): + """Lists order item at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_items_at_resource_group_level') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_items_at_resource_group_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_items_at_resource_group_level(resource_group_name, filter, expand, skip_token, **kwargs) + + 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 + ): + """Lists order item at subscription level. + + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_items_at_subscription_level') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_items_at_subscription_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_items_at_subscription_level(filter, expand, skip_token, **kwargs) + + 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 + ): + """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.v2021_12_01.models.ProductFamiliesRequest + :param expand: $expand is supported on configurations parameter for product, which provides + details on the configurations for the product. + :type expand: str + :param skip_token: $skipToken is supported on list of product families, which provides the next + page in the list of 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.v2021_12_01.models.ProductFamilies] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_product_families') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_product_families'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_product_families(product_families_request, expand, skip_token, **kwargs) + + def list_product_families_metadata( + self, + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + """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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_product_families_metadata') + if api_version == '2020-12-01-preview': + from .v2020_12_01_preview.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from .v2021_12_01.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_product_families_metadata'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_product_families_metadata(skip_token, **kwargs) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_version.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_version.py index e5754a47ce68..c47f66669f1b 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_version.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0" 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 4a36ece13ef1..c1c21c4043e8 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 @@ -1,11 +1,13 @@ # 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. +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. # -------------------------------------------------------------------------- - from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -18,7 +20,6 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential - class EdgeOrderManagementClientConfiguration(Configuration): """Configuration for EdgeOrderManagementClient. @@ -35,7 +36,7 @@ def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, - **kwargs: Any + **kwargs # type: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -45,9 +46,8 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-12-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-edgeorder/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'azure-mgmt-edgeorder/{}'.format(VERSION)) self._configure(**kwargs) def _configure( 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 9a5077d68da3..238c8eb3baa3 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 @@ -1,78 +1,110 @@ # 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. +# 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. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. # -------------------------------------------------------------------------- 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 from msrest import Deserializer, Serializer +from ._configuration import EdgeOrderManagementClientConfiguration +from ._operations_mixin import EdgeOrderManagementClientOperationsMixin + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration import EdgeOrderManagementClientConfiguration -from .operations import EdgeOrderManagementClientOperationsMixin -from .. import models +class _SDKClient(object): + def __init__(self, *args, **kwargs): + """This is a fake class to support current implemetation of MultiApiClientMixin." + Will be removed in final version of multiapi azure-core based client + """ + pass +class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin, MultiApiClientMixin, _SDKClient): + """The EdgeOrder Client. -class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): - """Edge Order API's. + This ready contains multiple API versions, to help you deal with all of the Azure clouds + (Azure Stack, Azure Government, Azure China, etc.). + By default, it uses the latest API version available on public Azure. + For production, you should stick to a particular api-version and/or profile. + The profile sets a mapping between an operation group and its API version. + The api-version parameter sets the default API version if the operation + group is not described in the profile. :param credential: Credential needed for the client to connect to Azure. :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 + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str + :param profile: A profile definition, from KnownProfiles to dict. + :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ + DEFAULT_API_VERSION = '2021-12-01' + _PROFILE_TAG = "azure.mgmt.edgeorder.EdgeOrderManagementClient" + LATEST_PROFILE = ProfileDefinition({ + _PROFILE_TAG: { + None: DEFAULT_API_VERSION, + }}, + _PROFILE_TAG + " latest" + ) + def __init__( self, credential: "AsyncTokenCredential", subscription_id: str, + api_version: Optional[str] = None, base_url: Optional[str] = None, - **kwargs: Any + 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__( + api_version=api_version, + profile=profile + ) - 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) - + @classmethod + def _models_dict(cls, api_version): + return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)} - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. + @classmethod + def models(cls, api_version=DEFAULT_API_VERSION): + """Module depends on the API version: - :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. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + * 2020-12-01-preview: :mod:`v2020_12_01_preview.models` + * 2021-12-01: :mod:`v2021_12_01.models` """ - 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 + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview import models + return models + elif api_version == '2021-12-01': + from ..v2021_12_01 import models + return models + raise ValueError("API version {} is not available".format(api_version)) - async def close(self) -> None: + async def close(self): await self._client.close() - - async def __aenter__(self) -> "EdgeOrderManagementClient": + async def __aenter__(self): await self._client.__aenter__() return self - - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details): await self._client.__aexit__(*exc_details) 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 new file mode 100644 index 000000000000..b703caa3df4a --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_operations_mixin.py @@ -0,0 +1,800 @@ +# 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 msrest import Serializer, Deserializer +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.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + + +class EdgeOrderManagementClientOperationsMixin(object): + + async def begin_create_address( + self, + address_name: str, + resource_group_name: str, + address_resource: "_models.AddressResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.AddressResource"]: + """Creates a new address with the specified parameters. Existing address can be updated with this + API. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param address_resource: Address details from request body. + :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. + :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: + """ + api_version = self._get_api_version('begin_create_address') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_create_address'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_create_address(address_name, resource_group_name, address_resource, **kwargs) + + async def begin_create_order_item( + self, + order_item_name: str, + resource_group_name: str, + order_item_resource: "_models.OrderItemResource", + **kwargs: Any + ) -> AsyncLROPoller["_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. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param order_item_resource: Order item details from request body. + :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. + :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: + """ + api_version = self._get_api_version('begin_create_order_item') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_create_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_create_order_item(order_item_name, resource_group_name, order_item_resource, **kwargs) + + async def begin_delete_address_by_name( + self, + address_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_delete_address_by_name') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_delete_address_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_delete_address_by_name(address_name, resource_group_name, **kwargs) + + async def begin_delete_order_item_by_name( + self, + order_item_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_delete_order_item_by_name') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_delete_order_item_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_delete_order_item_by_name(order_item_name, resource_group_name, **kwargs) + + async def begin_return_order_item( + self, + order_item_name: str, + resource_group_name: str, + return_order_item_details: "_models.ReturnOrderItemDetails", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Return order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + api_version = self._get_api_version('begin_return_order_item') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_return_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_return_order_item(order_item_name, resource_group_name, return_order_item_details, **kwargs) + + async def begin_update_address( + self, + address_name: str, + resource_group_name: str, + address_update_parameter: "_models.AddressUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.AddressResource"]: + """Updates the properties of an existing address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :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.v2021_12_01.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. + :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: + """ + api_version = self._get_api_version('begin_update_address') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_update_address'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_update_address(address_name, resource_group_name, address_update_parameter, if_match, **kwargs) + + async def begin_update_order_item( + self, + order_item_name: str, + resource_group_name: str, + order_item_update_parameter: "_models.OrderItemUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.OrderItemResource"]: + """Updates the properties of an existing order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :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. + :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: + """ + api_version = self._get_api_version('begin_update_order_item') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'begin_update_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.begin_update_order_item(order_item_name, resource_group_name, order_item_update_parameter, if_match, **kwargs) + + async def cancel_order_item( + self, + 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. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.edgeorder.v2021_12_01.models.CancellationReason + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('cancel_order_item') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'cancel_order_item'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.cancel_order_item(order_item_name, resource_group_name, cancellation_reason, **kwargs) + + async def get_address_by_name( + self, + 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. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_address_by_name') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_address_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.get_address_by_name(address_name, resource_group_name, **kwargs) + + async def get_order_by_name( + self, + order_name: str, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> "_models.OrderResource": + """Gets an order. + + :param order_name: The name of the order. + :type order_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param location: The name of Azure region. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_order_by_name') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_order_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.get_order_by_name(order_name, resource_group_name, location, **kwargs) + + async def get_order_item_by_name( + self, + 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. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderItemResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('get_order_item_by_name') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'get_order_item_by_name'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return await mixin_instance.get_order_item_by_name(order_item_name, resource_group_name, expand, **kwargs) + + def list_addresses_at_resource_group_level( + self, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_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. + :type resource_group_name: str + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of address. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_addresses_at_resource_group_level') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_addresses_at_resource_group_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_addresses_at_resource_group_level(resource_group_name, filter, skip_token, **kwargs) + + def list_addresses_at_subscription_level( + self, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.AddressResourceList"]: + """Lists all the addresses available under the subscription. + + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of addresses. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_addresses_at_subscription_level') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_addresses_at_subscription_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_addresses_at_subscription_level(filter, skip_token, **kwargs) + + def list_configurations( + self, + configurations_request: "_models.ConfigurationsRequest", + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_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.v2021_12_01.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.v2021_12_01.models.Configurations] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_configurations') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_configurations'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_configurations(configurations_request, skip_token, **kwargs) + + def list_operations( + self, + **kwargs: Any + ) -> AsyncItemPaged["_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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_operations') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_operations'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_operations(**kwargs) + + def list_order_at_resource_group_level( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OrderResourceList"]: + """Lists order at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_at_resource_group_level') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_at_resource_group_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_at_resource_group_level(resource_group_name, skip_token, **kwargs) + + def list_order_at_subscription_level( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OrderResourceList"]: + """Lists order at subscription level. + + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_at_subscription_level') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_at_subscription_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_at_subscription_level(skip_token, **kwargs) + + def list_order_items_at_resource_group_level( + self, + resource_group_name: str, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OrderItemResourceList"]: + """Lists order item at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_items_at_resource_group_level') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_items_at_resource_group_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_items_at_resource_group_level(resource_group_name, filter, expand, skip_token, **kwargs) + + def list_order_items_at_subscription_level( + self, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_models.OrderItemResourceList"]: + """Lists order item at subscription level. + + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_order_items_at_subscription_level') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_order_items_at_subscription_level'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_order_items_at_subscription_level(filter, expand, skip_token, **kwargs) + + def list_product_families( + self, + product_families_request: "_models.ProductFamiliesRequest", + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_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.v2021_12_01.models.ProductFamiliesRequest + :param expand: $expand is supported on configurations parameter for product, which provides + details on the configurations for the product. + :type expand: str + :param skip_token: $skipToken is supported on list of product families, which provides the next + page in the list of 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_product_families') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_product_families'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_product_families(product_families_request, expand, skip_token, **kwargs) + + def list_product_families_metadata( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncItemPaged["_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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + api_version = self._get_api_version('list_product_families_metadata') + if api_version == '2020-12-01-preview': + from ..v2020_12_01_preview.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + elif api_version == '2021-12-01': + from ..v2021_12_01.aio.operations import EdgeOrderManagementClientOperationsMixin as OperationClass + else: + raise ValueError("API version {} does not have operation 'list_product_families_metadata'".format(api_version)) + mixin_instance = OperationClass() + mixin_instance._client = self._client + mixin_instance._config = self._config + mixin_instance._serialize = Serializer(self._models_dict(api_version)) + mixin_instance._serialize.client_side_validation = False + mixin_instance._deserialize = Deserializer(self._models_dict(api_version)) + return mixin_instance.list_product_families_metadata(skip_token, **kwargs) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models.py new file mode 100644 index 000000000000..0d8ae70ba26c --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models.py @@ -0,0 +1,7 @@ +# 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. +# -------------------------------------------------------------------------- +from .v2021_12_01.models import * 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 new file mode 100644 index 000000000000..6a0b62b08a4c --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/__init__.py @@ -0,0 +1,19 @@ +# 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 ._edge_order_management_client import EdgeOrderManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['EdgeOrderManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass 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 new file mode 100644 index 000000000000..1ef1c6f5917f --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class EdgeOrderManagementClientConfiguration(Configuration): + """Configuration for EdgeOrderManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + 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 + self.api_version = "2020-12-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-edgeorder/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *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 new file mode 100644 index 000000000000..bd6f90006bc1 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_edge_order_management_client.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +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 ._configuration import EdgeOrderManagementClientConfiguration +from .operations import EdgeOrderManagementClientOperationsMixin +from . import models + + +class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): + """The EdgeOrder Client. + + :param credential: Credential needed for the client to connect to Azure. + :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. + """ + + 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) + 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) + + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, 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. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.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 + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> EdgeOrderManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) 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 new file mode 100644 index 000000000000..7f66d94132f4 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_metadata.json @@ -0,0 +1,444 @@ +{ + "chosen_version": "2020-12-01-preview", + "total_api_version_list": ["2020-12-01-preview"], + "client": { + "name": "EdgeOrderManagementClient", + "filename": "_edge_order_management_client", + "description": "The EdgeOrder Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": 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\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_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\"]}}}" + }, + "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\"]}}}", + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def get_address_by_name(\n self,\n address_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "address_name, resource_group_name" + }, + "_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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def get_order_by_name(\n self,\n order_name: str,\n resource_group_name: str,\n location: str,\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "order_name, resource_group_name, location" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def get_order_item_by_name(\n self,\n order_item_name: str,\n resource_group_name: str,\n expand: Optional[str] = None,\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "order_item_name, resource_group_name, expand" + }, + "_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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def cancel_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n cancellation_reason: \"_models.CancellationReason\",\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "order_item_name, resource_group_name, cancellation_reason" + }, + "_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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "call": "order_item_name, resource_group_name, return_order_item_details" + } + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..c47f66669f1b --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0" 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 new file mode 100644 index 000000000000..b8c98d8145e8 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# 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 ._edge_order_management_client import EdgeOrderManagementClient +__all__ = ['EdgeOrderManagementClient'] 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 new file mode 100644 index 000000000000..4a36ece13ef1 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class EdgeOrderManagementClientConfiguration(Configuration): + """Configuration for EdgeOrderManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + 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 + self.api_version = "2020-12-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-edgeorder/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *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 new file mode 100644 index 000000000000..5c0a179b3789 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/_edge_order_management_client.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport 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 ._configuration import EdgeOrderManagementClientConfiguration +from .operations import EdgeOrderManagementClientOperationsMixin +from .. import models + + +class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): + """The EdgeOrder Client. + + :param credential: Credential needed for the client to connect to Azure. + :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. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: 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) + + 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) + + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> 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. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.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 + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "EdgeOrderManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/operations/__init__.py similarity index 100% rename from sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/__init__.py rename to sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/operations/__init__.py 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 new file mode 100644 index 000000000000..589dd33a42f4 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/aio/operations/_edge_order_management_client_operations.py @@ -0,0 +1,1949 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, 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.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EdgeOrderManagementClientOperationsMixin: + + def list_operations( + self, + **kwargs: Any + ) -> 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.v2020_12_01_preview.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 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 = 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) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_addresses_at_subscription_level( + self, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.AddressResourceList"]: + """Lists all the addresses available under the subscription. + + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of addresses. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AddressResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_product_families( + self, + product_families_request: "_models.ProductFamiliesRequest", + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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. + :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 + :param skip_token: $skipToken is supported on list of product families, which provides the next + page in the list of 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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) + 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) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProductFamilies', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_configurations( + self, + configurations_request: "_models.ConfigurationsRequest", + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_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 + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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) + 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) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('Configurations', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_product_families_metadata( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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.v2020_12_01_preview.models.ProductFamiliesMetadata] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamiliesMetadata"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProductFamiliesMetadata', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_order_at_subscription_level( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OrderResourceList"]: + """Lists order at subscription level. + + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_order_items_at_subscription_level( + self, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OrderItemResourceList"]: + """Lists order item at subscription level. + + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderItemResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_addresses_at_resource_group_level( + self, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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. + :type resource_group_name: str + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of address. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AddressResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + async def get_address_by_name( + self, + 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. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + 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, + 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') + + # 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') + + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + async def begin_create_address( + self, + address_name: str, + resource_group_name: str, + address_resource: "_models.AddressResource", + **kwargs: Any + ) -> AsyncLROPoller["_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. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param address_resource: Address details from request body. + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_address_initial( + address_name=address_name, + resource_group_name=resource_group_name, + address_resource=address_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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 = 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) + + 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 + + async def begin_delete_address_by_name( + self, + address_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_address_by_name_initial( + address_name=address_name, + resource_group_name=resource_group_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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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) + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + async def begin_update_address( + self, + address_name: str, + resource_group_name: str, + address_update_parameter: "_models.AddressUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.AddressResource"]: + """Updates the properties of an existing address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :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 + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_address_initial( + address_name=address_name, + resource_group_name=resource_group_name, + address_update_parameter=address_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + + def list_order_at_resource_group_level( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OrderResourceList"]: + """Lists order at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + async def get_order_by_name( + self, + order_name: str, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> "_models.OrderResource": + """Gets an order. + + :param order_name: The name of the order. + :type order_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param location: The name of Azure region. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrderResource', pipeline_response) + + if cls: + 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 + + def list_order_items_at_resource_group_level( + self, + resource_group_name: str, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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. + :type resource_group_name: str + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderItemResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + async def get_order_item_by_name( + self, + 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. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderItemResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + 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, + 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') + + # 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') + + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + async def begin_create_order_item( + self, + order_item_name: str, + resource_group_name: str, + order_item_resource: "_models.OrderItemResource", + **kwargs: Any + ) -> AsyncLROPoller["_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. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param order_item_resource: Order item details from request body. + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + order_item_resource=order_item_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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 = 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) + + 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 + + async def begin_delete_order_item_by_name( + self, + order_item_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_order_item_by_name_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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) + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + async def begin_update_order_item( + self, + order_item_name: str, + resource_group_name: str, + order_item_update_parameter: "_models.OrderItemUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.OrderItemResource"]: + """Updates the properties of an existing order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + order_item_update_parameter=order_item_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + + async def cancel_order_item( + self, + 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. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CancellationReason + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "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') + + # 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') + + 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + 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') + + # 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') + + 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) + + 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 + + async def begin_return_order_item( + self, + order_item_name: str, + resource_group_name: str, + return_order_item_details: "_models.ReturnOrderItemDetails", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Return order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._return_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + return_order_item_details=return_order_item_details, + 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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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/models/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/__init__.py similarity index 95% rename from sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/__init__.py rename to sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/__init__.py index 9a0ed92ff2fc..67915606ae5b 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/__init__.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/__init__.py @@ -35,6 +35,7 @@ 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 @@ -67,7 +68,9 @@ 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 @@ -104,6 +107,7 @@ 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 @@ -136,7 +140,9 @@ 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 @@ -201,6 +207,7 @@ 'ErrorDetail', 'ErrorResponse', 'FilterableProperty', + 'ForwardShippingDetails', 'HierarchyInformation', 'ImageInformation', 'Link', @@ -233,7 +240,9 @@ 'PurchaseMeterDetails', 'Resource', 'ResourceIdentity', + 'ResourceProviderDetails', 'ReturnOrderItemDetails', + 'ReverseShippingDetails', 'ShippingAddress', 'ShippingDetails', 'Specification', diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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 similarity index 97% rename from sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_edge_order_management_client_enums.py rename to sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_edge_order_management_client_enums.py index 4f8839bebbd0..57c1b4255d38 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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 @@ -126,7 +126,8 @@ class DisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): OUT_OF_STOCK = "OutOfStock" class DoubleEncryptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Defines secondary layer of software-based encryption enablement. + """Double encryption status as entered by the customer. It is compulsory to give this parameter if + the 'Deny' or 'Disabled' policy is configured. """ #: Double encryption is disabled. @@ -192,7 +193,7 @@ class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) DELIVERED = "Delivered" class OrderItemCancellationEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Describes whether the orderItem is cancellable or not. + """Describes whether the order item is cancellable or not. """ #: Order item can be cancelled without fee. @@ -203,7 +204,7 @@ class OrderItemCancellationEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, En NOT_CANCELLABLE = "NotCancellable" class OrderItemReturnEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Describes whether the orderItem is returnable or not. + """Describes whether the order item is returnable or not. """ #: Order item can be returned without fee. 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 new file mode 100644 index 000000000000..7b37e59993f2 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models.py @@ -0,0 +1,2971 @@ +# 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 new file mode 100644 index 000000000000..912abd4af930 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/models/_models_py3.py @@ -0,0 +1,3103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +import datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._edge_order_management_client_enums import * + + +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, + *, + forward_address: "AddressProperties", + **kwargs + ): + super(AddressDetails, self).__init__(**kwargs) + self.forward_address = 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, + *, + contact_details: "ContactDetails", + shipping_address: Optional["ShippingAddress"] = None, + **kwargs + ): + super(AddressProperties, self).__init__(**kwargs) + self.shipping_address = shipping_address + self.contact_details = 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, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = 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, + *, + location: str, + contact_details: "ContactDetails", + tags: Optional[Dict[str, str]] = None, + shipping_address: Optional["ShippingAddress"] = None, + **kwargs + ): + super(AddressResource, self).__init__(tags=tags, location=location, **kwargs) + self.system_data = None + self.shipping_address = shipping_address + self.contact_details = 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, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(AddressResourceList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +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, + *, + tags: Optional[Dict[str, str]] = None, + shipping_address: Optional["ShippingAddress"] = None, + contact_details: Optional["ContactDetails"] = None, + **kwargs + ): + super(AddressUpdateParameter, self).__init__(**kwargs) + self.tags = tags + self.shipping_address = shipping_address + self.contact_details = contact_details + + +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, + *, + reason: str, + **kwargs + ): + super(CancellationReason, self).__init__(**kwargs) + self.reason = 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, + *, + hierarchy_information: "HierarchyInformation", + filterable_property: Optional[List["FilterableProperty"]] = None, + **kwargs + ): + super(ConfigurationFilters, self).__init__(**kwargs) + self.hierarchy_information = hierarchy_information + self.filterable_property = filterable_property + + +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, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(Configurations, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +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, + *, + configuration_filters: List["ConfigurationFilters"], + customer_subscription_details: Optional["CustomerSubscriptionDetails"] = None, + **kwargs + ): + super(ConfigurationsRequest, self).__init__(**kwargs) + self.configuration_filters = configuration_filters + self.customer_subscription_details = customer_subscription_details + + +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, + *, + contact_name: str, + phone: str, + email_list: List[str], + phone_extension: Optional[str] = None, + mobile: Optional[str] = None, + **kwargs + ): + super(ContactDetails, self).__init__(**kwargs) + self.contact_name = contact_name + self.phone = phone + self.phone_extension = phone_extension + self.mobile = mobile + self.email_list = 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, + *, + quota_id: str, + registered_features: Optional[List["CustomerSubscriptionRegisteredFeatures"]] = None, + location_placement_id: Optional[str] = None, + **kwargs + ): + super(CustomerSubscriptionDetails, self).__init__(**kwargs) + self.registered_features = registered_features + self.location_placement_id = location_placement_id + self.quota_id = 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, + *, + name: Optional[str] = None, + state: Optional[str] = None, + **kwargs + ): + super(CustomerSubscriptionRegisteredFeatures, self).__init__(**kwargs) + self.name = name + self.state = state + + +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, + *, + double_encryption_status: Optional[Union[str, "DoubleEncryptionStatus"]] = None, + **kwargs + ): + super(EncryptionPreferences, self).__init__(**kwargs) + self.double_encryption_status = double_encryption_status + + +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, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +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, + *, + type: Union[str, "SupportedFilterTypes"], + supported_values: List[str], + **kwargs + ): + super(FilterableProperty, self).__init__(**kwargs) + self.type = type + self.supported_values = 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, + *, + product_family_name: Optional[str] = None, + product_line_name: Optional[str] = None, + product_name: Optional[str] = None, + configuration_name: Optional[str] = None, + **kwargs + ): + super(HierarchyInformation, self).__init__(**kwargs) + self.product_family_name = product_family_name + self.product_line_name = product_line_name + self.product_name = product_name + self.configuration_name = configuration_name + + +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, + *, + preferred_management_resource_id: Optional[str] = None, + **kwargs + ): + super(ManagementResourcePreferences, self).__init__(**kwargs) + self.preferred_management_resource_id = preferred_management_resource_id + + +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, + *, + stage_name: Union[str, "NotificationStageName"], + send_notification: bool, + **kwargs + ): + super(NotificationPreference, self).__init__(**kwargs) + self.stage_name = stage_name + self.send_notification = 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, + *, + display: Optional["OperationDisplay"] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.is_data_action = None + self.display = display + 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, + *, + product_details: "ProductDetails", + order_item_type: Union[str, "OrderItemType"], + preferences: Optional["Preferences"] = None, + notification_email_list: Optional[List[str]] = None, + **kwargs + ): + super(OrderItemDetails, self).__init__(**kwargs) + self.product_details = product_details + self.order_item_type = order_item_type + self.current_stage = None + self.order_item_stage_history = None + self.preferences = preferences + self.forward_shipping_details = None + self.reverse_shipping_details = None + self.notification_email_list = notification_email_list + 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, + *, + location: str, + order_item_details: "OrderItemDetails", + address_details: "AddressDetails", + order_id: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(OrderItemResource, self).__init__(tags=tags, location=location, **kwargs) + self.system_data = None + self.order_item_details = order_item_details + self.address_details = address_details + self.start_time = None + self.order_id = 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, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(OrderItemResourceList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +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, + *, + tags: Optional[Dict[str, str]] = None, + forward_address: Optional["AddressProperties"] = None, + preferences: Optional["Preferences"] = None, + notification_email_list: Optional[List[str]] = None, + **kwargs + ): + super(OrderItemUpdateParameter, self).__init__(**kwargs) + self.tags = tags + self.forward_address = forward_address + self.preferences = preferences + self.notification_email_list = notification_email_list + + +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, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(OrderResourceList, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +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, + *, + notification_preferences: Optional[List["NotificationPreference"]] = None, + transport_preferences: Optional["TransportPreferences"] = None, + encryption_preferences: Optional["EncryptionPreferences"] = None, + management_resource_preferences: Optional["ManagementResourcePreferences"] = None, + **kwargs + ): + super(Preferences, self).__init__(**kwargs) + self.notification_preferences = notification_preferences + self.transport_preferences = transport_preferences + self.encryption_preferences = encryption_preferences + self.management_resource_preferences = management_resource_preferences + + +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, + *, + hierarchy_information: "HierarchyInformation", + display_info: Optional["DisplayInfo"] = None, + **kwargs + ): + super(ProductDetails, self).__init__(**kwargs) + self.display_info = display_info + self.hierarchy_information = 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, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(ProductFamilies, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +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, + *, + resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, + **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 = resource_provider_details + + +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, + *, + filterable_properties: Dict[str, List["FilterableProperty"]], + customer_subscription_details: Optional["CustomerSubscriptionDetails"] = None, + **kwargs + ): + super(ProductFamiliesRequest, self).__init__(**kwargs) + self.filterable_properties = filterable_properties + self.customer_subscription_details = customer_subscription_details + + +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, + *, + resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, + **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 = resource_provider_details + + +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, + *, + resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, + **kwargs + ): + super(ProductFamilyProperties, self).__init__(**kwargs) + self.product_lines = None + self.resource_provider_details = resource_provider_details + + +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, + *, + type: Optional[str] = None, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + 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, + *, + return_reason: str, + return_address: Optional["AddressProperties"] = None, + service_tag: Optional[str] = None, + shipping_box_required: Optional[bool] = False, + **kwargs + ): + super(ReturnOrderItemDetails, self).__init__(**kwargs) + self.return_address = return_address + self.return_reason = return_reason + self.service_tag = service_tag + self.shipping_box_required = shipping_box_required + + +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, + *, + street_address1: str, + country: str, + street_address2: Optional[str] = None, + street_address3: Optional[str] = None, + city: Optional[str] = None, + state_or_province: Optional[str] = None, + postal_code: Optional[str] = None, + zip_extended_code: Optional[str] = None, + company_name: Optional[str] = None, + address_type: Optional[Union[str, "AddressType"]] = None, + **kwargs + ): + super(ShippingAddress, self).__init__(**kwargs) + self.street_address1 = street_address1 + self.street_address2 = street_address2 + self.street_address3 = street_address3 + self.city = city + self.state_or_province = state_or_province + self.country = country + self.postal_code = postal_code + self.zip_extended_code = zip_extended_code + self.company_name = company_name + self.address_type = address_type + + +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, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + +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, + *, + preferred_shipment_type: Union[str, "TransportShipmentTypes"], + **kwargs + ): + 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/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/operations/__init__.py new file mode 100644 index 000000000000..6003776a8eee --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._edge_order_management_client_operations import EdgeOrderManagementClientOperationsMixin + +__all__ = [ + 'EdgeOrderManagementClientOperationsMixin', +] diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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 similarity index 95% rename from sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/_edge_order_management_client_operations.py rename to sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/operations/_edge_order_management_client_operations.py index d722e59540b2..c72f177b5618 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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 @@ -36,7 +36,7 @@ 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.paging.ItemPaged[~edge_order_management_client.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"] @@ -108,7 +108,7 @@ 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[~edge_order_management_client.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"] @@ -182,7 +182,7 @@ 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: ~edge_order_management_client.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,7 +191,7 @@ 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[~edge_order_management_client.models.ProductFamilies] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.ProductFamilies] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamilies"] @@ -273,13 +273,13 @@ def list_configurations( product under subscription. :param configurations_request: Filters for showing the configurations. - :type configurations_request: ~edge_order_management_client.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[~edge_order_management_client.models.Configurations] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.edgeorder.v2020_12_01_preview.models.Configurations] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Configurations"] @@ -361,7 +361,7 @@ def list_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[~edge_order_management_client.models.ProductFamiliesMetadata] + :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"] @@ -435,7 +435,7 @@ 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[~edge_order_management_client.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"] @@ -499,21 +499,27 @@ def get_next(next_link=None): 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"] - """Lists order at subscription level. + """Lists order item at subscription level. :param filter: $filter is supported to filter based on order id. Filter supports only equals operation. :type filter: str - :param skip_token: $skipToken is supported on Get list of orders, which provides the next page - in the list of order. + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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[~edge_order_management_client.models.OrderItemResourceList] + :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"] @@ -541,6 +547,8 @@ def prepare_request(next_link=None): 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') @@ -596,7 +604,7 @@ 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[~edge_order_management_client.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"] @@ -677,7 +685,7 @@ def get_address_by_name( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AddressResource, or the result of cls(response) - :rtype: ~edge_order_management_client.models.AddressResource + :rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.AddressResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] @@ -797,7 +805,7 @@ def begin_create_address( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param address_resource: Address details from request body. - :type address_resource: ~edge_order_management_client.models.AddressResource + :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. @@ -805,7 +813,7 @@ def begin_create_address( :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[~edge_order_management_client.models.AddressResource] + :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] @@ -1045,7 +1053,7 @@ 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: ~edge_order_management_client.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 @@ -1056,7 +1064,7 @@ def begin_update_address( :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[~edge_order_management_client.models.AddressResource] + :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] @@ -1122,7 +1130,7 @@ 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[~edge_order_management_client.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"] @@ -1202,7 +1210,7 @@ def get_order_by_name( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OrderResource, or the result of cls(response) - :rtype: ~edge_order_management_client.models.OrderResource + :rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResource"] @@ -1264,15 +1272,17 @@ def list_order_items_at_resource_group_level( :param filter: $filter is supported to filter based on order id. Filter supports only equals operation. :type filter: str - :param expand: $expand is supported on device details parameter for order item, which provides - details on the devices of the product. + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. :type expand: str :param skip_token: $skipToken is supported on Get list of order items, which provides the next 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[~edge_order_management_client.models.OrderItemResourceList] + :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"] @@ -1352,12 +1362,14 @@ def get_order_item_by_name( :type order_item_name: str :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param expand: $expand is supported on device details parameter for order item, which provides - details on the devices of the product. + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OrderItemResource, or the result of cls(response) - :rtype: ~edge_order_management_client.models.OrderItemResource + :rtype: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.OrderItemResource :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] @@ -1477,7 +1489,7 @@ def begin_create_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_resource: Order item details from request body. - :type order_item_resource: ~edge_order_management_client.models.OrderItemResource + :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. @@ -1485,7 +1497,7 @@ def begin_create_order_item( :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[~edge_order_management_client.models.OrderItemResource] + :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] @@ -1721,7 +1733,7 @@ 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: ~edge_order_management_client.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 @@ -1732,7 +1744,7 @@ def begin_update_order_item( :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[~edge_order_management_client.models.OrderItemResource] + :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] @@ -1797,7 +1809,7 @@ def cancel_order_item( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cancellation_reason: Reason for cancellation. - :type cancellation_reason: ~edge_order_management_client.models.CancellationReason + :type cancellation_reason: ~azure.mgmt.edgeorder.v2020_12_01_preview.models.CancellationReason :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -1914,7 +1926,7 @@ 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: ~edge_order_management_client.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. diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/py.typed b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2020_12_01_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file 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 new file mode 100644 index 000000000000..6a0b62b08a4c --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/__init__.py @@ -0,0 +1,19 @@ +# 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 ._edge_order_management_client import EdgeOrderManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['EdgeOrderManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass 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 new file mode 100644 index 000000000000..f0a779062d5c --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class EdgeOrderManagementClientConfiguration(Configuration): + """Configuration for EdgeOrderManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + 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 + self.api_version = "2021-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-edgeorder/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *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 new file mode 100644 index 000000000000..bd6f90006bc1 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_edge_order_management_client.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +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 ._configuration import EdgeOrderManagementClientConfiguration +from .operations import EdgeOrderManagementClientOperationsMixin +from . import models + + +class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): + """The EdgeOrder Client. + + :param credential: Credential needed for the client to connect to Azure. + :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. + """ + + 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) + 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) + + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, 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. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.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 + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> EdgeOrderManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) 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 new file mode 100644 index 000000000000..f53b9e9e72d0 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_metadata.json @@ -0,0 +1,444 @@ +{ + "chosen_version": "2021-12-01", + "total_api_version_list": ["2021-12-01"], + "client": { + "name": "EdgeOrderManagementClient", + "filename": "_edge_order_management_client", + "description": "The EdgeOrder Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": 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\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_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\"]}}}" + }, + "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\"]}}}", + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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.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\"\"\"" + }, + "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.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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def get_address_by_name(\n self,\n address_name: str,\n resource_group_name: str,\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "address_name, resource_group_name" + }, + "_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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def get_order_by_name(\n self,\n order_name: str,\n resource_group_name: str,\n location: str,\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "order_name, resource_group_name, location" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def get_order_item_by_name(\n self,\n order_item_name: str,\n resource_group_name: str,\n expand: Optional[str] = None,\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "order_item_name, resource_group_name, expand" + }, + "_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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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", + "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": { + "coroutine": true, + "signature": "async def cancel_order_item(\n self,\n order_item_name: str,\n resource_group_name: str,\n cancellation_reason: \"_models.CancellationReason\",\n **kwargs: Any\n) -\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\"\"\"" + }, + "call": "order_item_name, resource_group_name, cancellation_reason" + }, + "_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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "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\"\"\"" + }, + "call": "order_item_name, resource_group_name, return_order_item_details" + } + } + } +} \ No newline at end of file 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 new file mode 100644 index 000000000000..c47f66669f1b --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0" 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 new file mode 100644 index 000000000000..b8c98d8145e8 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/__init__.py @@ -0,0 +1,10 @@ +# 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 ._edge_order_management_client import EdgeOrderManagementClient +__all__ = ['EdgeOrderManagementClient'] 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 new file mode 100644 index 000000000000..4d23b41124c2 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class EdgeOrderManagementClientConfiguration(Configuration): + """Configuration for EdgeOrderManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + 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 + self.api_version = "2021-12-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-edgeorder/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *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 new file mode 100644 index 000000000000..5c0a179b3789 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/_edge_order_management_client.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport 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 ._configuration import EdgeOrderManagementClientConfiguration +from .operations import EdgeOrderManagementClientOperationsMixin +from .. import models + + +class EdgeOrderManagementClient(EdgeOrderManagementClientOperationsMixin): + """The EdgeOrder Client. + + :param credential: Credential needed for the client to connect to Azure. + :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. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: 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) + + 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) + + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> 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. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.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 + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "EdgeOrderManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/__init__.py new file mode 100644 index 000000000000..6003776a8eee --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._edge_order_management_client_operations import EdgeOrderManagementClientOperationsMixin + +__all__ = [ + 'EdgeOrderManagementClientOperationsMixin', +] 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 new file mode 100644 index 000000000000..0238d927339e --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/aio/operations/_edge_order_management_client_operations.py @@ -0,0 +1,1949 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, 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.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EdgeOrderManagementClientOperationsMixin: + + def list_operations( + self, + **kwargs: Any + ) -> 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 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 = 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) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_addresses_at_subscription_level( + self, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.AddressResourceList"]: + """Lists all the addresses available under the subscription. + + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of addresses. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AddressResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_product_families( + self, + product_families_request: "_models.ProductFamiliesRequest", + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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. + :type product_families_request: ~azure.mgmt.edgeorder.v2021_12_01.models.ProductFamiliesRequest + :param expand: $expand is supported on configurations parameter for product, which provides + details on the configurations for the product. + :type expand: str + :param skip_token: $skipToken is supported on list of product families, which provides the next + page in the list of 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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) + 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) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProductFamilies', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_configurations( + self, + configurations_request: "_models.ConfigurationsRequest", + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_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.v2021_12_01.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.v2021_12_01.models.Configurations] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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) + 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) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('Configurations', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_product_families_metadata( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamiliesMetadata"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ProductFamiliesMetadata', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_order_at_subscription_level( + self, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OrderResourceList"]: + """Lists order at subscription level. + + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_order_items_at_subscription_level( + self, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OrderItemResourceList"]: + """Lists order item at subscription level. + + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderItemResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_addresses_at_resource_group_level( + self, + resource_group_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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. + :type resource_group_name: str + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of address. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AddressResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + async def get_address_by_name( + self, + 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. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + 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, + 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') + + # 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') + + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + async def begin_create_address( + self, + address_name: str, + resource_group_name: str, + address_resource: "_models.AddressResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.AddressResource"]: + """Creates a new address with the specified parameters. Existing address can be updated with this + API. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param address_resource: Address details from request body. + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_address_initial( + address_name=address_name, + resource_group_name=resource_group_name, + address_resource=address_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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 = 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) + + 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 + + async def begin_delete_address_by_name( + self, + address_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_address_by_name_initial( + address_name=address_name, + resource_group_name=resource_group_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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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) + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + async def begin_update_address( + self, + address_name: str, + resource_group_name: str, + address_update_parameter: "_models.AddressUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.AddressResource"]: + """Updates the properties of an existing address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :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.v2021_12_01.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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_address_initial( + address_name=address_name, + resource_group_name=resource_group_name, + address_update_parameter=address_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + + def list_order_at_resource_group_level( + self, + resource_group_name: str, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OrderResourceList"]: + """Lists order at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + async def get_order_by_name( + self, + order_name: str, + resource_group_name: str, + location: str, + **kwargs: Any + ) -> "_models.OrderResource": + """Gets an order. + + :param order_name: The name of the order. + :type order_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param location: The name of Azure region. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrderResource', pipeline_response) + + if cls: + 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 + + def list_order_items_at_resource_group_level( + self, + resource_group_name: str, + filter: Optional[str] = None, + expand: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> 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. + :type resource_group_name: str + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OrderItemResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + async def get_order_item_by_name( + self, + 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. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderItemResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + 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, + 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') + + # 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') + + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + async def begin_create_order_item( + self, + order_item_name: str, + resource_group_name: str, + order_item_resource: "_models.OrderItemResource", + **kwargs: Any + ) -> AsyncLROPoller["_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. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param order_item_resource: Order item details from request body. + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + order_item_resource=order_item_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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 = 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) + + 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 + + async def begin_delete_order_item_by_name( + self, + order_item_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_order_item_by_name_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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( + self, + 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) + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + async def begin_update_order_item( + self, + order_item_name: str, + resource_group_name: str, + order_item_update_parameter: "_models.OrderItemUpdateParameter", + if_match: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.OrderItemResource"]: + """Updates the properties of an existing order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + order_item_update_parameter=order_item_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + + async def cancel_order_item( + self, + 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. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.edgeorder.v2021_12_01.models.CancellationReason + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "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') + + # 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') + + 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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, + 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') + + # 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') + + 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) + + 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 + + async def begin_return_order_item( + self, + order_item_name: str, + resource_group_name: str, + return_order_item_details: "_models.ReturnOrderItemDetails", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Return order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._return_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + return_order_item_details=return_order_item_details, + 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) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 new file mode 100644 index 000000000000..4ad497e9c13d --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/__init__.py @@ -0,0 +1,279 @@ +# 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. +# -------------------------------------------------------------------------- + +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 ._edge_order_management_client_enums import ( + ActionStatusEnum, + ActionType, + AddressType, + AddressValidationStatus, + AvailabilityStage, + BillingType, + ChargingType, + CreatedByType, + DescriptionType, + DisabledReason, + DoubleEncryptionStatus, + ImageType, + LengthHeightUnit, + LinkType, + MeteringType, + NotificationStageName, + OrderItemCancellationEnum, + OrderItemReturnEnum, + OrderItemType, + Origin, + StageName, + StageStatus, + SupportedFilterTypes, + TransportShipmentTypes, + WeightMeasurementUnit, +) + +__all__ = [ + 'AddressDetails', + 'AddressProperties', + 'AddressResource', + 'AddressResourceList', + 'AddressUpdateParameter', + 'AvailabilityInformation', + 'BasicInformation', + 'BillingMeterDetails', + 'CancellationReason', + 'CommonProperties', + 'Configuration', + 'ConfigurationFilters', + 'ConfigurationProperties', + 'Configurations', + 'ConfigurationsRequest', + 'ContactDetails', + 'CostInformation', + 'CustomerSubscriptionDetails', + 'CustomerSubscriptionRegisteredFeatures', + 'Description', + 'DeviceDetails', + 'Dimensions', + 'DisplayInfo', + 'EncryptionPreferences', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', + 'FilterableProperty', + 'ForwardShippingDetails', + 'HierarchyInformation', + 'ImageInformation', + 'Link', + 'ManagementResourcePreferences', + 'MeterDetails', + 'NotificationPreference', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'OrderItemDetails', + 'OrderItemResource', + 'OrderItemResourceList', + 'OrderItemUpdateParameter', + 'OrderResource', + 'OrderResourceList', + 'Pav2MeterDetails', + 'Preferences', + 'Product', + 'ProductDetails', + 'ProductFamilies', + 'ProductFamiliesMetadata', + 'ProductFamiliesMetadataDetails', + 'ProductFamiliesRequest', + 'ProductFamily', + 'ProductFamilyProperties', + 'ProductLine', + 'ProductLineProperties', + 'ProductProperties', + 'ProxyResource', + 'PurchaseMeterDetails', + 'Resource', + 'ResourceIdentity', + 'ResourceProviderDetails', + 'ReturnOrderItemDetails', + 'ReverseShippingDetails', + 'ShippingAddress', + 'ShippingDetails', + 'Specification', + 'StageDetails', + 'SystemData', + 'TrackedResource', + 'TransportPreferences', + 'ActionStatusEnum', + 'ActionType', + 'AddressType', + 'AddressValidationStatus', + 'AvailabilityStage', + 'BillingType', + 'ChargingType', + 'CreatedByType', + 'DescriptionType', + 'DisabledReason', + 'DoubleEncryptionStatus', + 'ImageType', + 'LengthHeightUnit', + 'LinkType', + 'MeteringType', + 'NotificationStageName', + 'OrderItemCancellationEnum', + 'OrderItemReturnEnum', + 'OrderItemType', + 'Origin', + 'StageName', + 'StageStatus', + 'SupportedFilterTypes', + 'TransportShipmentTypes', + 'WeightMeasurementUnit', +] 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 new file mode 100644 index 000000000000..9ca4d57a1387 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_edge_order_management_client_enums.py @@ -0,0 +1,317 @@ +# 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 enum import Enum, EnumMeta +from six import with_metaclass + +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)): + """Describes whether the order item is deletable or not. + """ + + #: Allowed flag. + ALLOWED = "Allowed" + #: Not Allowed flag. + NOT_ALLOWED = "NotAllowed" + +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)): + """Type of address. + """ + + #: Address type not known. + NONE = "None" + #: Residential Address. + RESIDENTIAL = "Residential" + #: Commercial Address. + COMMERCIAL = "Commercial" + +class AddressValidationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of address validation + """ + + #: Address provided is valid. + VALID = "Valid" + #: Address provided is invalid or not supported. + INVALID = "Invalid" + #: Address provided is ambiguous, please choose one of the alternate addresses returned. + AMBIGUOUS = "Ambiguous" + +class AvailabilityStage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current availability stage of the product. Availability stage + """ + + #: Product is available. + AVAILABLE = "Available" + #: Product is coming soon. + COMING_SOON = "ComingSoon" + #: Product is in preview. + PREVIEW = "Preview" + #: Product is deprecated. + DEPRECATED = "Deprecated" + #: Product is available only on signup. + SIGNUP = "Signup" + #: Product is not available. + UNAVAILABLE = "Unavailable" + +class BillingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Represents billing type. + """ + + #: PaV2 billing. + PAV2 = "Pav2" + #: Purchase billing. + PURCHASE = "Purchase" + +class ChargingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Charging type. + """ + + #: Per order charging type. + PER_ORDER = "PerOrder" + #: Per device charging type. + PER_DEVICE = "PerDevice" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DescriptionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of description. + """ + + #: Base description. + BASE = "Base" + +class DisabledReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Reason why the product is disabled. + """ + + #: Not disabled. + NONE = "None" + #: Not available in the requested country. + COUNTRY = "Country" + #: Not available to push data to the requested Azure region. + REGION = "Region" + #: Required features are not enabled. + FEATURE = "Feature" + #: Subscription does not have required offer types. + OFFER_TYPE = "OfferType" + #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription + #: notification. + NO_SUBSCRIPTION_INFO = "NoSubscriptionInfo" + #: The product is not yet available. + NOT_AVAILABLE = "NotAvailable" + #: The product is out of stock. + OUT_OF_STOCK = "OutOfStock" + +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. + """ + + #: Double encryption is disabled. + DISABLED = "Disabled" + #: Double encryption is enabled. + ENABLED = "Enabled" + +class ImageType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the image + """ + + #: Main image. + MAIN_IMAGE = "MainImage" + #: Bullet image. + BULLET_IMAGE = "BulletImage" + #: Generic image. + GENERIC_IMAGE = "GenericImage" + +class LengthHeightUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Unit for the dimensions of length, height and width. + """ + + #: Inch, applicable for West US. + IN_ENUM = "IN" + #: Centimeter. + CM = "CM" + +class LinkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of link + """ + + #: Generic link. + GENERIC = "Generic" + #: Terms and conditions link. + TERMS_AND_CONDITIONS = "TermsAndConditions" + #: Link to product specification. + SPECIFICATION = "Specification" + #: Link to product documentation. + DOCUMENTATION = "Documentation" + #: Link to know more. + KNOW_MORE = "KnowMore" + #: Link to sign up for products. + SIGN_UP = "SignUp" + +class MeteringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Represents Metering type (eg one-time or recurrent) + """ + + #: One time billing. + ONE_TIME = "OneTime" + #: Recurring billing. + RECURRING = "Recurring" + #: Adhoc billing. + ADHOC = "Adhoc" + +class NotificationStageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the stage. + """ + + #: Notification at order item shipped from microsoft datacenter. + SHIPPED = "Shipped" + #: Notification at order item delivered to customer. + DELIVERED = "Delivered" + +class OrderItemCancellationEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes whether the order item is cancellable or not. + """ + + #: Order item can be cancelled without fee. + CANCELLABLE = "Cancellable" + #: Order item can be cancelled with fee. + CANCELLABLE_WITH_FEE = "CancellableWithFee" + #: Order item not cancellable. + NOT_CANCELLABLE = "NotCancellable" + +class OrderItemReturnEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes whether the order item is returnable or not. + """ + + #: Order item can be returned without fee. + RETURNABLE = "Returnable" + #: Order item can be returned with fee. + RETURNABLE_WITH_FEE = "ReturnableWithFee" + #: Order item not returnable. + NOT_RETURNABLE = "NotReturnable" + +class OrderItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Order item type. + """ + + #: Purchase OrderItem. + PURCHASE = "Purchase" + #: Rental OrderItem. + RENTAL = "Rental" + +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" + """ + + USER = "user" + SYSTEM = "system" + USER_SYSTEM = "user,system" + +class StageName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Stage name + """ + + #: Currently in draft mode and can still be cancelled. + PLACED = "Placed" + #: Order is currently in draft mode and can still be cancelled. + IN_REVIEW = "InReview" + #: Order is confirmed. + CONFIRMED = "Confirmed" + #: Order is ready to ship. + READY_TO_SHIP = "ReadyToShip" + #: Order is in transit to customer. + SHIPPED = "Shipped" + #: Order is delivered to customer. + DELIVERED = "Delivered" + #: Order is in use at customer site. + IN_USE = "InUse" + #: Return has been initiated by customer. + RETURN_INITIATED = "ReturnInitiated" + #: Order is in transit from customer to microsoft. + RETURN_PICKED_UP = "ReturnPickedUp" + #: Order has been received back to microsoft. + RETURNED_TO_MICROSOFT = "ReturnedToMicrosoft" + #: Return has now completed. + RETURN_COMPLETED = "ReturnCompleted" + #: Order has been cancelled. + CANCELLED = "Cancelled" + +class StageStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Stage status. + """ + + #: No status available yet. + NONE = "None" + #: Stage is in progress. + IN_PROGRESS = "InProgress" + #: Stage has succeeded. + SUCCEEDED = "Succeeded" + #: Stage has failed. + FAILED = "Failed" + #: Stage has been cancelled. + CANCELLED = "Cancelled" + #: Stage is cancelling. + CANCELLING = "Cancelling" + +class SupportedFilterTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of product filter. + """ + + #: Ship to country. + SHIP_TO_COUNTRIES = "ShipToCountries" + #: Double encryption status. + DOUBLE_ENCRYPTION_STATUS = "DoubleEncryptionStatus" + +class TransportShipmentTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates Shipment Logistics type that the customer preferred. + """ + + #: Shipment Logistics is handled by the customer. + CUSTOMER_MANAGED = "CustomerManaged" + #: Shipment Logistics is handled by Microsoft. + MICROSOFT_MANAGED = "MicrosoftManaged" + +class WeightMeasurementUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Unit for the dimensions of weight. + """ + + #: Pounds. + LBS = "LBS" + #: Kilograms. + KGS = "KGS" diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models.py similarity index 80% rename from sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models.py rename to sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models.py index fe82fbef85e6..ae4b56047e31 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models.py @@ -19,9 +19,9 @@ class AddressDetails(msrest.serialization.Model): :param forward_address: Required. Customer address and contact details. It should be address resource. - :type forward_address: ~edge_order_management_client.models.AddressProperties + :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties :ivar return_address: Return shipping address. - :vartype return_address: ~edge_order_management_client.models.AddressProperties + :vartype return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties """ _validation = { @@ -46,21 +46,29 @@ def __init__( 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: ~edge_order_management_client.models.ShippingAddress + :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress :param contact_details: Required. Contact details for the address. - :type contact_details: ~edge_order_management_client.models.ContactDetails + :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__( @@ -70,6 +78,7 @@ def __init__( 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): @@ -174,11 +183,15 @@ class AddressResource(TrackedResource): :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: ~edge_order_management_client.models.SystemData + :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData :param shipping_address: Shipping details for the address. - :type shipping_address: ~edge_order_management_client.models.ShippingAddress + :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress :param contact_details: Required. Contact details for the address. - :type contact_details: ~edge_order_management_client.models.ContactDetails + :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 = { @@ -188,6 +201,7 @@ class AddressResource(TrackedResource): 'location': {'required': True}, 'system_data': {'readonly': True}, 'contact_details': {'required': True}, + 'address_validation_status': {'readonly': True}, } _attribute_map = { @@ -199,6 +213,7 @@ class AddressResource(TrackedResource): '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__( @@ -209,6 +224,7 @@ def __init__( 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): @@ -217,7 +233,7 @@ class AddressResourceList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of address resources. - :vartype value: list[~edge_order_management_client.models.AddressResource] + :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 """ @@ -247,9 +263,9 @@ class AddressUpdateParameter(msrest.serialization.Model): 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: ~edge_order_management_client.models.ShippingAddress + :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress :param contact_details: Contact details for the address. - :type contact_details: ~edge_order_management_client.models.ContactDetails + :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails """ _attribute_map = { @@ -276,11 +292,11 @@ class AvailabilityInformation(msrest.serialization.Model): :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 ~edge_order_management_client.models.AvailabilityStage + :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 ~edge_order_management_client.models.DisabledReason + :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 """ @@ -315,15 +331,16 @@ class BasicInformation(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation """ _validation = { @@ -365,10 +382,10 @@ class BillingMeterDetails(msrest.serialization.Model): :ivar name: Represents Billing type name. :vartype name: str :ivar meter_details: Represents MeterDetails. - :vartype meter_details: ~edge_order_management_client.models.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 ~edge_order_management_client.models.MeteringType + :vartype metering_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.MeteringType :ivar frequency: Frequency of recurrence. :vartype frequency: str """ @@ -431,17 +448,19 @@ class CommonProperties(BasicInformation): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] """ _validation = { @@ -480,21 +499,23 @@ class Configuration(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~edge_order_management_client.models.Specification] + :vartype specifications: list[~azure.mgmt.edgeorder.v2021_12_01.models.Specification] :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~edge_order_management_client.models.Dimensions + :vartype dimensions: ~azure.mgmt.edgeorder.v2021_12_01.models.Dimensions """ _validation = { @@ -543,9 +564,9 @@ 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: ~edge_order_management_client.models.HierarchyInformation + :type hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation :param filterable_property: Filters specific to product. - :type filterable_property: list[~edge_order_management_client.models.FilterableProperty] + :type filterable_property: list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] """ _validation = { @@ -574,21 +595,23 @@ class ConfigurationProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~edge_order_management_client.models.Specification] + :vartype specifications: list[~azure.mgmt.edgeorder.v2021_12_01.models.Specification] :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~edge_order_management_client.models.Dimensions + :vartype dimensions: ~azure.mgmt.edgeorder.v2021_12_01.models.Dimensions """ _validation = { @@ -630,7 +653,7 @@ class Configurations(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of configurations. - :vartype value: list[~edge_order_management_client.models.Configuration] + :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 """ @@ -660,11 +683,12 @@ class ConfigurationsRequest(msrest.serialization.Model): :param configuration_filters: Required. Holds details about product hierarchy information and filterable property. - :type configuration_filters: list[~edge_order_management_client.models.ConfigurationFilters] + :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: - ~edge_order_management_client.models.CustomerSubscriptionDetails + ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails """ _validation = { @@ -734,7 +758,8 @@ class CostInformation(msrest.serialization.Model): 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[~edge_order_management_client.models.BillingMeterDetails] + :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 """ @@ -765,7 +790,7 @@ class CustomerSubscriptionDetails(msrest.serialization.Model): :param registered_features: List of registered feature flags for subscription. :type registered_features: - list[~edge_order_management_client.models.CustomerSubscriptionRegisteredFeatures] + 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. @@ -821,7 +846,7 @@ class Description(msrest.serialization.Model): 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 ~edge_order_management_client.models.DescriptionType + :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. @@ -831,7 +856,7 @@ class Description(msrest.serialization.Model): :ivar attributes: Attributes for the product system. :vartype attributes: list[str] :ivar links: Links for the product system. - :vartype links: list[~edge_order_management_client.models.Link] + :vartype links: list[~azure.mgmt.edgeorder.v2021_12_01.models.Link] """ _validation = { @@ -874,16 +899,20 @@ class DeviceDetails(msrest.serialization.Model): :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__( @@ -893,6 +922,7 @@ def __init__( 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): @@ -908,13 +938,13 @@ class Dimensions(msrest.serialization.Model): :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 ~edge_order_management_client.models.LengthHeightUnit + :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 ~edge_order_management_client.models.WeightMeasurementUnit + :vartype weight_unit: str or ~azure.mgmt.edgeorder.v2021_12_01.models.WeightMeasurementUnit """ _validation = { @@ -984,10 +1014,11 @@ def __init__( class EncryptionPreferences(msrest.serialization.Model): """Preferences related to the double encryption. - :param double_encryption_status: Defines secondary layer of software-based encryption - enablement. Possible values include: "Disabled", "Enabled". Default value: "Disabled". + :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 - ~edge_order_management_client.models.DoubleEncryptionStatus + ~azure.mgmt.edgeorder.v2021_12_01.models.DoubleEncryptionStatus """ _attribute_map = { @@ -999,7 +1030,7 @@ def __init__( **kwargs ): super(EncryptionPreferences, self).__init__(**kwargs) - self.double_encryption_status = kwargs.get('double_encryption_status', "Disabled") + self.double_encryption_status = kwargs.get('double_encryption_status', None) class ErrorAdditionalInfo(msrest.serialization.Model): @@ -1044,9 +1075,9 @@ class ErrorDetail(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~edge_order_management_client.models.ErrorDetail] + :vartype details: list[~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail] :ivar additional_info: The error additional info. - :vartype additional_info: list[~edge_order_management_client.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.edgeorder.v2021_12_01.models.ErrorAdditionalInfo] """ _validation = { @@ -1081,7 +1112,7 @@ 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: ~edge_order_management_client.models.ErrorDetail + :type error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail """ _attribute_map = { @@ -1103,7 +1134,7 @@ class FilterableProperty(msrest.serialization.Model): :param type: Required. Type of product filter. Possible values include: "ShipToCountries", "DoubleEncryptionStatus". - :type type: str or ~edge_order_management_client.models.SupportedFilterTypes + :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] """ @@ -1127,6 +1158,47 @@ def __init__( 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. @@ -1167,7 +1239,7 @@ class ImageInformation(msrest.serialization.Model): :ivar image_type: Type of the image. Possible values include: "MainImage", "BulletImage", "GenericImage". - :vartype image_type: str or ~edge_order_management_client.models.ImageType + :vartype image_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ImageType :ivar image_url: Url of the image. :vartype image_url: str """ @@ -1198,7 +1270,7 @@ class Link(msrest.serialization.Model): :ivar link_type: Type of link. Possible values include: "Generic", "TermsAndConditions", "Specification", "Documentation", "KnowMore", "SignUp". - :vartype link_type: str or ~edge_order_management_client.models.LinkType + :vartype link_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.LinkType :ivar link_url: Url of the link. :vartype link_url: str """ @@ -1253,11 +1325,11 @@ class MeterDetails(msrest.serialization.Model): :param billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~edge_order_management_client.models.BillingType + :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 ~edge_order_management_client.models.ChargingType + :vartype charging_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ChargingType """ _validation = { @@ -1293,7 +1365,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "Shipped", "Delivered". - :type stage_name: str or ~edge_order_management_client.models.NotificationStageName + :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 """ @@ -1329,14 +1401,14 @@ class Operation(msrest.serialization.Model): 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: ~edge_order_management_client.models.OperationDisplay + :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 ~edge_order_management_client.models.Origin + :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 ~edge_order_management_client.models.ActionType + :vartype action_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ActionType """ _validation = { @@ -1416,7 +1488,7 @@ class OperationListResult(msrest.serialization.Model): 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[~edge_order_management_client.models.Operation] + :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 """ @@ -1448,40 +1520,47 @@ 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: ~edge_order_management_client.models.ProductDetails + :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 ~edge_order_management_client.models.OrderItemType + :type order_item_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemType :ivar current_stage: Current Order item Status. - :vartype current_stage: ~edge_order_management_client.models.StageDetails + :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[~edge_order_management_client.models.StageDetails] + :vartype order_item_stage_history: list[~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails] :param preferences: Customer notification Preferences. - :type preferences: ~edge_order_management_client.models.Preferences + :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences :ivar forward_shipping_details: Forward Package Shipping details. - :vartype forward_shipping_details: ~edge_order_management_client.models.ShippingDetails + :vartype forward_shipping_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.ForwardShippingDetails :ivar reverse_shipping_details: Reverse Package Shipping details. - :vartype reverse_shipping_details: ~edge_order_management_client.models.ShippingDetails + :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 orderItem is cancellable or not. Possible + :ivar cancellation_status: Describes whether the order item is cancellable or not. Possible values include: "Cancellable", "CancellableWithFee", "NotCancellable". :vartype cancellation_status: str or - ~edge_order_management_client.models.OrderItemCancellationEnum + ~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 ~edge_order_management_client.models.ActionStatusEnum + :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 orderItem is returnable or not. Possible values + :ivar return_status: Describes whether the order item is returnable or not. Possible values include: "Returnable", "ReturnableWithFee", "NotReturnable". - :vartype return_status: str or ~edge_order_management_client.models.OrderItemReturnEnum - :ivar management_rp_details: parent RP details. - :vartype management_rp_details: any + :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: ~edge_order_management_client.models.ErrorDetail + :vartype error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail """ _validation = { @@ -1497,6 +1576,7 @@ class OrderItemDetails(msrest.serialization.Model): 'return_reason': {'readonly': True}, 'return_status': {'readonly': True}, 'management_rp_details': {'readonly': True}, + 'management_rp_details_list': {'readonly': True}, 'error': {'readonly': True}, } @@ -1506,15 +1586,16 @@ class OrderItemDetails(msrest.serialization.Model): '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': 'ShippingDetails'}, - 'reverse_shipping_details': {'key': 'reverseShippingDetails', 'type': 'ShippingDetails'}, + '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': 'object'}, + 'management_rp_details': {'key': 'managementRpDetails', 'type': 'ResourceProviderDetails'}, + 'management_rp_details_list': {'key': 'managementRpDetailsList', 'type': '[ResourceProviderDetails]'}, 'error': {'key': 'error', 'type': 'ErrorDetail'}, } @@ -1537,6 +1618,7 @@ def __init__( self.return_reason = None self.return_status = None self.management_rp_details = None + self.management_rp_details_list = None self.error = None @@ -1560,11 +1642,11 @@ class OrderItemResource(TrackedResource): :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: ~edge_order_management_client.models.SystemData + :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData :param order_item_details: Required. Represents order item details. - :type order_item_details: ~edge_order_management_client.models.OrderItemDetails + :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: ~edge_order_management_client.models.AddressDetails + :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. @@ -1614,7 +1696,7 @@ class OrderItemResourceList(msrest.serialization.Model): 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[~edge_order_management_client.models.OrderItemResource] + :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 """ @@ -1644,9 +1726,9 @@ class OrderItemUpdateParameter(msrest.serialization.Model): 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: ~edge_order_management_client.models.AddressProperties + :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties :param preferences: Customer preference. - :type preferences: ~edge_order_management_client.models.Preferences + :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences :param notification_email_list: Additional notification email list. :type notification_email_list: list[str] """ @@ -1717,13 +1799,13 @@ class OrderResource(ProxyResource): "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~edge_order_management_client.models.SystemData + :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: ~edge_order_management_client.models.StageDetails + :vartype current_stage: ~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails :ivar order_stage_history: Order status history. - :vartype order_stage_history: list[~edge_order_management_client.models.StageDetails] + :vartype order_stage_history: list[~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails] """ _validation = { @@ -1763,7 +1845,7 @@ class OrderResourceList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of order resources. - :vartype value: list[~edge_order_management_client.models.OrderResource] + :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 """ @@ -1795,11 +1877,11 @@ class Pav2MeterDetails(MeterDetails): :param billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~edge_order_management_client.models.BillingType + :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 ~edge_order_management_client.models.ChargingType + :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 """ @@ -1832,14 +1914,14 @@ class Preferences(msrest.serialization.Model): :param notification_preferences: Notification preferences. :type notification_preferences: - list[~edge_order_management_client.models.NotificationPreference] + list[~azure.mgmt.edgeorder.v2021_12_01.models.NotificationPreference] :param transport_preferences: Preferences related to the shipment logistics of the order. - :type transport_preferences: ~edge_order_management_client.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.TransportPreferences :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: ~edge_order_management_client.models.EncryptionPreferences + :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: - ~edge_order_management_client.models.ManagementResourcePreferences + ~azure.mgmt.edgeorder.v2021_12_01.models.ManagementResourcePreferences """ _attribute_map = { @@ -1868,19 +1950,21 @@ class Product(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar configurations: List of configurations for the product. - :vartype configurations: list[~edge_order_management_client.models.Configuration] + :vartype configurations: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] """ _validation = { @@ -1928,18 +2012,24 @@ 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: ~edge_order_management_client.models.DisplayInfo + :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: ~edge_order_management_client.models.HierarchyInformation - :param count: Quantity of the product. - :type count: int + :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[~edge_order_management_client.models.DeviceDetails] + :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}, } @@ -1947,6 +2037,7 @@ class ProductDetails(msrest.serialization.Model): '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]'}, } @@ -1957,7 +2048,8 @@ def __init__( super(ProductDetails, self).__init__(**kwargs) self.display_info = kwargs.get('display_info', None) self.hierarchy_information = kwargs['hierarchy_information'] - self.count = kwargs.get('count', None) + self.count = None + self.product_double_encryption_status = None self.device_details = None @@ -1967,7 +2059,7 @@ class ProductFamilies(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of product families. - :vartype value: list[~edge_order_management_client.models.ProductFamily] + :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 """ @@ -1996,7 +2088,7 @@ class ProductFamiliesMetadata(msrest.serialization.Model): 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[~edge_order_management_client.models.ProductFamiliesMetadataDetails] + :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 """ @@ -2028,19 +2120,24 @@ class ProductFamiliesMetadataDetails(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :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[~edge_order_management_client.models.ProductLine] + :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 = { @@ -2063,6 +2160,7 @@ class ProductFamiliesMetadataDetails(msrest.serialization.Model): '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__( @@ -2078,6 +2176,7 @@ def __init__( 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): @@ -2087,11 +2186,11 @@ class ProductFamiliesRequest(msrest.serialization.Model): :param filterable_properties: Required. Dictionary of filterable properties on product family. :type filterable_properties: dict[str, - list[~edge_order_management_client.models.FilterableProperty]] + 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: - ~edge_order_management_client.models.CustomerSubscriptionDetails + ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails """ _validation = { @@ -2120,19 +2219,24 @@ class ProductFamily(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :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[~edge_order_management_client.models.ProductLine] + :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 = { @@ -2155,6 +2259,7 @@ class ProductFamily(msrest.serialization.Model): '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__( @@ -2170,6 +2275,7 @@ def __init__( 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): @@ -2180,19 +2286,24 @@ class ProductFamilyProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :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[~edge_order_management_client.models.ProductLine] + :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 = { @@ -2215,6 +2326,7 @@ class ProductFamilyProperties(CommonProperties): '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__( @@ -2223,6 +2335,7 @@ def __init__( ): super(ProductFamilyProperties, self).__init__(**kwargs) self.product_lines = None + self.resource_provider_details = kwargs.get('resource_provider_details', None) class ProductLine(msrest.serialization.Model): @@ -2233,19 +2346,21 @@ class ProductLine(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar products: List of products in the product line. - :vartype products: list[~edge_order_management_client.models.Product] + :vartype products: list[~azure.mgmt.edgeorder.v2021_12_01.models.Product] """ _validation = { @@ -2293,19 +2408,21 @@ class ProductLineProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar products: List of products in the product line. - :vartype products: list[~edge_order_management_client.models.Product] + :vartype products: list[~azure.mgmt.edgeorder.v2021_12_01.models.Product] """ _validation = { @@ -2346,19 +2463,21 @@ class ProductProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar configurations: List of configurations for the product. - :vartype configurations: list[~edge_order_management_client.models.Configuration] + :vartype configurations: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] """ _validation = { @@ -2400,11 +2519,11 @@ class PurchaseMeterDetails(MeterDetails): :param billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~edge_order_management_client.models.BillingType + :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 ~edge_order_management_client.models.ChargingType + :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. @@ -2476,15 +2595,44 @@ def __init__( 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: ~edge_order_management_client.models.AddressProperties + :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 = { @@ -2494,6 +2642,8 @@ class ReturnOrderItemDetails(msrest.serialization.Model): _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__( @@ -2503,6 +2653,54 @@ def __init__( 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): @@ -2530,7 +2728,7 @@ class ShippingAddress(msrest.serialization.Model): :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", "Commercial". - :type address_type: str or ~edge_order_management_client.models.AddressType + :type address_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.AddressType """ _validation = { @@ -2646,11 +2844,11 @@ class StageDetails(msrest.serialization.Model): :ivar stage_status: Stage status. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling". - :vartype stage_status: str or ~edge_order_management_client.models.StageStatus + :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 ~edge_order_management_client.models.StageName + :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. @@ -2689,14 +2887,14 @@ class SystemData(msrest.serialization.Model): :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 ~edge_order_management_client.models.CreatedByType + :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 ~edge_order_management_client.models.CreatedByType + :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 """ @@ -2731,7 +2929,7 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". :type preferred_shipment_type: str or - ~edge_order_management_client.models.TransportShipmentTypes + ~azure.mgmt.edgeorder.v2021_12_01.models.TransportShipmentTypes """ _validation = { diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models_py3.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models_py3.py similarity index 81% rename from sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models_py3.py rename to sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models_py3.py index 34e5d4273902..a41d29e1df46 100644 --- a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models_py3.py +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/models/_models_py3.py @@ -24,9 +24,9 @@ class AddressDetails(msrest.serialization.Model): :param forward_address: Required. Customer address and contact details. It should be address resource. - :type forward_address: ~edge_order_management_client.models.AddressProperties + :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties :ivar return_address: Return shipping address. - :vartype return_address: ~edge_order_management_client.models.AddressProperties + :vartype return_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties """ _validation = { @@ -53,21 +53,29 @@ def __init__( 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: ~edge_order_management_client.models.ShippingAddress + :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress :param contact_details: Required. Contact details for the address. - :type contact_details: ~edge_order_management_client.models.ContactDetails + :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__( @@ -80,6 +88,7 @@ def __init__( super(AddressProperties, self).__init__(**kwargs) self.shipping_address = shipping_address self.contact_details = contact_details + self.address_validation_status = None class Resource(msrest.serialization.Model): @@ -187,11 +196,15 @@ class AddressResource(TrackedResource): :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: ~edge_order_management_client.models.SystemData + :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData :param shipping_address: Shipping details for the address. - :type shipping_address: ~edge_order_management_client.models.ShippingAddress + :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress :param contact_details: Required. Contact details for the address. - :type contact_details: ~edge_order_management_client.models.ContactDetails + :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 = { @@ -201,6 +214,7 @@ class AddressResource(TrackedResource): 'location': {'required': True}, 'system_data': {'readonly': True}, 'contact_details': {'required': True}, + 'address_validation_status': {'readonly': True}, } _attribute_map = { @@ -212,6 +226,7 @@ class AddressResource(TrackedResource): '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__( @@ -227,6 +242,7 @@ def __init__( self.system_data = None self.shipping_address = shipping_address self.contact_details = contact_details + self.address_validation_status = None class AddressResourceList(msrest.serialization.Model): @@ -235,7 +251,7 @@ class AddressResourceList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of address resources. - :vartype value: list[~edge_order_management_client.models.AddressResource] + :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 """ @@ -267,9 +283,9 @@ class AddressUpdateParameter(msrest.serialization.Model): 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: ~edge_order_management_client.models.ShippingAddress + :type shipping_address: ~azure.mgmt.edgeorder.v2021_12_01.models.ShippingAddress :param contact_details: Contact details for the address. - :type contact_details: ~edge_order_management_client.models.ContactDetails + :type contact_details: ~azure.mgmt.edgeorder.v2021_12_01.models.ContactDetails """ _attribute_map = { @@ -300,11 +316,11 @@ class AvailabilityInformation(msrest.serialization.Model): :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 ~edge_order_management_client.models.AvailabilityStage + :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 ~edge_order_management_client.models.DisabledReason + :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 """ @@ -339,15 +355,16 @@ class BasicInformation(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :vartype hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation """ _validation = { @@ -389,10 +406,10 @@ class BillingMeterDetails(msrest.serialization.Model): :ivar name: Represents Billing type name. :vartype name: str :ivar meter_details: Represents MeterDetails. - :vartype meter_details: ~edge_order_management_client.models.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 ~edge_order_management_client.models.MeteringType + :vartype metering_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.MeteringType :ivar frequency: Frequency of recurrence. :vartype frequency: str """ @@ -457,17 +474,19 @@ class CommonProperties(BasicInformation): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] """ _validation = { @@ -506,21 +525,23 @@ class Configuration(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~edge_order_management_client.models.Specification] + :vartype specifications: list[~azure.mgmt.edgeorder.v2021_12_01.models.Specification] :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~edge_order_management_client.models.Dimensions + :vartype dimensions: ~azure.mgmt.edgeorder.v2021_12_01.models.Dimensions """ _validation = { @@ -569,9 +590,9 @@ 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: ~edge_order_management_client.models.HierarchyInformation + :type hierarchy_information: ~azure.mgmt.edgeorder.v2021_12_01.models.HierarchyInformation :param filterable_property: Filters specific to product. - :type filterable_property: list[~edge_order_management_client.models.FilterableProperty] + :type filterable_property: list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] """ _validation = { @@ -603,21 +624,23 @@ class ConfigurationProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar specifications: Specifications of the configuration. - :vartype specifications: list[~edge_order_management_client.models.Specification] + :vartype specifications: list[~azure.mgmt.edgeorder.v2021_12_01.models.Specification] :ivar dimensions: Dimensions of the configuration. - :vartype dimensions: ~edge_order_management_client.models.Dimensions + :vartype dimensions: ~azure.mgmt.edgeorder.v2021_12_01.models.Dimensions """ _validation = { @@ -659,7 +682,7 @@ class Configurations(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of configurations. - :vartype value: list[~edge_order_management_client.models.Configuration] + :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 """ @@ -691,11 +714,12 @@ class ConfigurationsRequest(msrest.serialization.Model): :param configuration_filters: Required. Holds details about product hierarchy information and filterable property. - :type configuration_filters: list[~edge_order_management_client.models.ConfigurationFilters] + :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: - ~edge_order_management_client.models.CustomerSubscriptionDetails + ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails """ _validation = { @@ -774,7 +798,8 @@ class CostInformation(msrest.serialization.Model): 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[~edge_order_management_client.models.BillingMeterDetails] + :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 """ @@ -805,7 +830,7 @@ class CustomerSubscriptionDetails(msrest.serialization.Model): :param registered_features: List of registered feature flags for subscription. :type registered_features: - list[~edge_order_management_client.models.CustomerSubscriptionRegisteredFeatures] + 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. @@ -868,7 +893,7 @@ class Description(msrest.serialization.Model): 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 ~edge_order_management_client.models.DescriptionType + :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. @@ -878,7 +903,7 @@ class Description(msrest.serialization.Model): :ivar attributes: Attributes for the product system. :vartype attributes: list[str] :ivar links: Links for the product system. - :vartype links: list[~edge_order_management_client.models.Link] + :vartype links: list[~azure.mgmt.edgeorder.v2021_12_01.models.Link] """ _validation = { @@ -921,16 +946,20 @@ class DeviceDetails(msrest.serialization.Model): :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__( @@ -940,6 +969,7 @@ def __init__( 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): @@ -955,13 +985,13 @@ class Dimensions(msrest.serialization.Model): :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 ~edge_order_management_client.models.LengthHeightUnit + :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 ~edge_order_management_client.models.WeightMeasurementUnit + :vartype weight_unit: str or ~azure.mgmt.edgeorder.v2021_12_01.models.WeightMeasurementUnit """ _validation = { @@ -1031,10 +1061,11 @@ def __init__( class EncryptionPreferences(msrest.serialization.Model): """Preferences related to the double encryption. - :param double_encryption_status: Defines secondary layer of software-based encryption - enablement. Possible values include: "Disabled", "Enabled". Default value: "Disabled". + :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 - ~edge_order_management_client.models.DoubleEncryptionStatus + ~azure.mgmt.edgeorder.v2021_12_01.models.DoubleEncryptionStatus """ _attribute_map = { @@ -1044,7 +1075,7 @@ class EncryptionPreferences(msrest.serialization.Model): def __init__( self, *, - double_encryption_status: Optional[Union[str, "DoubleEncryptionStatus"]] = "Disabled", + double_encryption_status: Optional[Union[str, "DoubleEncryptionStatus"]] = None, **kwargs ): super(EncryptionPreferences, self).__init__(**kwargs) @@ -1093,9 +1124,9 @@ class ErrorDetail(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~edge_order_management_client.models.ErrorDetail] + :vartype details: list[~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail] :ivar additional_info: The error additional info. - :vartype additional_info: list[~edge_order_management_client.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.edgeorder.v2021_12_01.models.ErrorAdditionalInfo] """ _validation = { @@ -1130,7 +1161,7 @@ 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: ~edge_order_management_client.models.ErrorDetail + :type error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail """ _attribute_map = { @@ -1154,7 +1185,7 @@ class FilterableProperty(msrest.serialization.Model): :param type: Required. Type of product filter. Possible values include: "ShipToCountries", "DoubleEncryptionStatus". - :type type: str or ~edge_order_management_client.models.SupportedFilterTypes + :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] """ @@ -1181,6 +1212,47 @@ def __init__( self.supported_values = 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. @@ -1226,7 +1298,7 @@ class ImageInformation(msrest.serialization.Model): :ivar image_type: Type of the image. Possible values include: "MainImage", "BulletImage", "GenericImage". - :vartype image_type: str or ~edge_order_management_client.models.ImageType + :vartype image_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ImageType :ivar image_url: Url of the image. :vartype image_url: str """ @@ -1257,7 +1329,7 @@ class Link(msrest.serialization.Model): :ivar link_type: Type of link. Possible values include: "Generic", "TermsAndConditions", "Specification", "Documentation", "KnowMore", "SignUp". - :vartype link_type: str or ~edge_order_management_client.models.LinkType + :vartype link_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.LinkType :ivar link_url: Url of the link. :vartype link_url: str """ @@ -1314,11 +1386,11 @@ class MeterDetails(msrest.serialization.Model): :param billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~edge_order_management_client.models.BillingType + :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 ~edge_order_management_client.models.ChargingType + :vartype charging_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ChargingType """ _validation = { @@ -1354,7 +1426,7 @@ class NotificationPreference(msrest.serialization.Model): :param stage_name: Required. Name of the stage. Possible values include: "Shipped", "Delivered". - :type stage_name: str or ~edge_order_management_client.models.NotificationStageName + :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 """ @@ -1393,14 +1465,14 @@ class Operation(msrest.serialization.Model): 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: ~edge_order_management_client.models.OperationDisplay + :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 ~edge_order_management_client.models.Origin + :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 ~edge_order_management_client.models.ActionType + :vartype action_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.ActionType """ _validation = { @@ -1482,7 +1554,7 @@ class OperationListResult(msrest.serialization.Model): 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[~edge_order_management_client.models.Operation] + :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 """ @@ -1514,40 +1586,47 @@ 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: ~edge_order_management_client.models.ProductDetails + :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 ~edge_order_management_client.models.OrderItemType + :type order_item_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemType :ivar current_stage: Current Order item Status. - :vartype current_stage: ~edge_order_management_client.models.StageDetails + :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[~edge_order_management_client.models.StageDetails] + :vartype order_item_stage_history: list[~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails] :param preferences: Customer notification Preferences. - :type preferences: ~edge_order_management_client.models.Preferences + :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences :ivar forward_shipping_details: Forward Package Shipping details. - :vartype forward_shipping_details: ~edge_order_management_client.models.ShippingDetails + :vartype forward_shipping_details: + ~azure.mgmt.edgeorder.v2021_12_01.models.ForwardShippingDetails :ivar reverse_shipping_details: Reverse Package Shipping details. - :vartype reverse_shipping_details: ~edge_order_management_client.models.ShippingDetails + :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 orderItem is cancellable or not. Possible + :ivar cancellation_status: Describes whether the order item is cancellable or not. Possible values include: "Cancellable", "CancellableWithFee", "NotCancellable". :vartype cancellation_status: str or - ~edge_order_management_client.models.OrderItemCancellationEnum + ~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 ~edge_order_management_client.models.ActionStatusEnum + :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 orderItem is returnable or not. Possible values + :ivar return_status: Describes whether the order item is returnable or not. Possible values include: "Returnable", "ReturnableWithFee", "NotReturnable". - :vartype return_status: str or ~edge_order_management_client.models.OrderItemReturnEnum - :ivar management_rp_details: parent RP details. - :vartype management_rp_details: any + :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: ~edge_order_management_client.models.ErrorDetail + :vartype error: ~azure.mgmt.edgeorder.v2021_12_01.models.ErrorDetail """ _validation = { @@ -1563,6 +1642,7 @@ class OrderItemDetails(msrest.serialization.Model): 'return_reason': {'readonly': True}, 'return_status': {'readonly': True}, 'management_rp_details': {'readonly': True}, + 'management_rp_details_list': {'readonly': True}, 'error': {'readonly': True}, } @@ -1572,15 +1652,16 @@ class OrderItemDetails(msrest.serialization.Model): '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': 'ShippingDetails'}, - 'reverse_shipping_details': {'key': 'reverseShippingDetails', 'type': 'ShippingDetails'}, + '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': 'object'}, + 'management_rp_details': {'key': 'managementRpDetails', 'type': 'ResourceProviderDetails'}, + 'management_rp_details_list': {'key': 'managementRpDetailsList', 'type': '[ResourceProviderDetails]'}, 'error': {'key': 'error', 'type': 'ErrorDetail'}, } @@ -1608,6 +1689,7 @@ def __init__( self.return_reason = None self.return_status = None self.management_rp_details = None + self.management_rp_details_list = None self.error = None @@ -1631,11 +1713,11 @@ class OrderItemResource(TrackedResource): :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: ~edge_order_management_client.models.SystemData + :vartype system_data: ~azure.mgmt.edgeorder.v2021_12_01.models.SystemData :param order_item_details: Required. Represents order item details. - :type order_item_details: ~edge_order_management_client.models.OrderItemDetails + :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: ~edge_order_management_client.models.AddressDetails + :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. @@ -1691,7 +1773,7 @@ class OrderItemResourceList(msrest.serialization.Model): 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[~edge_order_management_client.models.OrderItemResource] + :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 """ @@ -1723,9 +1805,9 @@ class OrderItemUpdateParameter(msrest.serialization.Model): 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: ~edge_order_management_client.models.AddressProperties + :type forward_address: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressProperties :param preferences: Customer preference. - :type preferences: ~edge_order_management_client.models.Preferences + :type preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.Preferences :param notification_email_list: Additional notification email list. :type notification_email_list: list[str] """ @@ -1801,13 +1883,13 @@ class OrderResource(ProxyResource): "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: Represents resource creation and update time. - :vartype system_data: ~edge_order_management_client.models.SystemData + :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: ~edge_order_management_client.models.StageDetails + :vartype current_stage: ~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails :ivar order_stage_history: Order status history. - :vartype order_stage_history: list[~edge_order_management_client.models.StageDetails] + :vartype order_stage_history: list[~azure.mgmt.edgeorder.v2021_12_01.models.StageDetails] """ _validation = { @@ -1847,7 +1929,7 @@ class OrderResourceList(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of order resources. - :vartype value: list[~edge_order_management_client.models.OrderResource] + :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 """ @@ -1881,11 +1963,11 @@ class Pav2MeterDetails(MeterDetails): :param billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~edge_order_management_client.models.BillingType + :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 ~edge_order_management_client.models.ChargingType + :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 """ @@ -1918,14 +2000,14 @@ class Preferences(msrest.serialization.Model): :param notification_preferences: Notification preferences. :type notification_preferences: - list[~edge_order_management_client.models.NotificationPreference] + list[~azure.mgmt.edgeorder.v2021_12_01.models.NotificationPreference] :param transport_preferences: Preferences related to the shipment logistics of the order. - :type transport_preferences: ~edge_order_management_client.models.TransportPreferences + :type transport_preferences: ~azure.mgmt.edgeorder.v2021_12_01.models.TransportPreferences :param encryption_preferences: Preferences related to the Encryption. - :type encryption_preferences: ~edge_order_management_client.models.EncryptionPreferences + :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: - ~edge_order_management_client.models.ManagementResourcePreferences + ~azure.mgmt.edgeorder.v2021_12_01.models.ManagementResourcePreferences """ _attribute_map = { @@ -1959,19 +2041,21 @@ class Product(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar configurations: List of configurations for the product. - :vartype configurations: list[~edge_order_management_client.models.Configuration] + :vartype configurations: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] """ _validation = { @@ -2019,18 +2103,24 @@ 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: ~edge_order_management_client.models.DisplayInfo + :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: ~edge_order_management_client.models.HierarchyInformation - :param count: Quantity of the product. - :type count: int + :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[~edge_order_management_client.models.DeviceDetails] + :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}, } @@ -2038,6 +2128,7 @@ class ProductDetails(msrest.serialization.Model): '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]'}, } @@ -2046,13 +2137,13 @@ def __init__( *, hierarchy_information: "HierarchyInformation", display_info: Optional["DisplayInfo"] = None, - count: Optional[int] = None, **kwargs ): super(ProductDetails, self).__init__(**kwargs) self.display_info = display_info self.hierarchy_information = hierarchy_information - self.count = count + self.count = None + self.product_double_encryption_status = None self.device_details = None @@ -2062,7 +2153,7 @@ class ProductFamilies(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of product families. - :vartype value: list[~edge_order_management_client.models.ProductFamily] + :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 """ @@ -2093,7 +2184,7 @@ class ProductFamiliesMetadata(msrest.serialization.Model): 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[~edge_order_management_client.models.ProductFamiliesMetadataDetails] + :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 """ @@ -2125,19 +2216,24 @@ class ProductFamiliesMetadataDetails(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :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[~edge_order_management_client.models.ProductLine] + :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 = { @@ -2160,10 +2256,13 @@ class ProductFamiliesMetadataDetails(msrest.serialization.Model): '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, + *, + resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): super(ProductFamiliesMetadataDetails, self).__init__(**kwargs) @@ -2175,6 +2274,7 @@ def __init__( self.hierarchy_information = None self.filterable_properties = None self.product_lines = None + self.resource_provider_details = resource_provider_details class ProductFamiliesRequest(msrest.serialization.Model): @@ -2184,11 +2284,11 @@ class ProductFamiliesRequest(msrest.serialization.Model): :param filterable_properties: Required. Dictionary of filterable properties on product family. :type filterable_properties: dict[str, - list[~edge_order_management_client.models.FilterableProperty]] + 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: - ~edge_order_management_client.models.CustomerSubscriptionDetails + ~azure.mgmt.edgeorder.v2021_12_01.models.CustomerSubscriptionDetails """ _validation = { @@ -2220,19 +2320,24 @@ class ProductFamily(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :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[~edge_order_management_client.models.ProductLine] + :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 = { @@ -2255,10 +2360,13 @@ class ProductFamily(msrest.serialization.Model): '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, + *, + resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): super(ProductFamily, self).__init__(**kwargs) @@ -2270,6 +2378,7 @@ def __init__( self.hierarchy_information = None self.filterable_properties = None self.product_lines = None + self.resource_provider_details = resource_provider_details class ProductFamilyProperties(CommonProperties): @@ -2280,19 +2389,24 @@ class ProductFamilyProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :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[~edge_order_management_client.models.ProductLine] + :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 = { @@ -2315,14 +2429,18 @@ class ProductFamilyProperties(CommonProperties): '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, + *, + resource_provider_details: Optional[List["ResourceProviderDetails"]] = None, **kwargs ): super(ProductFamilyProperties, self).__init__(**kwargs) self.product_lines = None + self.resource_provider_details = resource_provider_details class ProductLine(msrest.serialization.Model): @@ -2333,19 +2451,21 @@ class ProductLine(msrest.serialization.Model): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar products: List of products in the product line. - :vartype products: list[~edge_order_management_client.models.Product] + :vartype products: list[~azure.mgmt.edgeorder.v2021_12_01.models.Product] """ _validation = { @@ -2393,19 +2513,21 @@ class ProductLineProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar products: List of products in the product line. - :vartype products: list[~edge_order_management_client.models.Product] + :vartype products: list[~azure.mgmt.edgeorder.v2021_12_01.models.Product] """ _validation = { @@ -2446,19 +2568,21 @@ class ProductProperties(CommonProperties): :ivar display_name: Display Name for the product system. :vartype display_name: str :ivar description: Description related to the product system. - :vartype description: ~edge_order_management_client.models.Description + :vartype description: ~azure.mgmt.edgeorder.v2021_12_01.models.Description :ivar image_information: Image information for the product system. - :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :vartype image_information: list[~azure.mgmt.edgeorder.v2021_12_01.models.ImageInformation] :ivar cost_information: Cost information for the product system. - :vartype cost_information: ~edge_order_management_client.models.CostInformation + :vartype cost_information: ~azure.mgmt.edgeorder.v2021_12_01.models.CostInformation :ivar availability_information: Availability information of the product system. - :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :vartype availability_information: + ~azure.mgmt.edgeorder.v2021_12_01.models.AvailabilityInformation :ivar hierarchy_information: Hierarchy information of a product. - :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :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[~edge_order_management_client.models.FilterableProperty] + :vartype filterable_properties: + list[~azure.mgmt.edgeorder.v2021_12_01.models.FilterableProperty] :ivar configurations: List of configurations for the product. - :vartype configurations: list[~edge_order_management_client.models.Configuration] + :vartype configurations: list[~azure.mgmt.edgeorder.v2021_12_01.models.Configuration] """ _validation = { @@ -2500,11 +2624,11 @@ class PurchaseMeterDetails(MeterDetails): :param billing_type: Required. Represents billing type.Constant filled by server. Possible values include: "Pav2", "Purchase". - :type billing_type: str or ~edge_order_management_client.models.BillingType + :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 ~edge_order_management_client.models.ChargingType + :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. @@ -2578,15 +2702,44 @@ def __init__( 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: ~edge_order_management_client.models.AddressProperties + :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 = { @@ -2596,6 +2749,8 @@ class ReturnOrderItemDetails(msrest.serialization.Model): _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__( @@ -2603,11 +2758,61 @@ def __init__( *, return_reason: str, return_address: Optional["AddressProperties"] = None, + service_tag: Optional[str] = None, + shipping_box_required: Optional[bool] = False, **kwargs ): super(ReturnOrderItemDetails, self).__init__(**kwargs) self.return_address = return_address self.return_reason = return_reason + self.service_tag = service_tag + self.shipping_box_required = shipping_box_required + + +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): @@ -2635,7 +2840,7 @@ class ShippingAddress(msrest.serialization.Model): :type company_name: str :param address_type: Type of address. Possible values include: "None", "Residential", "Commercial". - :type address_type: str or ~edge_order_management_client.models.AddressType + :type address_type: str or ~azure.mgmt.edgeorder.v2021_12_01.models.AddressType """ _validation = { @@ -2762,11 +2967,11 @@ class StageDetails(msrest.serialization.Model): :ivar stage_status: Stage status. Possible values include: "None", "InProgress", "Succeeded", "Failed", "Cancelled", "Cancelling". - :vartype stage_status: str or ~edge_order_management_client.models.StageStatus + :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 ~edge_order_management_client.models.StageName + :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. @@ -2805,14 +3010,14 @@ class SystemData(msrest.serialization.Model): :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 ~edge_order_management_client.models.CreatedByType + :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 ~edge_order_management_client.models.CreatedByType + :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 """ @@ -2854,7 +3059,7 @@ class TransportPreferences(msrest.serialization.Model): :param preferred_shipment_type: Required. Indicates Shipment Logistics type that the customer preferred. Possible values include: "CustomerManaged", "MicrosoftManaged". :type preferred_shipment_type: str or - ~edge_order_management_client.models.TransportShipmentTypes + ~azure.mgmt.edgeorder.v2021_12_01.models.TransportShipmentTypes """ _validation = { diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/__init__.py new file mode 100644 index 000000000000..6003776a8eee --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/__init__.py @@ -0,0 +1,13 @@ +# 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 ._edge_order_management_client_operations import EdgeOrderManagementClientOperationsMixin + +__all__ = [ + 'EdgeOrderManagementClientOperationsMixin', +] 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 new file mode 100644 index 000000000000..b3a3cdfc047c --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/operations/_edge_order_management_client_operations.py @@ -0,0 +1,1981 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import 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 + +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]] + +class EdgeOrderManagementClientOperationsMixin(object): + + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 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 = 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) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + 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"] + """Lists all the addresses available under the subscription. + + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of addresses. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AddressResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + 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"] + """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.v2021_12_01.models.ProductFamiliesRequest + :param expand: $expand is supported on configurations parameter for product, which provides + details on the configurations for the product. + :type expand: str + :param skip_token: $skipToken is supported on list of product families, which provides the next + page in the list of 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.v2021_12_01.models.ProductFamilies] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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) + 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) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProductFamilies', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_configurations( + self, + configurations_request, # type: "_models.ConfigurationsRequest" + 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. + + :param configurations_request: Filters for showing the configurations. + :type configurations_request: ~azure.mgmt.edgeorder.v2021_12_01.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.v2021_12_01.models.Configurations] + :raises: ~azure.core.exceptions.HttpResponseError + """ + 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) + 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) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('Configurations', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_product_families_metadata( + self, + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ProductFamiliesMetadata"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ProductFamiliesMetadata', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def list_order_at_subscription_level( + self, + 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 + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OrderResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + 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"] + """Lists order item at subscription level. + + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OrderItemResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + 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"] + """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. + :type resource_group_name: str + :param filter: $filter is supported to filter based on shipping address properties. Filter + supports only equals operation. + :type filter: str + :param skip_token: $skipToken is supported on Get list of addresses, which provides the next + page in the list of address. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AddressResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def get_address_by_name( + self, + address_name, # type: str + 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. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AddressResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.AddressResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + 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"] + 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') + + # 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') + + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + 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"] + """Creates a new address with the specified parameters. Existing address can be updated with this + API. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param address_resource: Address details from request body. + :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. + :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.v2021_12_01.models.AddressResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_address_initial( + address_name=address_name, + resource_group_name=resource_group_name, + address_resource=address_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + 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 = 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) + + 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 + + def begin_delete_address_by_name( + self, + address_name, # type: str + 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. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_address_by_name_initial( + address_name=address_name, + resource_group_name=resource_group_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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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"] + 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) + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AddressResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_address_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/addresses/{addressName}'} # type: ignore + + 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"] + """Updates the properties of an existing address. + + :param address_name: The name of the address Resource within the specified resource group. + address names must be between 3 and 24 characters in length and use any alphanumeric and + underscore only. + :type address_name: str + :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.v2021_12_01.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. + :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.v2021_12_01.models.AddressResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AddressResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_address_initial( + address_name=address_name, + resource_group_name=resource_group_name, + address_update_parameter=address_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + + 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"] + """Lists order at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param skip_token: $skipToken is supported on Get list of order, which provides the next page + in the list of order. + :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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OrderResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + def get_order_by_name( + self, + order_name, # type: str + resource_group_name, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OrderResource" + """Gets an order. + + :param order_name: The name of the order. + :type order_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param location: The name of Azure region. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrderResource', pipeline_response) + + if cls: + 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 + + 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"] + """Lists order item at resource group level. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param filter: $filter is supported to filter based on order id. Filter supports only equals + operation. + :type filter: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :param skip_token: $skipToken is supported on Get list of order items, which provides the next + 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] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResourceList"] + error_map = { + 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) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OrderItemResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + 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 + + 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" + """Gets an order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param expand: $expand is supported on device details, forward shipping details and reverse + shipping details parameters. Each of these can be provided as a comma separated list. Device + Details for order item provides details on the devices of the product, Forward and Reverse + Shipping details provide forward and reverse shipping details respectively. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OrderItemResource, or the result of cls(response) + :rtype: ~azure.mgmt.edgeorder.v2021_12_01.models.OrderItemResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + 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.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 = 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + 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"] + 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') + + # 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') + + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + 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"] + """Creates an order item. Existing order item cannot be updated with this api and should instead + be updated with the Update order item API. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param order_item_resource: Order item details from request body. + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + order_item_resource=order_item_resource, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + 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 = 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) + + 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 + + def begin_delete_order_item_by_name( + self, + order_item_name, # type: str + 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. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :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. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_order_item_by_name_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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"] + 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) + 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) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OrderItemResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_order_item_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EdgeOrder/orderItems/{orderItemName}'} # type: ignore + + 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"] + """Updates the properties of an existing order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :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. + :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: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OrderItemResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + order_item_update_parameter=order_item_update_parameter, + if_match=if_match, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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 + + 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 + """Cancel order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cancellation_reason: Reason for cancellation. + :type cancellation_reason: ~azure.mgmt.edgeorder.v2021_12_01.models.CancellationReason + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "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') + + # 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') + + 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) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + 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 + 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') + + # 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') + + 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) + + 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 + + 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] + """Return order item. + + :param order_item_name: The name of the order item. + :type order_item_name: str + :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 + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._return_order_item_initial( + order_item_name=order_item_name, + resource_group_name=resource_group_name, + return_order_item_details=return_order_item_details, + 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) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + 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/py.typed b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/v2021_12_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file