diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md b/sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md new file mode 100644 index 00000000000..90701112138 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (2021-07-27) + +* Initial Release diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/MANIFEST.in b/sdk/edgeorder/azure-mgmt-edgeorder/MANIFEST.in new file mode 100644 index 00000000000..3a9b6517412 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/MANIFEST.in @@ -0,0 +1,6 @@ +include _meta.json +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/README.md b/sdk/edgeorder/azure-mgmt-edgeorder/README.md new file mode 100644 index 00000000000..25db20311dd --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/README.md @@ -0,0 +1,27 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Edgeorder Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + + +# Usage + + +To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) + + + +For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) +Code samples for this package can be found at [Edgeorder Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. +Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + + +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-edgeorder%2FREADME.png) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json b/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json new file mode 100644 index 00000000000..d96537615fc --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.1", + "@autorest/modelerfour@4.19.2" + ], + "commit": "f985f05e68b7720cd5cd4c55bd89ce8463f7e554", + "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", + "readme": "specification/edgeorder/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/__init__.py new file mode 100644 index 00000000000..8db66d3d0f0 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/__init__.py new file mode 100644 index 00000000000..8db66d3d0f0 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__init__.py new file mode 100644 index 00000000000..6a0b62b08a4 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/__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/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_configuration.py new file mode 100644 index 00000000000..1ef1c6f5917 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_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/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_edge_order_management_client.py new file mode 100644 index 00000000000..fb1dad36ff7 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_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): + """Edge Order API's. + + :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/_metadata.json b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_metadata.json new file mode 100644 index 00000000000..5c00fb13ce9 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_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": "Edge Order API\u0027s.", + "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[~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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 skip_token=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Lists order 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 skip_token: $skipToken is supported on Get list of orders, 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 OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~edge_order_management_client.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 skip_token: Optional[str] = None,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.OrderItemResourceList\"]:\n", + "doc": "\"\"\"Lists order 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 skip_token: $skipToken is supported on Get list of orders, 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 OrderItemResourceList or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~edge_order_management_client.models.OrderItemResourceList]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "filter, 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[~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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 parameter for order item, which provides\n details on the devices of the product.\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[~edge_order_management_client.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 parameter for order item, which provides\n details on the devices of the product.\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[~edge_order_management_client.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 parameter for order item, which provides\n details on the devices of the product.\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: ~edge_order_management_client.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 parameter for order item, which provides\n details on the devices of the product.\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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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/_version.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_version.py new file mode 100644 index 00000000000..e5754a47ce6 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/_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.0b1" diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/__init__.py new file mode 100644 index 00000000000..b8c98d8145e --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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/aio/_configuration.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_configuration.py new file mode 100644 index 00000000000..4a36ece13ef --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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/aio/_edge_order_management_client.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/_edge_order_management_client.py new file mode 100644 index 00000000000..9a5077d68da --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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): + """Edge Order API's. + + :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/aio/operations/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/operations/__init__.py new file mode 100644 index 00000000000..6003776a8ee --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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/aio/operations/_edge_order_management_client_operations.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/operations/_edge_order_management_client_operations.py new file mode 100644 index 00000000000..5e1473836e7 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/aio/operations/_edge_order_management_client_operations.py @@ -0,0 +1,1937 @@ +# 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[~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.OrderItemResourceList"]: + """Lists order 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. + :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[~edge_order_management_client.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 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[~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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 parameter for order item, which provides + details on the devices of the product. + :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[~edge_order_management_client.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 parameter for order item, which provides + details on the devices of the product. + :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 + :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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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: ~edge_order_management_client.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/models/__init__.py new file mode 100644 index 00000000000..9a0ed92ff2f --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/__init__.py @@ -0,0 +1,268 @@ +# 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 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 ReturnOrderItemDetails + 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 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 ReturnOrderItemDetails # 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, + 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', + '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', + 'ReturnOrderItemDetails', + 'ShippingAddress', + 'ShippingDetails', + 'Specification', + 'StageDetails', + 'SystemData', + 'TrackedResource', + 'TransportPreferences', + 'ActionStatusEnum', + 'ActionType', + 'AddressType', + '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/models/_edge_order_management_client_enums.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_edge_order_management_client_enums.py new file mode 100644 index 00000000000..4f8839bebbd --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_edge_order_management_client_enums.py @@ -0,0 +1,305 @@ +# 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 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)): + """Defines secondary layer of software-based encryption enablement. + """ + + #: 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 orderItem 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 orderItem 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/models/_models.py new file mode 100644 index 00000000000..fe82fbef85e --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models.py @@ -0,0 +1,2750 @@ +# 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: ~edge_order_management_client.models.AddressProperties + :ivar return_address: Return shipping address. + :vartype return_address: ~edge_order_management_client.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: ~edge_order_management_client.models.ShippingAddress + :param contact_details: Required. Contact details for the address. + :type contact_details: ~edge_order_management_client.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: ~edge_order_management_client.models.SystemData + :param shipping_address: Shipping details for the address. + :type shipping_address: ~edge_order_management_client.models.ShippingAddress + :param contact_details: Required. Contact details for the address. + :type contact_details: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.models.ShippingAddress + :param contact_details: Contact details for the address. + :type contact_details: ~edge_order_management_client.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 ~edge_order_management_client.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 + :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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.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: ~edge_order_management_client.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 + :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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar specifications: Specifications of the configuration. + :vartype specifications: list[~edge_order_management_client.models.Specification] + :ivar dimensions: Dimensions of the configuration. + :vartype dimensions: ~edge_order_management_client.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: ~edge_order_management_client.models.HierarchyInformation + :param filterable_property: Filters specific to product. + :type filterable_property: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar specifications: Specifications of the configuration. + :vartype specifications: list[~edge_order_management_client.models.Specification] + :ivar dimensions: Dimensions of the configuration. + :vartype dimensions: ~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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 + """ + + _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[~edge_order_management_client.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[~edge_order_management_client.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 ~edge_order_management_client.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[~edge_order_management_client.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 + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'management_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'management_resource_id': {'key': 'managementResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceDetails, self).__init__(**kwargs) + self.serial_number = None + self.management_resource_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 ~edge_order_management_client.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 + """ + + _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: Defines secondary layer of software-based encryption + enablement. Possible values include: "Disabled", "Enabled". Default value: "Disabled". + :type double_encryption_status: str or + ~edge_order_management_client.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', "Disabled") + + +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[~edge_order_management_client.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~edge_order_management_client.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: ~edge_order_management_client.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 ~edge_order_management_client.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 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 ~edge_order_management_client.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 ~edge_order_management_client.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 ~edge_order_management_client.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 + """ + + _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 ~edge_order_management_client.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: ~edge_order_management_client.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 + :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 + """ + + _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[~edge_order_management_client.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: ~edge_order_management_client.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 + :ivar current_stage: Current Order item Status. + :vartype current_stage: ~edge_order_management_client.models.StageDetails + :ivar order_item_stage_history: Order item status history. + :vartype order_item_stage_history: list[~edge_order_management_client.models.StageDetails] + :param preferences: Customer notification Preferences. + :type preferences: ~edge_order_management_client.models.Preferences + :ivar forward_shipping_details: Forward Package Shipping details. + :vartype forward_shipping_details: ~edge_order_management_client.models.ShippingDetails + :ivar reverse_shipping_details: Reverse Package Shipping details. + :vartype reverse_shipping_details: ~edge_order_management_client.models.ShippingDetails + :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 + values include: "Cancellable", "CancellableWithFee", "NotCancellable". + :vartype cancellation_status: str or + ~edge_order_management_client.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 + :ivar return_reason: Return reason. + :vartype return_reason: str + :ivar return_status: Describes whether the orderItem 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 + :ivar error: Top level error for the job. + :vartype error: ~edge_order_management_client.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}, + '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': 'ShippingDetails'}, + 'reverse_shipping_details': {'key': 'reverseShippingDetails', 'type': 'ShippingDetails'}, + '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'}, + '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.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: ~edge_order_management_client.models.SystemData + :param order_item_details: Required. Represents order item details. + :type order_item_details: ~edge_order_management_client.models.OrderItemDetails + :param address_details: Required. Represents shipping and return address for order item. + :type address_details: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.models.AddressProperties + :param preferences: Customer preference. + :type preferences: ~edge_order_management_client.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: ~edge_order_management_client.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 + :ivar order_stage_history: Order status history. + :vartype order_stage_history: list[~edge_order_management_client.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[~edge_order_management_client.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 ~edge_order_management_client.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 + :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[~edge_order_management_client.models.NotificationPreference] + :param transport_preferences: Preferences related to the shipment logistics of the order. + :type transport_preferences: ~edge_order_management_client.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: ~edge_order_management_client.models.EncryptionPreferences + :param management_resource_preferences: Preferences related to the Management resource. + :type management_resource_preferences: + ~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar configurations: List of configurations for the product. + :vartype configurations: list[~edge_order_management_client.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: ~edge_order_management_client.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 + :ivar device_details: list of device details. + :vartype device_details: list[~edge_order_management_client.models.DeviceDetails] + """ + + _validation = { + 'hierarchy_information': {'required': True}, + 'device_details': {'readonly': True}, + } + + _attribute_map = { + 'display_info': {'key': 'displayInfo', 'type': 'DisplayInfo'}, + 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, + 'count': {'key': 'count', 'type': 'int'}, + '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 = kwargs.get('count', 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[~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar product_lines: List of product lines supported in the product family. + :vartype product_lines: list[~edge_order_management_client.models.ProductLine] + """ + + _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]'}, + } + + 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 + + +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[~edge_order_management_client.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 + """ + + _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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar product_lines: List of product lines supported in the product family. + :vartype product_lines: list[~edge_order_management_client.models.ProductLine] + """ + + _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]'}, + } + + 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 + + +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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar product_lines: List of product lines supported in the product family. + :vartype product_lines: list[~edge_order_management_client.models.ProductLine] + """ + + _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]'}, + } + + def __init__( + self, + **kwargs + ): + super(ProductFamilyProperties, self).__init__(**kwargs) + self.product_lines = 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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar products: List of products in the product line. + :vartype products: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar products: List of products in the product line. + :vartype products: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar configurations: List of configurations for the product. + :vartype configurations: list[~edge_order_management_client.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 ~edge_order_management_client.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 + :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 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 + :param return_reason: Required. Return Reason. + :type return_reason: str + """ + + _validation = { + 'return_reason': {'required': True}, + } + + _attribute_map = { + 'return_address': {'key': 'returnAddress', 'type': 'AddressProperties'}, + 'return_reason': {'key': 'returnReason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ReturnOrderItemDetails, self).__init__(**kwargs) + self.return_address = kwargs.get('return_address', None) + self.return_reason = kwargs['return_reason'] + + +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 ~edge_order_management_client.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 ~edge_order_management_client.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 + :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 ~edge_order_management_client.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 + :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 + ~edge_order_management_client.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/models/_models_py3.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models_py3.py new file mode 100644 index 00000000000..34e5d427390 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/models/_models_py3.py @@ -0,0 +1,2875 @@ +# 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: ~edge_order_management_client.models.AddressProperties + :ivar return_address: Return shipping address. + :vartype return_address: ~edge_order_management_client.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: ~edge_order_management_client.models.ShippingAddress + :param contact_details: Required. Contact details for the address. + :type contact_details: ~edge_order_management_client.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: ~edge_order_management_client.models.SystemData + :param shipping_address: Shipping details for the address. + :type shipping_address: ~edge_order_management_client.models.ShippingAddress + :param contact_details: Required. Contact details for the address. + :type contact_details: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.models.ShippingAddress + :param contact_details: Contact details for the address. + :type contact_details: ~edge_order_management_client.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 ~edge_order_management_client.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 + :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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.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: ~edge_order_management_client.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 + :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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar specifications: Specifications of the configuration. + :vartype specifications: list[~edge_order_management_client.models.Specification] + :ivar dimensions: Dimensions of the configuration. + :vartype dimensions: ~edge_order_management_client.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: ~edge_order_management_client.models.HierarchyInformation + :param filterable_property: Filters specific to product. + :type filterable_property: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar specifications: Specifications of the configuration. + :vartype specifications: list[~edge_order_management_client.models.Specification] + :ivar dimensions: Dimensions of the configuration. + :vartype dimensions: ~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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 + """ + + _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[~edge_order_management_client.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[~edge_order_management_client.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 ~edge_order_management_client.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[~edge_order_management_client.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 + """ + + _validation = { + 'serial_number': {'readonly': True}, + 'management_resource_id': {'readonly': True}, + } + + _attribute_map = { + 'serial_number': {'key': 'serialNumber', 'type': 'str'}, + 'management_resource_id': {'key': 'managementResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceDetails, self).__init__(**kwargs) + self.serial_number = None + self.management_resource_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 ~edge_order_management_client.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 + """ + + _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: Defines secondary layer of software-based encryption + enablement. Possible values include: "Disabled", "Enabled". Default value: "Disabled". + :type double_encryption_status: str or + ~edge_order_management_client.models.DoubleEncryptionStatus + """ + + _attribute_map = { + 'double_encryption_status': {'key': 'doubleEncryptionStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + double_encryption_status: Optional[Union[str, "DoubleEncryptionStatus"]] = "Disabled", + **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[~edge_order_management_client.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~edge_order_management_client.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: ~edge_order_management_client.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 ~edge_order_management_client.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 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 ~edge_order_management_client.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 ~edge_order_management_client.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 ~edge_order_management_client.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 + """ + + _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 ~edge_order_management_client.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: ~edge_order_management_client.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 + :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 + """ + + _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[~edge_order_management_client.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: ~edge_order_management_client.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 + :ivar current_stage: Current Order item Status. + :vartype current_stage: ~edge_order_management_client.models.StageDetails + :ivar order_item_stage_history: Order item status history. + :vartype order_item_stage_history: list[~edge_order_management_client.models.StageDetails] + :param preferences: Customer notification Preferences. + :type preferences: ~edge_order_management_client.models.Preferences + :ivar forward_shipping_details: Forward Package Shipping details. + :vartype forward_shipping_details: ~edge_order_management_client.models.ShippingDetails + :ivar reverse_shipping_details: Reverse Package Shipping details. + :vartype reverse_shipping_details: ~edge_order_management_client.models.ShippingDetails + :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 + values include: "Cancellable", "CancellableWithFee", "NotCancellable". + :vartype cancellation_status: str or + ~edge_order_management_client.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 + :ivar return_reason: Return reason. + :vartype return_reason: str + :ivar return_status: Describes whether the orderItem 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 + :ivar error: Top level error for the job. + :vartype error: ~edge_order_management_client.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}, + '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': 'ShippingDetails'}, + 'reverse_shipping_details': {'key': 'reverseShippingDetails', 'type': 'ShippingDetails'}, + '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'}, + '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.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: ~edge_order_management_client.models.SystemData + :param order_item_details: Required. Represents order item details. + :type order_item_details: ~edge_order_management_client.models.OrderItemDetails + :param address_details: Required. Represents shipping and return address for order item. + :type address_details: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.models.AddressProperties + :param preferences: Customer preference. + :type preferences: ~edge_order_management_client.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: ~edge_order_management_client.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 + :ivar order_stage_history: Order status history. + :vartype order_stage_history: list[~edge_order_management_client.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[~edge_order_management_client.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 ~edge_order_management_client.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 + :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[~edge_order_management_client.models.NotificationPreference] + :param transport_preferences: Preferences related to the shipment logistics of the order. + :type transport_preferences: ~edge_order_management_client.models.TransportPreferences + :param encryption_preferences: Preferences related to the Encryption. + :type encryption_preferences: ~edge_order_management_client.models.EncryptionPreferences + :param management_resource_preferences: Preferences related to the Management resource. + :type management_resource_preferences: + ~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar configurations: List of configurations for the product. + :vartype configurations: list[~edge_order_management_client.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: ~edge_order_management_client.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 + :ivar device_details: list of device details. + :vartype device_details: list[~edge_order_management_client.models.DeviceDetails] + """ + + _validation = { + 'hierarchy_information': {'required': True}, + 'device_details': {'readonly': True}, + } + + _attribute_map = { + 'display_info': {'key': 'displayInfo', 'type': 'DisplayInfo'}, + 'hierarchy_information': {'key': 'hierarchyInformation', 'type': 'HierarchyInformation'}, + 'count': {'key': 'count', 'type': 'int'}, + 'device_details': {'key': 'deviceDetails', 'type': '[DeviceDetails]'}, + } + + def __init__( + self, + *, + 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.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[~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar product_lines: List of product lines supported in the product family. + :vartype product_lines: list[~edge_order_management_client.models.ProductLine] + """ + + _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]'}, + } + + 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 + + +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[~edge_order_management_client.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 + """ + + _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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar product_lines: List of product lines supported in the product family. + :vartype product_lines: list[~edge_order_management_client.models.ProductLine] + """ + + _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]'}, + } + + 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 + + +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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar product_lines: List of product lines supported in the product family. + :vartype product_lines: list[~edge_order_management_client.models.ProductLine] + """ + + _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]'}, + } + + def __init__( + self, + **kwargs + ): + super(ProductFamilyProperties, self).__init__(**kwargs) + self.product_lines = 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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar products: List of products in the product line. + :vartype products: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar products: List of products in the product line. + :vartype products: list[~edge_order_management_client.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: ~edge_order_management_client.models.Description + :ivar image_information: Image information for the product system. + :vartype image_information: list[~edge_order_management_client.models.ImageInformation] + :ivar cost_information: Cost information for the product system. + :vartype cost_information: ~edge_order_management_client.models.CostInformation + :ivar availability_information: Availability information of the product system. + :vartype availability_information: ~edge_order_management_client.models.AvailabilityInformation + :ivar hierarchy_information: Hierarchy information of a product. + :vartype hierarchy_information: ~edge_order_management_client.models.HierarchyInformation + :ivar filterable_properties: list of filters supported for a product. + :vartype filterable_properties: list[~edge_order_management_client.models.FilterableProperty] + :ivar configurations: List of configurations for the product. + :vartype configurations: list[~edge_order_management_client.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 ~edge_order_management_client.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 + :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 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 + :param return_reason: Required. Return Reason. + :type return_reason: str + """ + + _validation = { + 'return_reason': {'required': True}, + } + + _attribute_map = { + 'return_address': {'key': 'returnAddress', 'type': 'AddressProperties'}, + 'return_reason': {'key': 'returnReason', 'type': 'str'}, + } + + def __init__( + self, + *, + return_reason: str, + return_address: Optional["AddressProperties"] = None, + **kwargs + ): + super(ReturnOrderItemDetails, self).__init__(**kwargs) + self.return_address = return_address + self.return_reason = return_reason + + +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 ~edge_order_management_client.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 ~edge_order_management_client.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 + :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 ~edge_order_management_client.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 + :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 + ~edge_order_management_client.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/operations/__init__.py b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/__init__.py new file mode 100644 index 00000000000..6003776a8ee --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/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/operations/_edge_order_management_client_operations.py new file mode 100644 index 00000000000..d722e59540b --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/operations/_edge_order_management_client_operations.py @@ -0,0 +1,1969 @@ +# 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[~edge_order_management_client.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 + + 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[~edge_order_management_client.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 + + 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: ~edge_order_management_client.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[~edge_order_management_client.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 + + 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: ~edge_order_management_client.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] + :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 + + 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[~edge_order_management_client.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 + + 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[~edge_order_management_client.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 + + 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] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OrderItemResourceList"] + """Lists order 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. + :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] + :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 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[~edge_order_management_client.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 + + 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: ~edge_order_management_client.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 = 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 = "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 = 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 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: ~edge_order_management_client.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[~edge_order_management_client.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 = "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 = 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 = "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 = 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: ~edge_order_management_client.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[~edge_order_management_client.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[~edge_order_management_client.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 + + 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: ~edge_order_management_client.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 = 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 parameter for order item, which provides + details on the devices of the product. + :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] + :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 + + 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 parameter for order item, which provides + details on the devices of the product. + :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 + :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 = 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 = "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 = 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: ~edge_order_management_client.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[~edge_order_management_client.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 = "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 = 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 = "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 = 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: ~edge_order_management_client.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[~edge_order_management_client.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: ~edge_order_management_client.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 = 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 = "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 = 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: ~edge_order_management_client.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/py.typed b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/py.typed new file mode 100644 index 00000000000..e5aff4f83af --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/azure/mgmt/edgeorder/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/sdk_packaging.toml b/sdk/edgeorder/azure-mgmt-edgeorder/sdk_packaging.toml new file mode 100644 index 00000000000..23d70b97824 --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/sdk_packaging.toml @@ -0,0 +1,9 @@ +[packaging] +package_name = "azure-mgmt-edgeorder" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Edgeorder Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/setup.cfg b/sdk/edgeorder/azure-mgmt-edgeorder/setup.cfg new file mode 100644 index 00000000000..3c6e79cf31d --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/edgeorder/azure-mgmt-edgeorder/setup.py b/sdk/edgeorder/azure-mgmt-edgeorder/setup.py new file mode 100644 index 00000000000..a323f83e88b --- /dev/null +++ b/sdk/edgeorder/azure-mgmt-edgeorder/setup.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-edgeorder" +PACKAGE_PPRINT_NAME = "Edgeorder Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.6.21', + 'azure-common~=1.1', + 'azure-mgmt-core>=1.2.0,<2.0.0', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) diff --git a/sdk/edgeorder/ci.yml b/sdk/edgeorder/ci.yml new file mode 100644 index 00000000000..1019e271484 --- /dev/null +++ b/sdk/edgeorder/ci.yml @@ -0,0 +1,33 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/edgeorder/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/edgeorder/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: edgeorder + Artifacts: + - name: azure-mgmt-edgeorder + safeName: azuremgmtedgeorder diff --git a/shared_requirements.txt b/shared_requirements.txt index 3a1b2804d60..23664f4c400 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -320,6 +320,7 @@ opentelemetry-sdk<2.0.0,>=1.0.0 #override azure-mgmt-costmanagement msrest>=0.6.21 #override azure-mgmt-testbase msrest>=0.6.21 #override azure-mgmt-agrifood msrest>=0.6.21 +#override azure-mgmt-edgeorder msrest>=0.6.21 #override azure-mgmt-redis msrest>=0.6.21 #override azure-mgmt-guestconfig msrest>=0.6.21 #override azure-mgmt-recoveryservices msrest>=0.6.21