diff --git a/sdk/billing/azure-mgmt-billing/README.md b/sdk/billing/azure-mgmt-billing/README.md index 41364a57d03f..119797fc6151 100644 --- a/sdk/billing/azure-mgmt-billing/README.md +++ b/sdk/billing/azure-mgmt-billing/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Billing Client Library. -This package has been tested with Python 3.8+. +This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.8+ is required to use this package. +- Python 3.9+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/billing/azure-mgmt-billing/_meta.json b/sdk/billing/azure-mgmt-billing/_meta.json index 1124bc537283..6d9f9d8d16b3 100644 --- a/sdk/billing/azure-mgmt-billing/_meta.json +++ b/sdk/billing/azure-mgmt-billing/_meta.json @@ -1,11 +1,11 @@ { - "commit": "e79d9ef3e065f2dcb6bd1db51e29c62a99dff5cb", + "commit": "1f55bd5d6faf7145e450a8ebc4788f157e187f7f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.19.0", + "@autorest/python@6.34.1", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/billing/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/billing/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.34.1 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/billing/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/__init__.py index 09499d2e1c56..87e50277ed2c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/__init__.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._billing_management_client import BillingManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._billing_management_client import BillingManagementClient # type: ignore from ._version import VERSION __version__ = VERSION try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -21,6 +27,6 @@ __all__ = [ "BillingManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_billing_management_client.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_billing_management_client.py index 02d8161fc826..9ba6feb160e2 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_billing_management_client.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_billing_management_client.py @@ -7,17 +7,19 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from ._configuration import BillingManagementClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( AddressOperations, AgreementsOperations, @@ -52,11 +54,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class BillingManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class BillingManagementClient: # pylint: disable=too-many-instance-attributes """Billing Client. :ivar agreements: AgreementsOperations operations @@ -125,7 +126,7 @@ class BillingManagementClient: # pylint: disable=client-accepts-api-version-key :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID that uniquely identifies a billing subscription. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this default value may result in unsupported behavior. @@ -135,15 +136,17 @@ class BillingManagementClient: # pylint: disable=client-accepts-api-version-key """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = BillingManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -162,7 +165,7 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_configuration.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_configuration.py index 76737de104d4..ba2aa71be3eb 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_configuration.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class BillingManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BillingManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BillingManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_utils/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_utils/__init__.py new file mode 100644 index 000000000000..0af9b28f6607 --- /dev/null +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_serialization.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_utils/serialization.py similarity index 83% rename from sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_serialization.py rename to sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_utils/serialization.py index 8139854b97bb..f5187701d7be 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_serialization.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/_utils/serialization.py @@ -1,30 +1,12 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# 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. # -------------------------------------------------------------------------- -# pylint: skip-file # pyright: reportUnnecessaryTypeIgnoreComment=false from base64 import b64decode, b64encode @@ -48,11 +30,8 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, - Mapping, ) try: @@ -62,13 +41,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -91,6 +70,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: :param data: Input, could be bytes or stream (will be decoded with UTF8) or text :type data: str or bytes or IO :param str content_type: The content type. + :return: The deserialized data. + :rtype: object """ if hasattr(data, "read"): # Assume a stream @@ -112,7 +93,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type: try: return json.loads(data_as_str) except ValueError as err: - raise DeserializationError("JSON is invalid: {}".format(err), err) + raise DeserializationError("JSON is invalid: {}".format(err), err) from err elif "xml" in (content_type or []): try: @@ -155,6 +136,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], Use bytes and headers to NOT use any requests/aiohttp or whatever specific implementation. Headers will tested for "content-type" + + :param bytes body_bytes: The body of the response. + :param dict headers: The headers of the response. + :returns: The deserialized data. + :rtype: object """ # Try to use content-type from headers if available content_type = None @@ -179,80 +165,31 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0.""" - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation.""" - return "Z" - - def dst(self, dt): - """No daylight saving for UTC.""" - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset): - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? None: self.additional_properties: Optional[Dict[str, Any]] = {} - for k in kwargs: + for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) elif k in self._validation and self._validation[k].get("readonly", False): @@ -300,13 +244,23 @@ def __init__(self, **kwargs: Any) -> None: setattr(self, k, kwargs[k]) def __eq__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are equal + :rtype: bool + """ if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False def __ne__(self, other: Any) -> bool: - """Compare objects by comparing all attributes.""" + """Compare objects by comparing all attributes. + + :param object other: The object to compare + :returns: True if objects are not equal + :rtype: bool + """ return not self.__eq__(other) def __str__(self) -> str: @@ -326,7 +280,11 @@ def is_xml_model(cls) -> bool: @classmethod def _create_xml_node(cls): - """Create XML node.""" + """Create XML node. + + :returns: The XML node + :rtype: xml.etree.ElementTree.Element + """ try: xml_map = cls._xml_map # type: ignore except AttributeError: @@ -346,7 +304,9 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, keep_readonly=keep_readonly, **kwargs + ) def as_dict( self, @@ -380,12 +340,15 @@ def my_key_transformer(key, attr_desc, value): If you want XML serialization, you can pass the kwargs is_xml=True. + :param bool keep_readonly: If you want to serialize the readonly attributes :param function key_transformer: A key transformer function. :returns: A dict JSON compatible object :rtype: dict """ serializer = Serializer(self._infer_class_models()) - return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) # type: ignore + return serializer._serialize( # type: ignore # pylint: disable=protected-access + self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs + ) @classmethod def _infer_class_models(cls): @@ -395,30 +358,31 @@ def _infer_class_models(cls): client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} if cls.__name__ not in client_models: raise ValueError("Not Autorest generated code") - except Exception: + except Exception: # pylint: disable=broad-exception-caught # Assume it's not Autorest generated (tests?). Add ourselves as dependencies. client_models = {cls.__name__: cls} return client_models @classmethod - def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -426,9 +390,11 @@ def from_dict( and last_rest_key_case_insensitive_extractor) :param dict data: A dict using RestAPI structure + :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -448,21 +414,25 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) + result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access return result @classmethod def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. + + :param dict response: The initial data + :param dict objects: The class objects + :returns: The class to be used + :rtype: class """ for subtype_key in cls.__dict__.get("_subtype_map", {}).keys(): subtype_value = None if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -501,11 +471,13 @@ def _decode_attribute_map_key(key): inside the received data. :param str key: A key string from the generated code + :returns: The decoded key + :rtype: str """ return key.replace("\\.", ".") -class Serializer(object): +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -540,7 +512,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -560,13 +532,16 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None): self.key_transformer = full_restapi_key_transformer self.client_side_validation = True - def _serialize(self, target_obj, data_type=None, **kwargs): + def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals + self, target_obj, data_type=None, **kwargs + ): """Serialize data into a string according to type. - :param target_obj: The data to be serialized. + :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. + :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) keep_readonly = kwargs.get("keep_readonly", False) @@ -592,12 +567,14 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized = {} if is_xml_model_serialization: - serialized = target_obj._create_xml_node() + serialized = target_obj._create_xml_node() # pylint: disable=protected-access try: - attributes = target_obj._attribute_map + attributes = target_obj._attribute_map # pylint: disable=protected-access for attr, attr_desc in attributes.items(): attr_name = attr - if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False): + if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access + attr_name, {} + ).get("readonly", False): continue if attr_name == "additional_properties" and attr_desc["key"] == "": @@ -633,7 +610,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if isinstance(new_attr, list): serialized.extend(new_attr) # type: ignore elif isinstance(new_attr, ET.Element): - # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces. + # If the down XML has no XML/Name, + # we MUST replace the tag with the local tag. But keeping the namespaces. if "name" not in getattr(orig_attr, "_xml_map", {}): splitted_tag = new_attr.tag.split("}") if len(splitted_tag) == 2: # Namespace @@ -664,17 +642,17 @@ def _serialize(self, target_obj, data_type=None, **kwargs): except (AttributeError, KeyError, TypeError) as err: msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj)) raise SerializationError(msg) from err - else: - return serialized + return serialized def body(self, data, data_type, **kwargs): """Serialize data intended for a request body. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized request body """ # Just in case this is a dict @@ -703,7 +681,7 @@ def body(self, data, data_type, **kwargs): attribute_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, ] - data = deserializer._deserialize(data_type, data) + data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access except DeserializationError as err: raise SerializationError("Unable to build a model: " + str(err)) from err @@ -712,11 +690,13 @@ def body(self, data, data_type, **kwargs): def url(self, name, data, data_type, **kwargs): """Serialize data intended for a URL path. - :param data: The data to be serialized. + :param str name: The name of the URL path parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :returns: The serialized URL path + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -728,21 +708,20 @@ def url(self, name, data, data_type, **kwargs): output = output.replace("{", quote("{")).replace("}", quote("}")) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return output + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return output def query(self, name, data, data_type, **kwargs): """Serialize data intended for a URL query. - :param data: The data to be serialized. + :param str name: The name of the query parameter. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :keyword bool skip_quote: Whether to skip quote the serialized result. - Defaults to False. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized query parameter """ try: # Treat the list aside, since we don't want to encode the div separator @@ -759,19 +738,20 @@ def query(self, name, data, data_type, **kwargs): output = str(output) else: output = quote(str(output), safe="") - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def header(self, name, data, data_type, **kwargs): """Serialize data intended for a request header. - :param data: The data to be serialized. + :param str name: The name of the header. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None + :returns: The serialized header """ try: if data_type in ["[str]"]: @@ -780,21 +760,20 @@ def header(self, name, data, data_type, **kwargs): output = self.serialize_data(data, data_type, **kwargs) if data_type == "bool": output = json.dumps(output) - except SerializationError: - raise TypeError("{} must be type {}.".format(name, data_type)) - else: - return str(output) + except SerializationError as exc: + raise TypeError("{} must be type {}.".format(name, data_type)) from exc + return str(output) def serialize_data(self, data, data_type, **kwargs): """Serialize generic data according to supplied data type. - :param data: The data to be serialized. + :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :param bool required: Whether it's essential that the data not be - empty or None - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. + :returns: The serialized data. + :rtype: str, int, float, bool, dict, list """ if data is None: raise ValueError("No value for given attribute") @@ -805,7 +784,7 @@ def serialize_data(self, data, data_type, **kwargs): if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) - elif data_type in self.serialize_type: + if data_type in self.serialize_type: return self.serialize_type[data_type](data, **kwargs) # If dependencies is empty, try with current data class @@ -821,11 +800,10 @@ def serialize_data(self, data, data_type, **kwargs): except (ValueError, TypeError) as err: msg = "Unable to serialize value: {!r} as type: {!r}." raise SerializationError(msg.format(data, data_type)) from err - else: - return self._serialize(data, **kwargs) + return self._serialize(data, **kwargs) @classmethod - def _get_custom_serializers(cls, data_type, **kwargs): + def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type) if custom_serializer: return custom_serializer @@ -841,23 +819,26 @@ def serialize_basic(cls, data, data_type, **kwargs): - basic_types_serializers dict[str, callable] : If set, use the callable as serializer - is_xml bool : If set, use xml_basic_types_serializers - :param data: Object to be serialized. + :param obj data: Object to be serialized. :param str data_type: Type of object in the iterable. + :rtype: str, int, float, bool + :return: serialized object """ custom_serializer = cls._get_custom_serializers(data_type, **kwargs) if custom_serializer: return custom_serializer(data) if data_type == "str": return cls.serialize_unicode(data) - return eval(data_type)(data) # nosec + return eval(data_type)(data) # nosec # pylint: disable=eval-used @classmethod def serialize_unicode(cls, data): """Special handling for serializing unicode strings in Py2. Encode to UTF-8 if unicode, otherwise handle as a str. - :param data: Object to be serialized. + :param str data: Object to be serialized. :rtype: str + :return: serialized object """ try: # If I received an enum, return its value return data.value @@ -871,8 +852,7 @@ def serialize_unicode(cls, data): return data except NameError: return str(data) - else: - return str(data) + return str(data) def serialize_iter(self, data, iter_type, div=None, **kwargs): """Serialize iterable. @@ -882,15 +862,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs): serialization_ctxt['type'] should be same as data_type. - is_xml bool : If set, serialize as XML - :param list attr: Object to be serialized. + :param list data: Object to be serialized. :param str iter_type: Type of object in the iterable. - :param bool required: Whether the objects in the iterable must - not be None or empty. :param str div: If set, this str will be used to combine the elements in the iterable into a combined string. Default is 'None'. - :keyword bool do_quote: Whether to quote the serialized result of each iterable element. Defaults to False. :rtype: list, str + :return: serialized iterable """ if isinstance(data, str): raise SerializationError("Refuse str type as a valid iter type.") @@ -945,9 +923,8 @@ def serialize_dict(self, attr, dict_type, **kwargs): :param dict attr: Object to be serialized. :param str dict_type: Type of object in the dictionary. - :param bool required: Whether the objects in the dictionary must - not be None or empty. :rtype: dict + :return: serialized dictionary """ serialization_ctxt = kwargs.get("serialization_ctxt", {}) serialized = {} @@ -971,7 +948,7 @@ def serialize_dict(self, attr, dict_type, **kwargs): return serialized - def serialize_object(self, attr, **kwargs): + def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Serialize a generic object. This will be handled as a dictionary. If object passed in is not a basic type (str, int, float, dict, list) it will simply be @@ -979,6 +956,7 @@ def serialize_object(self, attr, **kwargs): :param dict attr: Object to be serialized. :rtype: dict or str + :return: serialized object """ if attr is None: return None @@ -1003,7 +981,7 @@ def serialize_object(self, attr, **kwargs): return self.serialize_decimal(attr) # If it's a model or I know this dependency, serialize as a Model - elif obj_type in self.dependencies.values() or isinstance(attr, Model): + if obj_type in self.dependencies.values() or isinstance(attr, Model): return self._serialize(attr) if obj_type == dict: @@ -1034,56 +1012,61 @@ def serialize_enum(attr, enum_obj=None): try: enum_obj(result) # type: ignore return result - except ValueError: + except ValueError as exc: for enum_value in enum_obj: # type: ignore if enum_value.value.lower() == str(attr).lower(): return enum_value.value error = "{!r} is not valid value for enum {!r}" - raise SerializationError(error.format(attr, enum_obj)) + raise SerializationError(error.format(attr, enum_obj)) from exc @staticmethod - def serialize_bytearray(attr, **kwargs): + def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument """Serialize bytearray into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ return b64encode(attr).decode() @staticmethod - def serialize_base64(attr, **kwargs): + def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument """Serialize str into base-64 string. - :param attr: Object to be serialized. + :param str attr: Object to be serialized. :rtype: str + :return: serialized base64 """ encoded = b64encode(attr).decode("ascii") return encoded.strip("=").replace("+", "-").replace("/", "_") @staticmethod - def serialize_decimal(attr, **kwargs): + def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument """Serialize Decimal object to float. - :param attr: Object to be serialized. + :param decimal attr: Object to be serialized. :rtype: float + :return: serialized decimal """ return float(attr) @staticmethod - def serialize_long(attr, **kwargs): + def serialize_long(attr, **kwargs): # pylint: disable=unused-argument """Serialize long (Py2) or int (Py3). - :param attr: Object to be serialized. + :param int attr: Object to be serialized. :rtype: int/long + :return: serialized long """ return _long_type(attr) @staticmethod - def serialize_date(attr, **kwargs): + def serialize_date(attr, **kwargs): # pylint: disable=unused-argument """Serialize Date object into ISO-8601 formatted string. :param Date attr: Object to be serialized. :rtype: str + :return: serialized date """ if isinstance(attr, str): attr = isodate.parse_date(attr) @@ -1091,11 +1074,12 @@ def serialize_date(attr, **kwargs): return t @staticmethod - def serialize_time(attr, **kwargs): + def serialize_time(attr, **kwargs): # pylint: disable=unused-argument """Serialize Time object into ISO-8601 formatted string. :param datetime.time attr: Object to be serialized. :rtype: str + :return: serialized time """ if isinstance(attr, str): attr = isodate.parse_time(attr) @@ -1105,30 +1089,32 @@ def serialize_time(attr, **kwargs): return t @staticmethod - def serialize_duration(attr, **kwargs): + def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument """Serialize TimeDelta object into ISO-8601 formatted string. :param TimeDelta attr: Object to be serialized. :rtype: str + :return: serialized duration """ if isinstance(attr, str): attr = isodate.parse_duration(attr) return isodate.duration_isoformat(attr) @staticmethod - def serialize_rfc(attr, **kwargs): + def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into RFC-1123 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. + :return: serialized rfc """ try: if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") utc = attr.utctimetuple() - except AttributeError: - raise TypeError("RFC1123 object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("RFC1123 object must be valid Datetime object.") from exc return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format( Serializer.days[utc.tm_wday], @@ -1141,12 +1127,13 @@ def serialize_rfc(attr, **kwargs): ) @staticmethod - def serialize_iso(attr, **kwargs): + def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into ISO-8601 formatted string. :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. + :return: serialized iso """ if isinstance(attr, str): attr = isodate.parse_datetime(attr) @@ -1172,13 +1159,14 @@ def serialize_iso(attr, **kwargs): raise TypeError(msg) from err @staticmethod - def serialize_unix(attr, **kwargs): + def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument """Serialize Datetime object into IntTime format. This is represented as seconds. :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid + :return: serialied unix """ if isinstance(attr, int): return attr @@ -1186,11 +1174,11 @@ def serialize_unix(attr, **kwargs): if not attr.tzinfo: _LOGGER.warning("Datetime with no tzinfo will be considered UTC.") return int(calendar.timegm(attr.utctimetuple())) - except AttributeError: - raise TypeError("Unix time object must be valid Datetime object.") + except AttributeError as exc: + raise TypeError("Unix time object must be valid Datetime object.") from exc -def rest_key_extractor(attr, attr_desc, data): +def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument key = attr_desc["key"] working_data = data @@ -1211,7 +1199,9 @@ def rest_key_extractor(attr, attr_desc, data): return working_data.get(key) -def rest_key_case_insensitive_extractor(attr, attr_desc, data): +def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements + attr, attr_desc, data +): key = attr_desc["key"] working_data = data @@ -1232,17 +1222,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data): return attribute_key_case_insensitive_extractor(key, None, working_data) -def last_rest_key_extractor(attr, attr_desc, data): - """Extract the attribute in "data" based on the last part of the JSON path key.""" +def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument + """Extract the attribute in "data" based on the last part of the JSON path key. + + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute + """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) return attribute_key_extractor(dict_keys[-1], None, data) -def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): +def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument """Extract the attribute in "data" based on the last part of the JSON path key. This is the case insensitive version of "last_rest_key_extractor" + :param str attr: The attribute to extract + :param dict attr_desc: The attribute description + :param dict data: The data to extract from + :rtype: object + :returns: The extracted attribute """ key = attr_desc["key"] dict_keys = _FLATTEN.split(key) @@ -1279,7 +1281,7 @@ def _extract_name_from_internal_type(internal_type): return xml_name -def xml_key_extractor(attr, attr_desc, data): +def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements if isinstance(data, dict): return None @@ -1331,22 +1333,21 @@ def xml_key_extractor(attr, attr_desc, data): if is_iter_type: if is_wrapped: return None # is_wrapped no node, we want None - else: - return [] # not wrapped, assume empty list + return [] # not wrapped, assume empty list return None # Assume it's not there, maybe an optional node. # If is_iter_type and not wrapped, return all found children if is_iter_type: if not is_wrapped: return children - else: # Iter and wrapped, should have found one node only (the wrap one) - if len(children) != 1: - raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( - xml_name - ) + # Iter and wrapped, should have found one node only (the wrap one) + if len(children) != 1: + raise DeserializationError( + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( + xml_name ) - return list(children[0]) # Might be empty list and that's ok. + ) + return list(children[0]) # Might be empty list and that's ok. # Here it's not a itertype, we should have found one element only or empty if len(children) > 1: @@ -1354,7 +1355,7 @@ def xml_key_extractor(attr, attr_desc, data): return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1363,9 +1364,9 @@ class Deserializer(object): basic_types = {str: "str", int: "int", bool: "bool", float: "float"} - valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") + valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1401,27 +1402,29 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ data = self._unpack_content(response_data, content_type) return self._deserialize(target_obj, data) - def _deserialize(self, target_obj, data): + def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements """Call the deserializer on a model. Data needs to be already deserialized as JSON or XML ElementTree :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ # This is already a model, go recursive just in case if hasattr(data, "_attribute_map"): constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")] try: - for attr, mapconfig in data._attribute_map.items(): + for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access if attr in constants: continue value = getattr(data, attr) @@ -1440,13 +1443,13 @@ def _deserialize(self, target_obj, data): if isinstance(response, str): return self.deserialize_data(data, response) - elif isinstance(response, type) and issubclass(response, Enum): + if isinstance(response, type) and issubclass(response, Enum): return self.deserialize_enum(data, response) if data is None or data is CoreNull: return data try: - attributes = response._attribute_map # type: ignore + attributes = response._attribute_map # type: ignore # pylint: disable=protected-access d_attrs = {} for attr, attr_desc in attributes.items(): # Check empty string. If it's not empty, someone has a real "additionalProperties"... @@ -1476,9 +1479,8 @@ def _deserialize(self, target_obj, data): except (AttributeError, TypeError, KeyError) as err: msg = "Unable to deserialize to object: " + class_name # type: ignore raise DeserializationError(msg) from err - else: - additional_properties = self._build_additional_properties(attributes, data) - return self._instantiate_model(response, d_attrs, additional_properties) + additional_properties = self._build_additional_properties(attributes, data) + return self._instantiate_model(response, d_attrs, additional_properties) def _build_additional_properties(self, attribute_map, data): if not self.additional_properties_detection: @@ -1505,6 +1507,8 @@ def _classify_target(self, target, data): :param str target: The target object type to deserialize to. :param str/dict data: The response data to deserialize. + :return: The classified target object and its class name. + :rtype: tuple """ if target is None: return None, None @@ -1516,7 +1520,7 @@ def _classify_target(self, target, data): return target, target try: - target = target._classify(data, self.dependencies) # type: ignore + target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access except AttributeError: pass # Target is not a Model, no classify return target, target.__class__.__name__ # type: ignore @@ -1531,10 +1535,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): :param str target_obj: The target object type to deserialize to. :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. + :return: Deserialized object. + :rtype: object """ try: return self(target_obj, data, content_type=content_type) - except: + except: # pylint: disable=bare-except _LOGGER.debug( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True ) @@ -1552,10 +1558,12 @@ def _unpack_content(raw_data, content_type=None): If raw_data is something else, bypass all logic and return it directly. - :param raw_data: Data to be processed. - :param content_type: How to parse if raw_data is a string/bytes. + :param obj raw_data: Data to be processed. + :param str content_type: How to parse if raw_data is a string/bytes. :raises JSONDecodeError: If JSON is requested and parsing is impossible. :raises UnicodeDecodeError: If bytes is not UTF8 + :rtype: object + :return: Unpacked content. """ # Assume this is enough to detect a Pipeline Response without importing it context = getattr(raw_data, "context", {}) @@ -1579,24 +1587,35 @@ def _unpack_content(raw_data, content_type=None): def _instantiate_model(self, response, attrs, additional_properties=None): """Instantiate a response model passing in deserialized args. - :param response: The response model class. - :param d_attrs: The deserialized response attributes. + :param Response response: The response model class. + :param dict attrs: The deserialized response attributes. + :param dict additional_properties: Additional properties to be set. + :rtype: Response + :return: The instantiated response model. """ if callable(response): subtype = getattr(response, "_subtype_map", {}) try: - readonly = [k for k, v in response._validation.items() if v.get("readonly")] - const = [k for k, v in response._validation.items() if v.get("constant")] + readonly = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") + ] + const = [ + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") + ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore - raise DeserializationError(msg + str(err)) + raise DeserializationError(msg + str(err)) from err else: try: for attr, value in attrs.items(): @@ -1605,15 +1624,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None): except Exception as exp: msg = "Unable to populate response model. " msg += "Type: {}, Error: {}".format(type(response), exp) - raise DeserializationError(msg) + raise DeserializationError(msg) from exp - def deserialize_data(self, data, data_type): + def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements """Process data for deserialization according to data type. :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. + :rtype: object """ if data is None: return data @@ -1627,7 +1647,11 @@ def deserialize_data(self, data, data_type): if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())): return data - is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"] + is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment + "object", + "[]", + r"{}", + ] if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text: return None data_val = self.deserialize_type[data_type](data) @@ -1647,14 +1671,14 @@ def deserialize_data(self, data, data_type): msg = "Unable to deserialize response data." msg += " Data: {}, {}".format(data, data_type) raise DeserializationError(msg) from err - else: - return self._deserialize(obj_type, data) + return self._deserialize(obj_type, data) def deserialize_iter(self, attr, iter_type): """Deserialize an iterable. :param list attr: Iterable to be deserialized. :param str iter_type: The type of object in the iterable. + :return: Deserialized iterable. :rtype: list """ if attr is None: @@ -1671,6 +1695,7 @@ def deserialize_dict(self, attr, dict_type): :param dict/list attr: Dictionary to be deserialized. Also accepts a list of key, value pairs. :param str dict_type: The object type of the items in the dictionary. + :return: Deserialized dictionary. :rtype: dict """ if isinstance(attr, list): @@ -1681,13 +1706,14 @@ def deserialize_dict(self, attr, dict_type): attr = {el.tag: el.text for el in attr} return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()} - def deserialize_object(self, attr, **kwargs): + def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements """Deserialize a generic object. This will be handled as a dictionary. :param dict attr: Dictionary to be deserialized. + :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1720,11 +1746,10 @@ def deserialize_object(self, attr, **kwargs): pass return deserialized - else: - error = "Cannot deserialize generic object with type: " - raise TypeError(error + str(obj_type)) + error = "Cannot deserialize generic object with type: " + raise TypeError(error + str(obj_type)) - def deserialize_basic(self, attr, data_type): + def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements """Deserialize basic builtin data type from string. Will attempt to convert to str, int, float and bool. This function will also accept '1', '0', 'true' and 'false' as @@ -1732,8 +1757,9 @@ def deserialize_basic(self, attr, data_type): :param str attr: response string to be deserialized. :param str data_type: deserialization data type. + :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1743,24 +1769,23 @@ def deserialize_basic(self, attr, data_type): if data_type == "str": # None or '', node is empty string. return "" - else: - # None or '', node with a strong type is None. - # Don't try to model "empty bool" or "empty int" - return None + # None or '', node with a strong type is None. + # Don't try to model "empty bool" or "empty int" + return None if data_type == "bool": if attr in [True, False, 1, 0]: return bool(attr) - elif isinstance(attr, str): + if isinstance(attr, str): if attr.lower() in ["true", "1"]: return True - elif attr.lower() in ["false", "0"]: + if attr.lower() in ["false", "0"]: return False raise TypeError("Invalid boolean value: {}".format(attr)) if data_type == "str": return self.deserialize_unicode(attr) - return eval(data_type)(attr) # nosec + return eval(data_type)(attr) # nosec # pylint: disable=eval-used @staticmethod def deserialize_unicode(data): @@ -1768,6 +1793,7 @@ def deserialize_unicode(data): as a string. :param str data: response string to be deserialized. + :return: Deserialized string. :rtype: str or unicode """ # We might be here because we have an enum modeled as string, @@ -1781,8 +1807,7 @@ def deserialize_unicode(data): return data except NameError: return str(data) - else: - return str(data) + return str(data) @staticmethod def deserialize_enum(data, enum_obj): @@ -1794,6 +1819,7 @@ def deserialize_enum(data, enum_obj): :param str data: Response string to be deserialized. If this value is None or invalid it will be returned as-is. :param Enum enum_obj: Enum object to deserialize to. + :return: Deserialized enum object. :rtype: Enum """ if isinstance(data, enum_obj) or data is None: @@ -1804,9 +1830,9 @@ def deserialize_enum(data, enum_obj): # Workaround. We might consider remove it in the future. try: return list(enum_obj.__members__.values())[data] - except IndexError: + except IndexError as exc: error = "{!r} is not a valid index for enum {!r}" - raise DeserializationError(error.format(data, enum_obj)) + raise DeserializationError(error.format(data, enum_obj)) from exc try: return enum_obj(str(data)) except ValueError: @@ -1822,8 +1848,9 @@ def deserialize_bytearray(attr): """Deserialize string into bytearray. :param str attr: response string to be deserialized. + :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1834,8 +1861,9 @@ def deserialize_base64(attr): """Deserialize base64 encoded string into string. :param str attr: response string to be deserialized. + :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1849,8 +1877,9 @@ def deserialize_decimal(attr): """Deserialize string into Decimal object. :param str attr: response string to be deserialized. - :rtype: Decimal - :raises: DeserializationError if string format invalid. + :return: Deserialized decimal + :raises DeserializationError: if string format invalid. + :rtype: decimal """ if isinstance(attr, ET.Element): attr = attr.text @@ -1865,8 +1894,9 @@ def deserialize_long(attr): """Deserialize string into long (Py2) or int (Py3). :param str attr: response string to be deserialized. + :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1877,8 +1907,9 @@ def deserialize_duration(attr): """Deserialize ISO-8601 formatted string into TimeDelta object. :param str attr: response string to be deserialized. + :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1887,16 +1918,16 @@ def deserialize_duration(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize duration object." raise DeserializationError(msg) from err - else: - return duration + return duration @staticmethod def deserialize_date(attr): """Deserialize ISO-8601 formatted string into Date object. :param str attr: response string to be deserialized. + :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1910,8 +1941,9 @@ def deserialize_time(attr): """Deserialize ISO-8601 formatted string into time object. :param str attr: response string to be deserialized. + :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1924,31 +1956,32 @@ def deserialize_rfc(attr): """Deserialize RFC-1123 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) except ValueError as err: msg = "Cannot deserialize to rfc datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_iso(attr): """Deserialize ISO-8601 formatted string into Datetime object. :param str attr: response string to be deserialized. + :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1976,8 +2009,7 @@ def deserialize_iso(attr): except (ValueError, OverflowError, AttributeError) as err: msg = "Cannot deserialize datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj @staticmethod def deserialize_unix(attr): @@ -1985,8 +2017,9 @@ def deserialize_unix(attr): This is represented as seconds. :param int attr: Object to be serialized. + :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore @@ -1996,5 +2029,4 @@ def deserialize_unix(attr): except ValueError as err: msg = "Cannot deserialize to unix datetime object." raise DeserializationError(msg) from err - else: - return date_obj + return date_obj diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/__init__.py index 4dc1c988e7c8..818c4a45283c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/__init__.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._billing_management_client import BillingManagementClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._billing_management_client import BillingManagementClient # type: ignore try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -18,6 +24,6 @@ __all__ = [ "BillingManagementClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_billing_management_client.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_billing_management_client.py index cfe2dd128574..f76a32ac9f70 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_billing_management_client.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_billing_management_client.py @@ -7,16 +7,18 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import BillingManagementClientConfiguration from .operations import ( AddressOperations, @@ -52,11 +54,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class BillingManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes +class BillingManagementClient: # pylint: disable=too-many-instance-attributes """Billing Client. :ivar agreements: AgreementsOperations operations @@ -127,7 +128,7 @@ class BillingManagementClient: # pylint: disable=client-accepts-api-version-key :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID that uniquely identifies a billing subscription. Required. :type subscription_id: str - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str :keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this default value may result in unsupported behavior. @@ -137,15 +138,17 @@ class BillingManagementClient: # pylint: disable=client-accepts-api-version-key """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = BillingManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -164,7 +167,9 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_configuration.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_configuration.py index 249ec86d49f8..dbbf8357fd6e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_configuration.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class BillingManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class BillingManagementClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for BillingManagementClient. Note that all parameters used to create this instance are saved as instance diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/__init__.py index 5239c254e4be..3dad78203a50 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/__init__.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/__init__.py @@ -5,40 +5,46 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._agreements_operations import AgreementsOperations -from ._associated_tenants_operations import AssociatedTenantsOperations -from ._available_balances_operations import AvailableBalancesOperations -from ._billing_accounts_operations import BillingAccountsOperations -from ._address_operations import AddressOperations -from ._billing_permissions_operations import BillingPermissionsOperations -from ._billing_profiles_operations import BillingProfilesOperations -from ._billing_property_operations import BillingPropertyOperations -from ._billing_requests_operations import BillingRequestsOperations -from ._billing_role_assignments_operations import BillingRoleAssignmentsOperations -from ._billing_role_definition_operations import BillingRoleDefinitionOperations -from ._savings_plan_orders_operations import SavingsPlanOrdersOperations -from ._savings_plans_operations import SavingsPlansOperations -from ._billing_subscriptions_operations import BillingSubscriptionsOperations -from ._billing_subscriptions_aliases_operations import BillingSubscriptionsAliasesOperations -from ._customers_operations import CustomersOperations -from ._departments_operations import DepartmentsOperations -from ._enrollment_accounts_operations import EnrollmentAccountsOperations -from ._invoices_operations import InvoicesOperations -from ._invoice_sections_operations import InvoiceSectionsOperations -from ._operations import Operations -from ._payment_methods_operations import PaymentMethodsOperations -from ._policies_operations import PoliciesOperations -from ._products_operations import ProductsOperations -from ._reservations_operations import ReservationsOperations -from ._reservation_orders_operations import ReservationOrdersOperations -from ._transactions_operations import TransactionsOperations -from ._transfers_operations import TransfersOperations -from ._partner_transfers_operations import PartnerTransfersOperations -from ._recipient_transfers_operations import RecipientTransfersOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._agreements_operations import AgreementsOperations # type: ignore +from ._associated_tenants_operations import AssociatedTenantsOperations # type: ignore +from ._available_balances_operations import AvailableBalancesOperations # type: ignore +from ._billing_accounts_operations import BillingAccountsOperations # type: ignore +from ._address_operations import AddressOperations # type: ignore +from ._billing_permissions_operations import BillingPermissionsOperations # type: ignore +from ._billing_profiles_operations import BillingProfilesOperations # type: ignore +from ._billing_property_operations import BillingPropertyOperations # type: ignore +from ._billing_requests_operations import BillingRequestsOperations # type: ignore +from ._billing_role_assignments_operations import BillingRoleAssignmentsOperations # type: ignore +from ._billing_role_definition_operations import BillingRoleDefinitionOperations # type: ignore +from ._savings_plan_orders_operations import SavingsPlanOrdersOperations # type: ignore +from ._savings_plans_operations import SavingsPlansOperations # type: ignore +from ._billing_subscriptions_operations import BillingSubscriptionsOperations # type: ignore +from ._billing_subscriptions_aliases_operations import BillingSubscriptionsAliasesOperations # type: ignore +from ._customers_operations import CustomersOperations # type: ignore +from ._departments_operations import DepartmentsOperations # type: ignore +from ._enrollment_accounts_operations import EnrollmentAccountsOperations # type: ignore +from ._invoices_operations import InvoicesOperations # type: ignore +from ._invoice_sections_operations import InvoiceSectionsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._payment_methods_operations import PaymentMethodsOperations # type: ignore +from ._policies_operations import PoliciesOperations # type: ignore +from ._products_operations import ProductsOperations # type: ignore +from ._reservations_operations import ReservationsOperations # type: ignore +from ._reservation_orders_operations import ReservationOrdersOperations # type: ignore +from ._transactions_operations import TransactionsOperations # type: ignore +from ._transfers_operations import TransfersOperations # type: ignore +from ._partner_transfers_operations import PartnerTransfersOperations # type: ignore +from ._recipient_transfers_operations import RecipientTransfersOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -73,5 +79,5 @@ "PartnerTransfersOperations", "RecipientTransfersOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_address_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_address_operations.py index 74a891dd4634..23b46735ad56 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_address_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_address_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +25,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._address_operations import build_validate_request +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +47,10 @@ class AddressOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def validate( @@ -111,7 +109,7 @@ async def validate( :rtype: ~azure.mgmt.billing.models.AddressValidationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_agreements_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_agreements_operations.py index 32284b9fb416..6430fca8186c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_agreements_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_agreements_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,12 +27,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._agreements_operations import build_get_request, build_list_by_billing_account_request +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,10 +49,10 @@ class AgreementsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, billing_account_name: str, agreement_name: str, **kwargs: Any) -> _models.Agreement: @@ -71,7 +69,7 @@ async def get(self, billing_account_name: str, agreement_name: str, **kwargs: An :rtype: ~azure.mgmt.billing.models.Agreement :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -136,7 +134,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AgreementListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_associated_tenants_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_associated_tenants_operations.py index 897f4b9ba769..944cc7e25b7e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_associated_tenants_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_associated_tenants_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,17 +32,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._associated_tenants_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_billing_account_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,15 +59,15 @@ class AssociatedTenantsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _delete_initial( self, billing_account_name: str, associated_tenant_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -197,7 +195,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.AssociatedTenant :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -246,7 +244,7 @@ async def _create_or_update_initial( parameters: Union[_models.AssociatedTenant, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -497,7 +495,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AssociatedTenantListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_available_balances_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_available_balances_operations.py index 6c456c23937b..090ba160144d 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_available_balances_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_available_balances_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,15 +24,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._available_balances_operations import ( build_get_by_billing_account_request, build_get_by_billing_profile_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,10 +49,10 @@ class AvailableBalancesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) -> _models.AvailableBalance: @@ -73,7 +71,7 @@ async def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) :rtype: ~azure.mgmt.billing.models.AvailableBalance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -134,7 +132,7 @@ async def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.AvailableBalance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_accounts_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_accounts_operations.py index dd2f7f2e227d..1e2d50fa845d 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_accounts_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_accounts_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,26 +6,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime from io import IOBase -import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -47,6 +34,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_accounts_operations import ( build_add_payment_terms_request, build_cancel_payment_terms_request, @@ -57,11 +45,8 @@ build_update_request, build_validate_payment_terms_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -80,15 +65,15 @@ class BillingAccountsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _add_payment_terms_initial( self, billing_account_name: str, parameters: Union[List[_models.PaymentTerm], IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -279,7 +264,7 @@ def get_long_running_output(pipeline_response): async def _cancel_payment_terms_initial( self, billing_account_name: str, parameters: datetime.datetime, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -417,7 +402,7 @@ async def confirm_transition(self, billing_account_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.billing.models.TransitionDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -486,7 +471,7 @@ def list_invoice_sections_by_create_subscription_permission( # pylint: disable= api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceSectionWithCreateSubPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -616,7 +601,7 @@ async def validate_payment_terms( :rtype: ~azure.mgmt.billing.models.PaymentTermsEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -682,7 +667,7 @@ async def get(self, billing_account_name: str, **kwargs: Any) -> _models.Billing :rtype: ~azure.mgmt.billing.models.BillingAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -726,7 +711,7 @@ async def get(self, billing_account_name: str, **kwargs: Any) -> _models.Billing async def _update_initial( self, billing_account_name: str, parameters: Union[_models.BillingAccountPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -990,7 +975,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_permissions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_permissions_operations.py index 8f77557431e7..fe1a60fb1c24 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_permissions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_permissions_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,6 +29,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_permissions_operations import ( build_check_access_by_billing_account_request, build_check_access_by_billing_profile_request, @@ -43,11 +45,8 @@ build_list_by_enrollment_account_request, build_list_by_invoice_section_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -66,10 +65,10 @@ class BillingPermissionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_account( @@ -92,7 +91,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -176,7 +175,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -322,7 +321,7 @@ async def check_access_by_billing_profile( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -401,7 +400,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -557,7 +556,7 @@ async def check_access_by_customer( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -637,7 +636,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -793,7 +792,7 @@ async def check_access_by_invoice_section( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -915,7 +914,7 @@ async def check_access_by_billing_account( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -991,7 +990,7 @@ def list_by_customer_at_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1076,7 +1075,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1222,7 +1221,7 @@ async def check_access_by_department( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1299,7 +1298,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1445,7 +1444,7 @@ async def check_access_by_enrollment_account( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_profiles_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_profiles_operations.py index 63bd1dc55511..c347c8be69c2 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_profiles_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_profiles_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_profiles_operations import ( build_create_or_update_request, build_delete_request, @@ -39,11 +40,8 @@ build_list_by_billing_account_request, build_validate_delete_eligibility_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,10 +60,10 @@ class BillingProfilesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def validate_delete_eligibility( @@ -85,7 +83,7 @@ async def validate_delete_eligibility( :rtype: ~azure.mgmt.billing.models.DeleteBillingProfileEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -130,7 +128,7 @@ async def validate_delete_eligibility( async def _delete_initial( self, billing_account_name: str, billing_profile_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +256,7 @@ async def get(self, billing_account_name: str, billing_profile_name: str, **kwar :rtype: ~azure.mgmt.billing.models.BillingProfile :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -307,7 +305,7 @@ async def _create_or_update_initial( parameters: Union[_models.BillingProfile, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -566,7 +564,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingProfileListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_property_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_property_operations.py index b710fc15ee63..70c901c52cda 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_property_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_property_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +25,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_property_operations import build_get_request, build_update_request +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +47,10 @@ class BillingPropertyOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -74,7 +72,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.BillingProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -180,7 +178,7 @@ async def update( :rtype: ~azure.mgmt.billing.models.BillingProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_requests_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_requests_operations.py index 448adedb7379..b993d5c05046 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_requests_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_requests_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_requests_operations import ( build_create_or_update_request, build_get_request, @@ -41,11 +42,8 @@ build_list_by_invoice_section_request, build_list_by_user_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -64,10 +62,10 @@ class BillingRequestsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_profile( @@ -120,7 +118,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -242,7 +240,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -365,7 +363,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +480,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -562,7 +560,7 @@ async def get(self, billing_request_name: str, **kwargs: Any) -> _models.Billing :rtype: ~azure.mgmt.billing.models.BillingRequest :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -606,7 +604,7 @@ async def get(self, billing_request_name: str, **kwargs: Any) -> _models.Billing async def _create_or_update_initial( self, billing_request_name: str, parameters: Union[_models.BillingRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -833,7 +831,7 @@ def list_by_user( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_assignments_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_assignments_operations.py index 22140fc1de55..49d83c8d5f0c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_assignments_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_assignments_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_role_assignments_operations import ( build_create_by_billing_account_request, build_create_by_billing_profile_request, @@ -63,11 +65,8 @@ build_resolve_by_customer_request, build_resolve_by_invoice_section_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -86,13 +85,13 @@ class BillingRoleAssignmentsOperations: # pylint: disable=too-many-public-metho def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - async def delete_by_billing_profile( # pylint: disable=inconsistent-return-statements + async def delete_by_billing_profile( self, billing_account_name: str, billing_profile_name: str, billing_role_assignment_name: str, **kwargs: Any ) -> None: """Deletes a role assignment on a billing profile. The operation is supported for billing accounts @@ -112,7 +111,7 @@ async def delete_by_billing_profile( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -173,7 +172,7 @@ async def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -258,7 +257,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -330,7 +329,7 @@ async def _create_by_billing_profile_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -532,7 +531,7 @@ def get_long_running_output(pipeline_response): ) @distributed_trace_async - async def delete_by_customer( # pylint: disable=inconsistent-return-statements + async def delete_by_customer( self, billing_account_name: str, billing_profile_name: str, @@ -559,7 +558,7 @@ async def delete_by_customer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -627,7 +626,7 @@ async def get_by_customer( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -715,7 +714,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -789,7 +788,7 @@ async def _create_by_customer_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1010,7 +1009,7 @@ async def _resolve_by_customer_initial( filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1150,7 +1149,7 @@ def get_long_running_output(pipeline_response): ) @distributed_trace_async - async def delete_by_invoice_section( # pylint: disable=inconsistent-return-statements + async def delete_by_invoice_section( self, billing_account_name: str, billing_profile_name: str, @@ -1177,7 +1176,7 @@ async def delete_by_invoice_section( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1245,7 +1244,7 @@ async def get_by_invoice_section( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1333,7 +1332,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1407,7 +1406,7 @@ async def _create_by_invoice_section_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1628,7 +1627,7 @@ async def _resolve_by_invoice_section_initial( filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1775,7 +1774,7 @@ async def _resolve_by_billing_profile_initial( filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1910,7 +1909,7 @@ def get_long_running_output(pipeline_response): ) @distributed_trace_async - async def delete_by_billing_account( # pylint: disable=inconsistent-return-statements + async def delete_by_billing_account( self, billing_account_name: str, billing_role_assignment_name: str, **kwargs: Any ) -> None: """Deletes a role assignment on a billing account. The operation is supported for billing accounts @@ -1929,7 +1928,7 @@ async def delete_by_billing_account( # pylint: disable=inconsistent-return-stat :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1987,7 +1986,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2036,7 +2035,7 @@ async def _create_or_update_by_billing_account_initial( # pylint: disable=name- parameters: Union[_models.BillingRoleAssignment, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2277,7 +2276,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2347,7 +2346,7 @@ async def _create_by_billing_account_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2533,7 +2532,7 @@ def get_long_running_output(pipeline_response): ) @distributed_trace_async - async def delete_by_department( # pylint: disable=inconsistent-return-statements + async def delete_by_department( self, billing_account_name: str, department_name: str, billing_role_assignment_name: str, **kwargs: Any ) -> None: """Deletes a role assignment on a department. The operation is supported only for billing accounts @@ -2553,7 +2552,7 @@ async def delete_by_department( # pylint: disable=inconsistent-return-statement :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2613,7 +2612,7 @@ async def get_by_department( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2664,7 +2663,7 @@ async def _create_or_update_by_department_initial( parameters: Union[_models.BillingRoleAssignment, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2903,7 +2902,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2966,7 +2965,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def delete_by_enrollment_account( # pylint: disable=inconsistent-return-statements + async def delete_by_enrollment_account( self, billing_account_name: str, enrollment_account_name: str, billing_role_assignment_name: str, **kwargs: Any ) -> None: """Deletes a role assignment on a enrollment Account. The operation is supported only for billing @@ -2986,7 +2985,7 @@ async def delete_by_enrollment_account( # pylint: disable=inconsistent-return-s :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3046,7 +3045,7 @@ async def get_by_enrollment_account( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3097,7 +3096,7 @@ async def _create_or_update_by_enrollment_account_initial( # pylint: disable=na parameters: Union[_models.BillingRoleAssignment, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3336,7 +3335,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3405,7 +3404,7 @@ async def _resolve_by_billing_account_initial( filter: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_definition_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_definition_operations.py index fc6fb4a9ee5a..6c8cf6013f09 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_definition_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_role_definition_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_role_definition_operations import ( build_get_by_billing_account_request, build_get_by_billing_profile_request, @@ -41,11 +42,8 @@ build_list_by_enrollment_account_request, build_list_by_invoice_section_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -64,10 +62,10 @@ class BillingRoleDefinitionOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_by_billing_profile( @@ -89,7 +87,7 @@ async def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -159,7 +157,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,7 +246,7 @@ async def get_by_customer( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,7 +318,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -410,7 +408,7 @@ async def get_by_invoice_section( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -482,7 +480,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -564,7 +562,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -631,7 +629,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -712,7 +710,7 @@ async def get_by_department( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -781,7 +779,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -863,7 +861,7 @@ async def get_by_enrollment_account( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -932,7 +930,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_aliases_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_aliases_operations.py index ed10dd47cd26..ed9655bb84ee 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_aliases_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_aliases_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,16 +32,14 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_subscriptions_aliases_operations import ( build_create_or_update_request, build_get_request, build_list_by_billing_account_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,10 +58,10 @@ class BillingSubscriptionsAliasesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, billing_account_name: str, alias_name: str, **kwargs: Any) -> _models.BillingSubscriptionAlias: @@ -81,7 +79,7 @@ async def get(self, billing_account_name: str, alias_name: str, **kwargs: Any) - :rtype: ~azure.mgmt.billing.models.BillingSubscriptionAlias :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -130,7 +128,7 @@ async def _create_or_update_initial( parameters: Union[_models.BillingSubscriptionAlias, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -386,7 +384,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionAliasListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_operations.py index 96623f0becca..54ac20ad8148 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_billing_subscriptions_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._billing_subscriptions_operations import ( build_cancel_request, build_delete_request, @@ -49,11 +51,8 @@ build_update_request, build_validate_move_eligibility_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -72,10 +71,10 @@ class BillingSubscriptionsOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_by_billing_profile( @@ -105,7 +104,7 @@ async def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingSubscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -210,7 +209,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -343,7 +342,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -477,7 +476,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -555,7 +554,7 @@ async def _cancel_initial( parameters: Union[_models.CancelSubscriptionRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -755,7 +754,7 @@ async def _merge_initial( parameters: Union[_models.BillingSubscriptionMergeRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -962,7 +961,7 @@ async def _move_initial( parameters: Union[_models.MoveBillingSubscriptionRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1173,7 +1172,7 @@ async def _split_initial( parameters: Union[_models.BillingSubscriptionSplitRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1461,7 +1460,7 @@ async def validate_move_eligibility( :rtype: ~azure.mgmt.billing.models.MoveBillingSubscriptionEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1518,7 +1517,7 @@ async def validate_move_eligibility( async def _delete_initial( self, billing_account_name: str, billing_subscription_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1651,7 +1650,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.BillingSubscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1701,7 +1700,7 @@ async def _update_initial( parameters: Union[_models.BillingSubscriptionPatch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1963,7 +1962,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2094,7 +2093,7 @@ def list_by_customer_at_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2216,7 +2215,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_customers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_customers_operations.py index 46d8c811cc6a..5420c04d576e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_customers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_customers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,17 +27,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._customers_operations import ( build_get_by_billing_account_request, build_get_request, build_list_by_billing_account_request, build_list_by_billing_profile_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,10 +54,10 @@ class CustomersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -81,7 +79,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.Customer :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -179,7 +177,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CustomerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -266,7 +264,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.Customer :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -360,7 +358,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CustomerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_departments_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_departments_operations.py index 77714e1cd63e..b45696dfbfb3 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_departments_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_departments_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,12 +27,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._departments_operations import build_get_request, build_list_by_billing_account_request +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,10 +49,10 @@ class DepartmentsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get(self, billing_account_name: str, department_name: str, **kwargs: Any) -> _models.Department: @@ -72,7 +70,7 @@ async def get(self, billing_account_name: str, department_name: str, **kwargs: A :rtype: ~azure.mgmt.billing.models.Department :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -159,7 +157,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.DepartmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_enrollment_accounts_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_enrollment_accounts_operations.py index f170e44f3f16..122baf7fa49b 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_enrollment_accounts_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_enrollment_accounts_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,17 +27,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._enrollment_accounts_operations import ( build_get_by_department_request, build_get_request, build_list_by_billing_account_request, build_list_by_department_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,10 +54,10 @@ class EnrollmentAccountsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_by_department( @@ -81,7 +79,7 @@ async def get_by_department( :rtype: ~azure.mgmt.billing.models.EnrollmentAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -176,7 +174,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EnrollmentAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -262,7 +260,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.EnrollmentAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -353,7 +351,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EnrollmentAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoice_sections_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoice_sections_operations.py index 39fd6367fb0c..00da101e2bef 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoice_sections_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoice_sections_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._invoice_sections_operations import ( build_create_or_update_request, build_delete_request, @@ -39,11 +40,8 @@ build_list_by_billing_profile_request, build_validate_delete_eligibility_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,10 +60,10 @@ class InvoiceSectionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def validate_delete_eligibility( @@ -87,7 +85,7 @@ async def validate_delete_eligibility( :rtype: ~azure.mgmt.billing.models.DeleteInvoiceSectionEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -133,7 +131,7 @@ async def validate_delete_eligibility( async def _delete_initial( self, billing_account_name: str, billing_profile_name: str, invoice_section_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -269,7 +267,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.InvoiceSection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -320,7 +318,7 @@ async def _create_or_update_initial( parameters: Union[_models.InvoiceSection, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,7 +585,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceSectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoices_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoices_operations.py index 5d3584b57181..82de376e2d97 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoices_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_invoices_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,26 +6,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime from io import IOBase -import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -47,6 +34,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._invoices_operations import ( build_amend_request, build_download_by_billing_account_request, @@ -61,11 +49,8 @@ build_list_by_billing_profile_request, build_list_by_billing_subscription_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,10 +69,10 @@ class InvoicesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_profile( @@ -150,7 +135,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -226,7 +211,7 @@ async def _download_documents_by_billing_account_initial( # pylint: disable=nam parameters: Union[List[_models.DocumentDownloadRequest], IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -415,7 +400,7 @@ def get_long_running_output(pipeline_response): ) async def _amend_initial(self, billing_account_name: str, invoice_name: str, **kwargs: Any) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -527,7 +512,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- async def _download_by_billing_account_initial( self, billing_account_name: str, invoice_name: str, document_name: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -653,7 +638,7 @@ def get_long_running_output(pipeline_response): async def _download_summary_by_billing_account_initial( # pylint: disable=name-too-long self, billing_account_name: str, invoice_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -788,7 +773,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.Invoice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -887,7 +872,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -959,7 +944,7 @@ async def get_next(next_link=None): async def _download_documents_by_billing_subscription_initial( # pylint: disable=name-too-long self, parameters: Union[List[_models.DocumentDownloadRequest], IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1139,7 +1124,7 @@ def get_long_running_output(pipeline_response): async def _download_by_billing_subscription_initial( # pylint: disable=name-too-long self, invoice_name: str, document_name: Optional[str] = None, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1273,7 +1258,7 @@ async def get_by_billing_subscription(self, invoice_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.billing.models.Invoice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1369,7 +1354,7 @@ def list_by_billing_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1452,7 +1437,7 @@ async def get(self, invoice_name: str, **kwargs: Any) -> _models.Invoice: :rtype: ~azure.mgmt.billing.models.Invoice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_operations.py index eede0b42bab1..49f339acc9e9 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,10 +48,10 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: @@ -72,7 +70,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_partner_transfers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_partner_transfers_operations.py index f39a3b2849e9..b967fac13307 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_partner_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_partner_transfers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,17 +28,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._partner_transfers_operations import ( build_cancel_request, build_get_request, build_initiate_request, build_list_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,10 +55,10 @@ class PartnerTransfersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -86,7 +84,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.PartnerTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -229,7 +227,7 @@ async def initiate( :rtype: ~azure.mgmt.billing.models.PartnerTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +307,7 @@ async def cancel( :rtype: ~azure.mgmt.billing.models.PartnerTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -378,7 +376,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PartnerTransferDetailsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_payment_methods_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_payment_methods_operations.py index a676e1cb8343..bba215c2f940 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_payment_methods_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_payment_methods_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,6 +27,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._payment_methods_operations import ( build_delete_by_user_request, build_get_by_billing_account_request, @@ -36,11 +37,8 @@ build_list_by_billing_profile_request, build_list_by_user_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,10 +57,10 @@ class PaymentMethodsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_profile( @@ -88,7 +86,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PaymentMethodLinksListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -170,7 +168,7 @@ async def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.PaymentMethodLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -237,7 +235,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PaymentMethodsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -316,7 +314,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.PaymentMethod :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -375,7 +373,7 @@ def list_by_user(self, **kwargs: Any) -> AsyncIterable["_models.PaymentMethod"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PaymentMethodsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -436,9 +434,7 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace_async - async def delete_by_user( # pylint: disable=inconsistent-return-statements - self, payment_method_name: str, **kwargs: Any - ) -> None: + async def delete_by_user(self, payment_method_name: str, **kwargs: Any) -> None: """Deletes a payment method owned by the caller. .. seealso:: @@ -450,7 +446,7 @@ async def delete_by_user( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -500,7 +496,7 @@ async def get_by_user(self, payment_method_name: str, **kwargs: Any) -> _models. :rtype: ~azure.mgmt.billing.models.PaymentMethod :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_policies_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_policies_operations.py index 2279cbddd5f2..c58d62638c33 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_policies_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_policies_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -29,6 +30,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._policies_operations import ( build_create_or_update_by_billing_account_request, build_create_or_update_by_billing_profile_request, @@ -40,11 +42,8 @@ build_get_by_customer_request, build_get_by_subscription_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,10 +62,10 @@ class PoliciesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_by_customer( @@ -96,7 +95,7 @@ async def get_by_customer( :rtype: ~azure.mgmt.billing.models.CustomerPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -148,7 +147,7 @@ async def _create_or_update_by_customer_initial( parameters: Union[_models.CustomerPolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +375,7 @@ async def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingProfilePolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -425,7 +424,7 @@ async def _create_or_update_by_billing_profile_initial( # pylint: disable=name- parameters: Union[_models.BillingProfilePolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -642,7 +641,7 @@ async def get_by_customer_at_billing_account( :rtype: ~azure.mgmt.billing.models.CustomerPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -691,7 +690,7 @@ async def _create_or_update_by_customer_at_billing_account_initial( # pylint: d parameters: Union[_models.CustomerPolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -903,7 +902,7 @@ async def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) :rtype: ~azure.mgmt.billing.models.BillingAccountPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -947,7 +946,7 @@ async def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) async def _create_or_update_by_billing_account_initial( # pylint: disable=name-too-long self, billing_account_name: str, parameters: Union[_models.BillingAccountPolicy, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1137,7 +1136,7 @@ async def get_by_subscription(self, **kwargs: Any) -> _models.SubscriptionPolicy :rtype: ~azure.mgmt.billing.models.SubscriptionPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_products_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_products_operations.py index 6b4eea3c32e0..ca042b449b7d 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_products_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_products_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +33,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._products_operations import ( build_get_request, build_list_by_billing_account_request, @@ -42,11 +44,8 @@ build_update_request, build_validate_move_eligibility_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -65,10 +64,10 @@ class ProductsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_invoice_section( @@ -126,7 +125,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -248,7 +247,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +368,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -444,7 +443,7 @@ async def _move_initial( parameters: Union[_models.MoveProductRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -739,7 +738,7 @@ async def validate_move_eligibility( :rtype: ~azure.mgmt.billing.models.MoveProductEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -809,7 +808,7 @@ async def get(self, billing_account_name: str, product_name: str, **kwargs: Any) :rtype: ~azure.mgmt.billing.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -935,7 +934,7 @@ async def update( :rtype: ~azure.mgmt.billing.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1039,7 +1038,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_recipient_transfers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_recipient_transfers_operations.py index fc8fe97b9689..886c34a769b6 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_recipient_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_recipient_transfers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,6 +28,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._recipient_transfers_operations import ( build_accept_request, build_decline_request, @@ -35,11 +36,8 @@ build_list_request, build_validate_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,10 +56,10 @@ class RecipientTransfersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def accept( @@ -127,7 +125,7 @@ async def accept( :rtype: ~azure.mgmt.billing.models.RecipientTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -250,7 +248,7 @@ async def validate( :rtype: ~azure.mgmt.billing.models.ValidateTransferListResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -315,7 +313,7 @@ async def decline(self, transfer_name: str, **kwargs: Any) -> _models.RecipientT :rtype: ~azure.mgmt.billing.models.RecipientTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -368,7 +366,7 @@ async def get(self, transfer_name: str, **kwargs: Any) -> _models.RecipientTrans :rtype: ~azure.mgmt.billing.models.RecipientTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -427,7 +425,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.RecipientTransferDetails api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecipientTransferDetailsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservation_orders_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservation_orders_operations.py index a7a99ccfa4c4..742773ff735f 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservation_orders_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservation_orders_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,15 +27,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._reservation_orders_operations import ( build_get_by_billing_account_request, build_list_by_billing_account_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,10 +52,10 @@ class ReservationOrdersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_by_billing_account( @@ -78,7 +76,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.ReservationOrder :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -155,7 +153,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationOrderList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservations_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservations_operations.py index 6f3b6be1217c..2624487f51ca 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservations_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_reservations_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._reservations_operations import ( build_get_by_reservation_order_request, build_list_by_billing_account_request, @@ -39,11 +40,8 @@ build_list_by_reservation_order_request, build_update_by_billing_account_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,10 +60,10 @@ class ReservationsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_account( @@ -110,7 +108,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -223,7 +221,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -317,7 +315,7 @@ async def get_by_reservation_order( :rtype: ~azure.mgmt.billing.models.Reservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -369,7 +367,7 @@ async def _update_by_billing_account_initial( body: Union[_models.Patch, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -595,7 +593,7 @@ def list_by_reservation_order( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plan_orders_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plan_orders_operations.py index e9ef1b9a5437..733f33e2f2db 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plan_orders_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plan_orders_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,15 +27,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._savings_plan_orders_operations import ( build_get_by_billing_account_request, build_list_by_billing_account_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,10 +52,10 @@ class SavingsPlanOrdersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get_by_billing_account( @@ -75,7 +73,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.SavingsPlanOrderModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -152,7 +150,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SavingsPlanOrderModelList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plans_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plans_operations.py index aa92d18c655e..07f9420e4639 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plans_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_savings_plans_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._savings_plans_operations import ( build_get_by_billing_account_request, build_list_by_billing_account_request, @@ -39,11 +40,8 @@ build_update_by_billing_account_request, build_validate_update_by_billing_account_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -62,10 +60,10 @@ class SavingsPlansOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_savings_plan_order( @@ -87,7 +85,7 @@ def list_by_savings_plan_order( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SavingsPlanModelList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -191,7 +189,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SavingsPlanModelListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -281,7 +279,7 @@ async def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.SavingsPlanModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -333,7 +331,7 @@ async def _update_by_billing_account_initial( body: Union[_models.SavingsPlanUpdateRequest, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -619,7 +617,7 @@ async def validate_update_by_billing_account( :rtype: ~azure.mgmt.billing.models.SavingsPlanValidateResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transactions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transactions_operations.py index f418bbd5347a..b4cc85966bc0 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transactions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transactions_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, Type, TypeVar, Union, cast +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -32,6 +32,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._transactions_operations import ( build_get_transaction_summary_by_invoice_request, build_list_by_billing_profile_request, @@ -40,11 +41,8 @@ build_list_by_invoice_section_request, build_transactions_download_by_invoice_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -63,10 +61,10 @@ class TransactionsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_customer( @@ -137,7 +135,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -278,7 +276,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -416,7 +414,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -539,7 +537,7 @@ def list_by_invoice( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -610,7 +608,7 @@ async def get_next(next_link=None): async def _transactions_download_by_invoice_initial( # pylint: disable=name-too-long self, billing_account_name: str, invoice_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -756,7 +754,7 @@ async def get_transaction_summary_by_invoice( :rtype: ~azure.mgmt.billing.models.TransactionSummary :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transfers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transfers_operations.py index 41cc008d2b60..5fc3eac6cda3 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/aio/operations/_transfers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -28,17 +28,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._transfers_operations import ( build_cancel_request, build_get_request, build_initiate_request, build_list_request, ) +from .._configuration import BillingManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,10 +55,10 @@ class TransfersOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( @@ -86,7 +84,7 @@ async def get( :rtype: ~azure.mgmt.billing.models.TransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -229,7 +227,7 @@ async def initiate( :rtype: ~azure.mgmt.billing.models.TransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -309,7 +307,7 @@ async def cancel( :rtype: ~azure.mgmt.billing.models.TransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -376,7 +374,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransferDetailsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py index 61f4b1b3aaf2..f71efc599ca4 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/__init__.py @@ -5,332 +5,343 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models_py3 import AcceptTransferRequest -from ._models_py3 import AddressDetails -from ._models_py3 import AddressValidationResponse -from ._models_py3 import Agreement -from ._models_py3 import AgreementListResult -from ._models_py3 import AgreementProperties -from ._models_py3 import Amount -from ._models_py3 import AppliedScopeProperties -from ._models_py3 import AssociatedTenant -from ._models_py3 import AssociatedTenantListResult -from ._models_py3 import AssociatedTenantProperties -from ._models_py3 import AvailableBalance -from ._models_py3 import AvailableBalanceProperties -from ._models_py3 import AvailableBalancePropertiesAmount -from ._models_py3 import AvailableBalancePropertiesTotalPaymentsOnAccount -from ._models_py3 import AzurePlan -from ._models_py3 import Beneficiary -from ._models_py3 import BillingAccount -from ._models_py3 import BillingAccountListResult -from ._models_py3 import BillingAccountPatch -from ._models_py3 import BillingAccountPolicy -from ._models_py3 import BillingAccountPolicyProperties -from ._models_py3 import BillingAccountPolicyPropertiesEnterpriseAgreementPolicies -from ._models_py3 import BillingAccountProperties -from ._models_py3 import BillingAccountPropertiesEnrollmentDetails -from ._models_py3 import BillingAccountPropertiesRegistrationNumber -from ._models_py3 import BillingAccountPropertiesSoldTo -from ._models_py3 import BillingPermission -from ._models_py3 import BillingPermissionListResult -from ._models_py3 import BillingPlanInformation -from ._models_py3 import BillingProfile -from ._models_py3 import BillingProfileInfo -from ._models_py3 import BillingProfileListResult -from ._models_py3 import BillingProfilePolicy -from ._models_py3 import BillingProfilePolicyProperties -from ._models_py3 import BillingProfilePolicyPropertiesEnterpriseAgreementPolicies -from ._models_py3 import BillingProfileProperties -from ._models_py3 import BillingProfilePropertiesBillTo -from ._models_py3 import BillingProfilePropertiesCurrentPaymentTerm -from ._models_py3 import BillingProfilePropertiesIndirectRelationshipInfo -from ._models_py3 import BillingProfilePropertiesShipTo -from ._models_py3 import BillingProfilePropertiesSoldTo -from ._models_py3 import BillingProperty -from ._models_py3 import BillingPropertyProperties -from ._models_py3 import BillingPropertyPropertiesEnrollmentDetails -from ._models_py3 import BillingPropertyPropertiesSubscriptionServiceUsageAddress -from ._models_py3 import BillingRequest -from ._models_py3 import BillingRequestListResult -from ._models_py3 import BillingRequestProperties -from ._models_py3 import BillingRequestPropertiesCreatedBy -from ._models_py3 import BillingRequestPropertiesLastUpdatedBy -from ._models_py3 import BillingRequestPropertiesReviewedBy -from ._models_py3 import BillingRoleAssignment -from ._models_py3 import BillingRoleAssignmentListResult -from ._models_py3 import BillingRoleAssignmentProperties -from ._models_py3 import BillingRoleDefinition -from ._models_py3 import BillingRoleDefinitionListResult -from ._models_py3 import BillingRoleDefinitionProperties -from ._models_py3 import BillingSubscription -from ._models_py3 import BillingSubscriptionAlias -from ._models_py3 import BillingSubscriptionAliasListResult -from ._models_py3 import BillingSubscriptionAliasProperties -from ._models_py3 import BillingSubscriptionListResult -from ._models_py3 import BillingSubscriptionMergeRequest -from ._models_py3 import BillingSubscriptionPatch -from ._models_py3 import BillingSubscriptionProperties -from ._models_py3 import BillingSubscriptionSplitRequest -from ._models_py3 import BillingSubscriptionStatusDetails -from ._models_py3 import CancelSubscriptionRequest -from ._models_py3 import CheckAccessRequest -from ._models_py3 import CheckAccessResponse -from ._models_py3 import Commitment -from ._models_py3 import Customer -from ._models_py3 import CustomerListResult -from ._models_py3 import CustomerPolicy -from ._models_py3 import CustomerPolicyProperties -from ._models_py3 import CustomerProperties -from ._models_py3 import DeleteBillingProfileEligibilityDetail -from ._models_py3 import DeleteBillingProfileEligibilityResult -from ._models_py3 import DeleteInvoiceSectionEligibilityDetail -from ._models_py3 import DeleteInvoiceSectionEligibilityResult -from ._models_py3 import Department -from ._models_py3 import DepartmentListResult -from ._models_py3 import DepartmentProperties -from ._models_py3 import DetailedTransferStatus -from ._models_py3 import DocumentDownloadRequest -from ._models_py3 import DocumentDownloadResult -from ._models_py3 import EnrollmentAccount -from ._models_py3 import EnrollmentAccountListResult -from ._models_py3 import EnrollmentAccountProperties -from ._models_py3 import EnrollmentDetails -from ._models_py3 import EnrollmentDetailsIndirectRelationshipInfo -from ._models_py3 import EnterpriseAgreementPolicies -from ._models_py3 import ErrorAdditionalInfo -from ._models_py3 import ErrorDetail -from ._models_py3 import ErrorResponse -from ._models_py3 import ExtendedStatusDefinitionProperties -from ._models_py3 import ExtendedStatusInfo -from ._models_py3 import ExternalReference -from ._models_py3 import FailedPayment -from ._models_py3 import IndirectRelationshipInfo -from ._models_py3 import InitiateTransferRequest -from ._models_py3 import Invoice -from ._models_py3 import InvoiceDocument -from ._models_py3 import InvoiceListResult -from ._models_py3 import InvoiceProperties -from ._models_py3 import InvoicePropertiesAmountDue -from ._models_py3 import InvoicePropertiesAzurePrepaymentApplied -from ._models_py3 import InvoicePropertiesBilledAmount -from ._models_py3 import InvoicePropertiesCreditAmount -from ._models_py3 import InvoicePropertiesFreeAzureCreditApplied -from ._models_py3 import InvoicePropertiesRebillDetails -from ._models_py3 import InvoicePropertiesRefundDetails -from ._models_py3 import InvoicePropertiesSubTotal -from ._models_py3 import InvoicePropertiesTaxAmount -from ._models_py3 import InvoicePropertiesTotalAmount -from ._models_py3 import InvoiceSection -from ._models_py3 import InvoiceSectionListResult -from ._models_py3 import InvoiceSectionProperties -from ._models_py3 import InvoiceSectionWithCreateSubPermission -from ._models_py3 import InvoiceSectionWithCreateSubPermissionListResult -from ._models_py3 import MoveBillingSubscriptionEligibilityResult -from ._models_py3 import MoveBillingSubscriptionErrorDetails -from ._models_py3 import MoveBillingSubscriptionRequest -from ._models_py3 import MoveProductEligibilityResult -from ._models_py3 import MoveProductEligibilityResultErrorDetails -from ._models_py3 import MoveProductErrorDetails -from ._models_py3 import MoveProductRequest -from ._models_py3 import NextBillingCycleDetails -from ._models_py3 import Operation -from ._models_py3 import OperationDisplay -from ._models_py3 import OperationListResult -from ._models_py3 import Participant -from ._models_py3 import PartnerInitiateTransferRequest -from ._models_py3 import PartnerTransferDetails -from ._models_py3 import PartnerTransferDetailsListResult -from ._models_py3 import Patch -from ._models_py3 import Payment -from ._models_py3 import PaymentAmount -from ._models_py3 import PaymentDetail -from ._models_py3 import PaymentMethod -from ._models_py3 import PaymentMethodLink -from ._models_py3 import PaymentMethodLinksListResult -from ._models_py3 import PaymentMethodLogo -from ._models_py3 import PaymentMethodProperties -from ._models_py3 import PaymentMethodsListResult -from ._models_py3 import PaymentOnAccount -from ._models_py3 import PaymentOnAccountAmount -from ._models_py3 import PaymentTerm -from ._models_py3 import PaymentTermsEligibilityDetail -from ._models_py3 import PaymentTermsEligibilityResult -from ._models_py3 import PolicySummary -from ._models_py3 import Price -from ._models_py3 import Principal -from ._models_py3 import Product -from ._models_py3 import ProductDetails -from ._models_py3 import ProductListResult -from ._models_py3 import ProductPatch -from ._models_py3 import ProductProperties -from ._models_py3 import ProductPropertiesLastCharge -from ._models_py3 import ProductPropertiesReseller -from ._models_py3 import ProxyResource -from ._models_py3 import ProxyResourceWithTags -from ._models_py3 import PurchaseRequest -from ._models_py3 import RebillDetails -from ._models_py3 import RecipientTransferDetails -from ._models_py3 import RecipientTransferDetailsListResult -from ._models_py3 import RefundDetailsSummary -from ._models_py3 import RefundDetailsSummaryAmountRefunded -from ._models_py3 import RefundDetailsSummaryAmountRequested -from ._models_py3 import RefundTransactionDetails -from ._models_py3 import RefundTransactionDetailsAmountRefunded -from ._models_py3 import RefundTransactionDetailsAmountRequested -from ._models_py3 import RegistrationNumber -from ._models_py3 import RenewProperties -from ._models_py3 import RenewPropertiesResponse -from ._models_py3 import RenewalTermDetails -from ._models_py3 import Reseller -from ._models_py3 import Reservation -from ._models_py3 import ReservationAppliedScopeProperties -from ._models_py3 import ReservationExtendedStatusInfo -from ._models_py3 import ReservationList -from ._models_py3 import ReservationMergeProperties -from ._models_py3 import ReservationOrder -from ._models_py3 import ReservationOrderBillingPlanInformation -from ._models_py3 import ReservationOrderList -from ._models_py3 import ReservationPaymentDetail -from ._models_py3 import ReservationPurchaseRequest -from ._models_py3 import ReservationSkuProperty -from ._models_py3 import ReservationSplitProperties -from ._models_py3 import ReservationSummary -from ._models_py3 import ReservationSwapProperties -from ._models_py3 import ReservationUtilizationAggregates -from ._models_py3 import ReservationsListResult -from ._models_py3 import Resource -from ._models_py3 import SavingsPlanModel -from ._models_py3 import SavingsPlanModelList -from ._models_py3 import SavingsPlanModelListResult -from ._models_py3 import SavingsPlanOrderModel -from ._models_py3 import SavingsPlanOrderModelList -from ._models_py3 import SavingsPlanSummaryCount -from ._models_py3 import SavingsPlanUpdateRequest -from ._models_py3 import SavingsPlanUpdateRequestProperties -from ._models_py3 import SavingsPlanUpdateValidateRequest -from ._models_py3 import SavingsPlanValidResponseProperty -from ._models_py3 import SavingsPlanValidateResponse -from ._models_py3 import Sku -from ._models_py3 import SkuName -from ._models_py3 import SpendingLimitDetails -from ._models_py3 import SubscriptionEnrollmentDetails -from ._models_py3 import SubscriptionPolicy -from ._models_py3 import SubscriptionPolicyProperties -from ._models_py3 import SystemData -from ._models_py3 import SystemOverrides -from ._models_py3 import TaxIdentifier -from ._models_py3 import Transaction -from ._models_py3 import TransactionListResult -from ._models_py3 import TransactionProperties -from ._models_py3 import TransactionPropertiesAzureCreditApplied -from ._models_py3 import TransactionPropertiesConsumptionCommitmentDecremented -from ._models_py3 import TransactionPropertiesEffectivePrice -from ._models_py3 import TransactionPropertiesMarketPrice -from ._models_py3 import TransactionPropertiesRefundTransactionDetails -from ._models_py3 import TransactionPropertiesSubTotal -from ._models_py3 import TransactionPropertiesTax -from ._models_py3 import TransactionPropertiesTransactionAmount -from ._models_py3 import TransactionSummary -from ._models_py3 import TransferDetails -from ._models_py3 import TransferDetailsListResult -from ._models_py3 import TransferError -from ._models_py3 import TransferItemQueryParameter -from ._models_py3 import TransitionDetails -from ._models_py3 import Utilization -from ._models_py3 import UtilizationAggregates -from ._models_py3 import ValidateTransferListResponse -from ._models_py3 import ValidateTransferResponse -from ._models_py3 import ValidationResultProperties +from typing import TYPE_CHECKING -from ._billing_management_client_enums import AcceptanceMode -from ._billing_management_client_enums import AccessDecision -from ._billing_management_client_enums import AccountStatus -from ._billing_management_client_enums import AccountSubType -from ._billing_management_client_enums import AccountType -from ._billing_management_client_enums import AddressValidationStatus -from ._billing_management_client_enums import AgreementType -from ._billing_management_client_enums import AppliedScopeType -from ._billing_management_client_enums import AutoRenew -from ._billing_management_client_enums import BillingAccountStatusReasonCode -from ._billing_management_client_enums import BillingManagementTenantState -from ._billing_management_client_enums import BillingPlan -from ._billing_management_client_enums import BillingProfileStatus -from ._billing_management_client_enums import BillingProfileStatusReasonCode -from ._billing_management_client_enums import BillingRelationshipType -from ._billing_management_client_enums import BillingRequestStatus -from ._billing_management_client_enums import BillingRequestType -from ._billing_management_client_enums import BillingSubscriptionOperationStatus -from ._billing_management_client_enums import BillingSubscriptionStatus -from ._billing_management_client_enums import Cancellation -from ._billing_management_client_enums import CancellationReason -from ._billing_management_client_enums import Category -from ._billing_management_client_enums import CommitmentGrain -from ._billing_management_client_enums import CreatedByType -from ._billing_management_client_enums import CreditType -from ._billing_management_client_enums import CustomerStatus -from ._billing_management_client_enums import DeleteBillingProfileEligibilityCode -from ._billing_management_client_enums import DeleteBillingProfileEligibilityStatus -from ._billing_management_client_enums import DeleteInvoiceSectionEligibilityCode -from ._billing_management_client_enums import DeleteInvoiceSectionEligibilityStatus -from ._billing_management_client_enums import DocumentSource -from ._billing_management_client_enums import EligibleProductType -from ._billing_management_client_enums import EnrollmentAccountOwnerViewCharges -from ._billing_management_client_enums import EnrollmentAuthLevelState -from ._billing_management_client_enums import EnrollmentDepartmentAdminViewCharges -from ._billing_management_client_enums import ExtendedTermOption -from ._billing_management_client_enums import FailedPaymentReason -from ._billing_management_client_enums import InitiatorCustomerType -from ._billing_management_client_enums import InstanceFlexibility -from ._billing_management_client_enums import InvoiceDocumentType -from ._billing_management_client_enums import InvoiceSectionLabelManagementPolicy -from ._billing_management_client_enums import InvoiceSectionState -from ._billing_management_client_enums import InvoiceSectionStateReasonCode -from ._billing_management_client_enums import InvoiceStatus -from ._billing_management_client_enums import InvoiceType -from ._billing_management_client_enums import MarketplacePurchasesPolicy -from ._billing_management_client_enums import MarkupStatus -from ._billing_management_client_enums import MoveValidationErrorCode -from ._billing_management_client_enums import PaymentMethodFamily -from ._billing_management_client_enums import PaymentMethodStatus -from ._billing_management_client_enums import PaymentStatus -from ._billing_management_client_enums import PaymentTermsEligibilityCode -from ._billing_management_client_enums import PaymentTermsEligibilityStatus -from ._billing_management_client_enums import PolicyType -from ._billing_management_client_enums import PrincipalType -from ._billing_management_client_enums import ProductStatus -from ._billing_management_client_enums import ProductTransferStatus -from ._billing_management_client_enums import ProductType -from ._billing_management_client_enums import ProvisioningState -from ._billing_management_client_enums import ProvisioningTenantState -from ._billing_management_client_enums import RefundReasonCode -from ._billing_management_client_enums import RefundStatus -from ._billing_management_client_enums import ReservationBillingPlan -from ._billing_management_client_enums import ReservationPurchasesPolicy -from ._billing_management_client_enums import ReservationStatusCode -from ._billing_management_client_enums import SavingsPlanPurchasesPolicy -from ._billing_management_client_enums import SavingsPlanTerm -from ._billing_management_client_enums import ServiceDefinedResourceName -from ._billing_management_client_enums import SpecialTaxationType -from ._billing_management_client_enums import SpendingLimit -from ._billing_management_client_enums import SpendingLimitStatus -from ._billing_management_client_enums import SpendingLimitType -from ._billing_management_client_enums import SubscriptionBillingType -from ._billing_management_client_enums import SubscriptionEnrollmentAccountStatus -from ._billing_management_client_enums import SubscriptionStatusReason -from ._billing_management_client_enums import SubscriptionTransferValidationErrorCode -from ._billing_management_client_enums import SubscriptionWorkloadType -from ._billing_management_client_enums import SupportLevel -from ._billing_management_client_enums import SupportedAccountType -from ._billing_management_client_enums import TaxIdentifierStatus -from ._billing_management_client_enums import TaxIdentifierType -from ._billing_management_client_enums import TransactionKind -from ._billing_management_client_enums import TransactionType -from ._billing_management_client_enums import TransferStatus -from ._billing_management_client_enums import ViewChargesPolicy +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models_py3 import ( # type: ignore + AcceptTransferRequest, + AddressDetails, + AddressValidationResponse, + Agreement, + AgreementListResult, + AgreementProperties, + Amount, + AppliedScopeProperties, + AssociatedTenant, + AssociatedTenantListResult, + AssociatedTenantProperties, + AvailableBalance, + AvailableBalanceProperties, + AvailableBalancePropertiesAmount, + AvailableBalancePropertiesTotalPaymentsOnAccount, + AzurePlan, + Beneficiary, + BillingAccount, + BillingAccountListResult, + BillingAccountPatch, + BillingAccountPolicy, + BillingAccountPolicyProperties, + BillingAccountPolicyPropertiesEnterpriseAgreementPolicies, + BillingAccountProperties, + BillingAccountPropertiesEnrollmentDetails, + BillingAccountPropertiesRegistrationNumber, + BillingAccountPropertiesSoldTo, + BillingPermission, + BillingPermissionListResult, + BillingPlanInformation, + BillingProfile, + BillingProfileInfo, + BillingProfileListResult, + BillingProfilePolicy, + BillingProfilePolicyProperties, + BillingProfilePolicyPropertiesEnterpriseAgreementPolicies, + BillingProfileProperties, + BillingProfilePropertiesBillTo, + BillingProfilePropertiesCurrentPaymentTerm, + BillingProfilePropertiesIndirectRelationshipInfo, + BillingProfilePropertiesShipTo, + BillingProfilePropertiesSoldTo, + BillingProperty, + BillingPropertyProperties, + BillingPropertyPropertiesEnrollmentDetails, + BillingPropertyPropertiesSubscriptionServiceUsageAddress, + BillingRequest, + BillingRequestListResult, + BillingRequestProperties, + BillingRequestPropertiesCreatedBy, + BillingRequestPropertiesLastUpdatedBy, + BillingRequestPropertiesReviewedBy, + BillingRoleAssignment, + BillingRoleAssignmentListResult, + BillingRoleAssignmentProperties, + BillingRoleDefinition, + BillingRoleDefinitionListResult, + BillingRoleDefinitionProperties, + BillingSubscription, + BillingSubscriptionAlias, + BillingSubscriptionAliasListResult, + BillingSubscriptionAliasProperties, + BillingSubscriptionListResult, + BillingSubscriptionMergeRequest, + BillingSubscriptionPatch, + BillingSubscriptionProperties, + BillingSubscriptionSplitRequest, + BillingSubscriptionStatusDetails, + CancelSubscriptionRequest, + CheckAccessRequest, + CheckAccessResponse, + Commitment, + Customer, + CustomerListResult, + CustomerPolicy, + CustomerPolicyProperties, + CustomerProperties, + DeleteBillingProfileEligibilityDetail, + DeleteBillingProfileEligibilityResult, + DeleteInvoiceSectionEligibilityDetail, + DeleteInvoiceSectionEligibilityResult, + Department, + DepartmentListResult, + DepartmentProperties, + DetailedTransferStatus, + DocumentDownloadRequest, + DocumentDownloadResult, + EnrollmentAccount, + EnrollmentAccountListResult, + EnrollmentAccountProperties, + EnrollmentDetails, + EnrollmentDetailsIndirectRelationshipInfo, + EnterpriseAgreementPolicies, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + ExtendedStatusDefinitionProperties, + ExtendedStatusInfo, + ExternalReference, + FailedPayment, + IndirectRelationshipInfo, + InitiateTransferRequest, + Invoice, + InvoiceDocument, + InvoiceListResult, + InvoiceProperties, + InvoicePropertiesAmountDue, + InvoicePropertiesAzurePrepaymentApplied, + InvoicePropertiesBilledAmount, + InvoicePropertiesCreditAmount, + InvoicePropertiesFreeAzureCreditApplied, + InvoicePropertiesRebillDetails, + InvoicePropertiesRefundDetails, + InvoicePropertiesSubTotal, + InvoicePropertiesTaxAmount, + InvoicePropertiesTotalAmount, + InvoiceSection, + InvoiceSectionListResult, + InvoiceSectionProperties, + InvoiceSectionWithCreateSubPermission, + InvoiceSectionWithCreateSubPermissionListResult, + MoveBillingSubscriptionEligibilityResult, + MoveBillingSubscriptionErrorDetails, + MoveBillingSubscriptionRequest, + MoveProductEligibilityResult, + MoveProductEligibilityResultErrorDetails, + MoveProductErrorDetails, + MoveProductRequest, + NextBillingCycleDetails, + Operation, + OperationDisplay, + OperationListResult, + Participant, + PartnerInitiateTransferRequest, + PartnerTransferDetails, + PartnerTransferDetailsListResult, + Patch, + Payment, + PaymentAmount, + PaymentDetail, + PaymentMethod, + PaymentMethodLink, + PaymentMethodLinksListResult, + PaymentMethodLogo, + PaymentMethodProperties, + PaymentMethodsListResult, + PaymentOnAccount, + PaymentOnAccountAmount, + PaymentTerm, + PaymentTermsEligibilityDetail, + PaymentTermsEligibilityResult, + PolicySummary, + Price, + Principal, + Product, + ProductDetails, + ProductListResult, + ProductPatch, + ProductProperties, + ProductPropertiesLastCharge, + ProductPropertiesReseller, + ProxyResource, + ProxyResourceWithTags, + PurchaseRequest, + RebillDetails, + RecipientTransferDetails, + RecipientTransferDetailsListResult, + RefundDetailsSummary, + RefundDetailsSummaryAmountRefunded, + RefundDetailsSummaryAmountRequested, + RefundTransactionDetails, + RefundTransactionDetailsAmountRefunded, + RefundTransactionDetailsAmountRequested, + RegistrationNumber, + RenewProperties, + RenewPropertiesResponse, + RenewalTermDetails, + Reseller, + Reservation, + ReservationAppliedScopeProperties, + ReservationExtendedStatusInfo, + ReservationList, + ReservationMergeProperties, + ReservationOrder, + ReservationOrderBillingPlanInformation, + ReservationOrderList, + ReservationPaymentDetail, + ReservationPurchaseRequest, + ReservationSkuProperty, + ReservationSplitProperties, + ReservationSummary, + ReservationSwapProperties, + ReservationUtilizationAggregates, + ReservationsListResult, + Resource, + SavingsPlanModel, + SavingsPlanModelList, + SavingsPlanModelListResult, + SavingsPlanOrderModel, + SavingsPlanOrderModelList, + SavingsPlanSummaryCount, + SavingsPlanUpdateRequest, + SavingsPlanUpdateRequestProperties, + SavingsPlanUpdateValidateRequest, + SavingsPlanValidResponseProperty, + SavingsPlanValidateResponse, + Sku, + SkuName, + SpendingLimitDetails, + SubscriptionEnrollmentDetails, + SubscriptionPolicy, + SubscriptionPolicyProperties, + SystemData, + SystemOverrides, + TaxIdentifier, + Transaction, + TransactionListResult, + TransactionProperties, + TransactionPropertiesAzureCreditApplied, + TransactionPropertiesConsumptionCommitmentDecremented, + TransactionPropertiesEffectivePrice, + TransactionPropertiesMarketPrice, + TransactionPropertiesRefundTransactionDetails, + TransactionPropertiesSubTotal, + TransactionPropertiesTax, + TransactionPropertiesTransactionAmount, + TransactionSummary, + TransferDetails, + TransferDetailsListResult, + TransferError, + TransferItemQueryParameter, + TransitionDetails, + Utilization, + UtilizationAggregates, + ValidateTransferListResponse, + ValidateTransferResponse, + ValidationResultProperties, +) + +from ._billing_management_client_enums import ( # type: ignore + AcceptanceMode, + AccessDecision, + AccountStatus, + AccountSubType, + AccountType, + AddressValidationStatus, + AgreementType, + AppliedScopeType, + AutoRenew, + BillingAccountStatusReasonCode, + BillingManagementTenantState, + BillingPlan, + BillingProfileStatus, + BillingProfileStatusReasonCode, + BillingRelationshipType, + BillingRequestStatus, + BillingRequestType, + BillingSubscriptionOperationStatus, + BillingSubscriptionStatus, + Cancellation, + CancellationReason, + Category, + CommitmentGrain, + CreatedByType, + CreditType, + CustomerStatus, + DeleteBillingProfileEligibilityCode, + DeleteBillingProfileEligibilityStatus, + DeleteInvoiceSectionEligibilityCode, + DeleteInvoiceSectionEligibilityStatus, + DocumentSource, + EligibleProductType, + EnrollmentAccountOwnerViewCharges, + EnrollmentAuthLevelState, + EnrollmentDepartmentAdminViewCharges, + ExtendedTermOption, + FailedPaymentReason, + InitiatorCustomerType, + InstanceFlexibility, + InvoiceDocumentType, + InvoiceSectionLabelManagementPolicy, + InvoiceSectionState, + InvoiceSectionStateReasonCode, + InvoiceStatus, + InvoiceType, + MarketplacePurchasesPolicy, + MarkupStatus, + MoveValidationErrorCode, + PaymentMethodFamily, + PaymentMethodStatus, + PaymentStatus, + PaymentTermsEligibilityCode, + PaymentTermsEligibilityStatus, + PolicyType, + PrincipalType, + ProductStatus, + ProductTransferStatus, + ProductType, + ProvisioningState, + ProvisioningTenantState, + RefundReasonCode, + RefundStatus, + ReservationBillingPlan, + ReservationPurchasesPolicy, + ReservationStatusCode, + SavingsPlanPurchasesPolicy, + SavingsPlanTerm, + ServiceDefinedResourceName, + SpecialTaxationType, + SpendingLimit, + SpendingLimitStatus, + SpendingLimitType, + SubscriptionBillingType, + SubscriptionEnrollmentAccountStatus, + SubscriptionStatusReason, + SubscriptionTransferValidationErrorCode, + SubscriptionWorkloadType, + SupportLevel, + SupportedAccountType, + TaxIdentifierStatus, + TaxIdentifierType, + TransactionKind, + TransactionType, + TransferStatus, + ViewChargesPolicy, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -657,5 +668,5 @@ "TransferStatus", "ViewChargesPolicy", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py index ffb355b67e5a..c4ae8388d31c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/models/_models_py3.py @@ -1,5 +1,5 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. @@ -10,10 +10,9 @@ import datetime from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union -from .. import _serialization +from .._utils import serialization as _serialization if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -37,7 +36,7 @@ def __init__(self, *, product_details: Optional[List["_models.ProductDetails"]] self.product_details = product_details -class AddressDetails(_serialization.Model): # pylint: disable=too-many-instance-attributes +class AddressDetails(_serialization.Model): """Address details. All required parameters must be populated in order to send to server. @@ -196,9 +195,9 @@ class AddressValidationResponse(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.status = None - self.suggested_addresses = None - self.validation_message = None + self.status: Optional[Union[str, "_models.AddressValidationStatus"]] = None + self.suggested_addresses: Optional[List["_models.AddressDetails"]] = None + self.validation_message: Optional[str] = None class Resource(_serialization.Model): @@ -207,7 +206,7 @@ class Resource(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -236,10 +235,10 @@ class Resource(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.system_data = None + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.system_data: Optional["_models.SystemData"] = None class ProxyResource(Resource): @@ -249,7 +248,7 @@ class ProxyResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -268,7 +267,7 @@ class ProxyResourceWithTags(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -316,7 +315,7 @@ class Agreement(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -393,8 +392,8 @@ class AgreementListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.Agreement"]] = None class AgreementProperties(_serialization.Model): @@ -458,16 +457,16 @@ class AgreementProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.acceptance_mode = None - self.agreement_link = None - self.billing_profile_info = None - self.category = None - self.display_name = None - self.effective_date = None - self.expiration_date = None - self.participants = None - self.status = None - self.lead_billing_account_name = None + self.acceptance_mode: Optional[Union[str, "_models.AcceptanceMode"]] = None + self.agreement_link: Optional[str] = None + self.billing_profile_info: Optional[List["_models.BillingProfileInfo"]] = None + self.category: Optional[Union[str, "_models.Category"]] = None + self.display_name: Optional[str] = None + self.effective_date: Optional[datetime.datetime] = None + self.expiration_date: Optional[datetime.datetime] = None + self.participants: Optional[List["_models.Participant"]] = None + self.status: Optional[str] = None + self.lead_billing_account_name: Optional[str] = None class Amount(_serialization.Model): @@ -495,8 +494,8 @@ class Amount(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.currency = None - self.value = None + self.currency: Optional[str] = None + self.value: Optional[float] = None class AppliedScopeProperties(_serialization.Model): @@ -564,7 +563,7 @@ class AssociatedTenant(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -641,8 +640,8 @@ class AssociatedTenantListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.AssociatedTenant"]] = None class AssociatedTenantProperties(_serialization.Model): @@ -717,12 +716,12 @@ def __init__( ~azure.mgmt.billing.models.ProvisioningTenantState """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.display_name = display_name self.tenant_id = tenant_id self.billing_management_state = billing_management_state self.provisioning_management_state = provisioning_management_state - self.provisioning_billing_request_id = None + self.provisioning_billing_request_id: Optional[str] = None class AvailableBalance(ProxyResourceWithTags): @@ -732,7 +731,7 @@ class AvailableBalance(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -831,7 +830,7 @@ def __init__( """ super().__init__(**kwargs) self.amount = amount - self.payments_on_account = None + self.payments_on_account: Optional[List["_models.PaymentOnAccount"]] = None self.total_payments_on_account = total_payments_on_account @@ -932,7 +931,7 @@ class BillingAccount(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1009,8 +1008,8 @@ class BillingAccountListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.BillingAccount"]] = None class BillingAccountPatch(ProxyResourceWithTags): @@ -1019,7 +1018,7 @@ class BillingAccountPatch(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1078,7 +1077,7 @@ class BillingAccountPolicy(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1203,7 +1202,7 @@ def __init__( :paramtype policies: list[~azure.mgmt.billing.models.PolicySummary] """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.enterprise_agreement_policies = enterprise_agreement_policies self.marketplace_purchases = marketplace_purchases self.reservation_purchases = reservation_purchases @@ -1282,7 +1281,7 @@ class BillingAccountPolicyPropertiesEnterpriseAgreementPolicies( """ -class BillingAccountProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BillingAccountProperties(_serialization.Model): """A billing account. Variables are only populated by the server, and will be ignored when sending a request. @@ -1419,12 +1418,12 @@ def __init__( :paramtype tax_ids: list[~azure.mgmt.billing.models.TaxIdentifier] """ super().__init__(**kwargs) - self.provisioning_state = None - self.account_status = None - self.account_type = None - self.account_sub_type = None - self.account_status_reason_code = None - self.agreement_type = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.account_status: Optional[Union[str, "_models.AccountStatus"]] = None + self.account_type: Optional[Union[str, "_models.AccountType"]] = None + self.account_sub_type: Optional[Union[str, "_models.AccountSubType"]] = None + self.account_status_reason_code: Optional[Union[str, "_models.BillingAccountStatusReasonCode"]] = None + self.agreement_type: Optional[Union[str, "_models.AgreementType"]] = None self.display_name = display_name self.enrollment_details = enrollment_details self.has_read_access = has_read_access @@ -1433,12 +1432,12 @@ def __init__( self.primary_billing_tenant_id = primary_billing_tenant_id self.sold_to = sold_to self.registration_number = registration_number - self.billing_relationship_types = None - self.qualifications = None + self.billing_relationship_types: Optional[List[Union[str, "_models.BillingRelationshipType"]]] = None + self.qualifications: Optional[List[str]] = None self.tax_ids = tax_ids -class EnrollmentDetails(_serialization.Model): # pylint: disable=too-many-instance-attributes +class EnrollmentDetails(_serialization.Model): """The properties of an enrollment. Variables are only populated by the server, and will be ignored when sending a request. @@ -1539,24 +1538,22 @@ def __init__( super().__init__(**kwargs) self.start_date = start_date self.end_date = end_date - self.currency = None - self.channel = None - self.language = None - self.country_code = None - self.billing_cycle = None - self.extended_term_option = None - self.support_level = None - self.support_coverage = None - self.cloud = None + self.currency: Optional[str] = None + self.channel: Optional[str] = None + self.language: Optional[str] = None + self.country_code: Optional[str] = None + self.billing_cycle: Optional[str] = None + self.extended_term_option: Optional[Union[str, "_models.ExtendedTermOption"]] = None + self.support_level: Optional[Union[str, "_models.SupportLevel"]] = None + self.support_coverage: Optional[str] = None + self.cloud: Optional[str] = None self.po_number = po_number - self.markup_status = None + self.markup_status: Optional[Union[str, "_models.MarkupStatus"]] = None self.indirect_relationship_info = indirect_relationship_info - self.invoice_recipient = None + self.invoice_recipient: Optional[str] = None -class BillingAccountPropertiesEnrollmentDetails( - EnrollmentDetails -): # pylint: disable=too-many-instance-attributes,name-too-long +class BillingAccountPropertiesEnrollmentDetails(EnrollmentDetails): # pylint: disable=name-too-long """The properties of an enrollment. Variables are only populated by the server, and will be ignored when sending a request. @@ -1632,8 +1629,8 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin """ super().__init__(**kwargs) self.id = id - self.required = None - self.type = None + self.required: Optional[bool] = None + self.type: Optional[List[str]] = None class BillingAccountPropertiesRegistrationNumber(RegistrationNumber): # pylint: disable=name-too-long @@ -1651,7 +1648,7 @@ class BillingAccountPropertiesRegistrationNumber(RegistrationNumber): # pylint: """ -class BillingAccountPropertiesSoldTo(AddressDetails): # pylint: disable=too-many-instance-attributes +class BillingAccountPropertiesSoldTo(AddressDetails): """The address of the individual or organization that is responsible for the billing account. All required parameters must be populated in order to send to server. @@ -1713,8 +1710,8 @@ class BillingPermission(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.actions = None - self.not_actions = None + self.actions: Optional[List[str]] = None + self.not_actions: Optional[List[str]] = None class BillingPermissionListResult(_serialization.Model): @@ -1741,8 +1738,8 @@ class BillingPermissionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.BillingPermission"]] = None class BillingPlanInformation(_serialization.Model): @@ -1799,7 +1796,7 @@ class BillingProfile(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1934,8 +1931,8 @@ class BillingProfileListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.BillingProfile"]] = None class BillingProfilePolicy(ProxyResourceWithTags): @@ -1944,7 +1941,7 @@ class BillingProfilePolicy(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -2090,7 +2087,7 @@ def __init__( :paramtype policies: list[~azure.mgmt.billing.models.PolicySummary] """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.enterprise_agreement_policies = enterprise_agreement_policies self.invoice_section_label_management = invoice_section_label_management self.marketplace_purchases = marketplace_purchases @@ -2120,7 +2117,7 @@ class BillingProfilePolicyPropertiesEnterpriseAgreementPolicies( """ -class BillingProfileProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BillingProfileProperties(_serialization.Model): """A billing profile. Variables are only populated by the server, and will be ignored when sending a request. @@ -2289,32 +2286,32 @@ def __init__( ~azure.mgmt.billing.models.BillingProfilePropertiesCurrentPaymentTerm """ super().__init__(**kwargs) - self.provisioning_state = None - self.billing_relationship_type = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.billing_relationship_type: Optional[Union[str, "_models.BillingRelationshipType"]] = None self.bill_to = bill_to - self.currency = None + self.currency: Optional[str] = None self.display_name = display_name self.enabled_azure_plans = enabled_azure_plans - self.has_read_access = None + self.has_read_access: Optional[bool] = None self.indirect_relationship_info = indirect_relationship_info - self.invoice_day = None + self.invoice_day: Optional[int] = None self.invoice_email_opt_in = invoice_email_opt_in self.invoice_recipients = invoice_recipients self.po_number = po_number self.ship_to = ship_to self.sold_to = sold_to - self.spending_limit = None - self.spending_limit_details = None - self.status = None - self.status_reason_code = None - self.system_id = None + self.spending_limit: Optional[Union[str, "_models.SpendingLimit"]] = None + self.spending_limit_details: Optional[List["_models.SpendingLimitDetails"]] = None + self.status: Optional[Union[str, "_models.BillingProfileStatus"]] = None + self.status_reason_code: Optional[Union[str, "_models.BillingProfileStatusReasonCode"]] = None + self.system_id: Optional[str] = None self.tags = tags - self.target_clouds = None + self.target_clouds: Optional[List[str]] = None self.current_payment_term = current_payment_term - self.other_payment_terms = None + self.other_payment_terms: Optional[List["_models.PaymentTerm"]] = None -class BillingProfilePropertiesBillTo(AddressDetails): # pylint: disable=too-many-instance-attributes +class BillingProfilePropertiesBillTo(AddressDetails): """Billing address. All required parameters must be populated in order to send to server. @@ -2400,7 +2397,7 @@ def __init__( self.term = term self.start_date = start_date self.end_date = end_date - self.is_default = None + self.is_default: Optional[bool] = None class BillingProfilePropertiesCurrentPaymentTerm(PaymentTerm): # pylint: disable=name-too-long @@ -2479,7 +2476,7 @@ class BillingProfilePropertiesIndirectRelationshipInfo(IndirectRelationshipInfo) """ -class BillingProfilePropertiesShipTo(AddressDetails): # pylint: disable=too-many-instance-attributes +class BillingProfilePropertiesShipTo(AddressDetails): """The default address where the products are shipped, or the services are being used. If a ship to is not specified for a product or a subscription, then this address will be used. @@ -2518,7 +2515,7 @@ class BillingProfilePropertiesShipTo(AddressDetails): # pylint: disable=too-man """ -class BillingProfilePropertiesSoldTo(AddressDetails): # pylint: disable=too-many-instance-attributes +class BillingProfilePropertiesSoldTo(AddressDetails): """The address of the individual or organization that is responsible for the billing account. All required parameters must be populated in order to send to server. @@ -2562,7 +2559,7 @@ class BillingProperty(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -2615,7 +2612,7 @@ def __init__( self.properties = properties -class BillingPropertyProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BillingPropertyProperties(_serialization.Model): """A billing property. Variables are only populated by the server, and will be ignored when sending a request. @@ -2859,45 +2856,45 @@ def __init__( # pylint: disable=too-many-locals ~azure.mgmt.billing.models.BillingPropertyPropertiesEnrollmentDetails """ super().__init__(**kwargs) - self.billing_account_agreement_type = None - self.billing_account_display_name = None - self.billing_account_id = None - self.account_admin_notification_email_address = None - self.billing_account_sold_to_country = None - self.billing_account_status = None - self.billing_account_status_reason_code = None - self.billing_account_type = None - self.billing_account_sub_type = None - self.billing_currency = None - self.billing_profile_display_name = None - self.billing_profile_id = None - self.billing_profile_spending_limit = None - self.billing_profile_spending_limit_details = None - self.billing_profile_status = None - self.billing_profile_status_reason_code = None - self.billing_profile_payment_method_family = None - self.billing_profile_payment_method_type = None - self.billing_tenant_id = None + self.billing_account_agreement_type: Optional[Union[str, "_models.AgreementType"]] = None + self.billing_account_display_name: Optional[str] = None + self.billing_account_id: Optional[str] = None + self.account_admin_notification_email_address: Optional[str] = None + self.billing_account_sold_to_country: Optional[str] = None + self.billing_account_status: Optional[Union[str, "_models.AccountStatus"]] = None + self.billing_account_status_reason_code: Optional[Union[str, "_models.BillingAccountStatusReasonCode"]] = None + self.billing_account_type: Optional[Union[str, "_models.AccountType"]] = None + self.billing_account_sub_type: Optional[Union[str, "_models.AccountSubType"]] = None + self.billing_currency: Optional[str] = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_id: Optional[str] = None + self.billing_profile_spending_limit: Optional[Union[str, "_models.SpendingLimit"]] = None + self.billing_profile_spending_limit_details: Optional[List["_models.SpendingLimitDetails"]] = None + self.billing_profile_status: Optional[Union[str, "_models.BillingProfileStatus"]] = None + self.billing_profile_status_reason_code: Optional[Union[str, "_models.BillingProfileStatusReasonCode"]] = None + self.billing_profile_payment_method_family: Optional[Union[str, "_models.PaymentMethodFamily"]] = None + self.billing_profile_payment_method_type: Optional[str] = None + self.billing_tenant_id: Optional[str] = None self.cost_center = cost_center - self.customer_display_name = None - self.customer_id = None - self.customer_status = None - self.invoice_section_display_name = None - self.invoice_section_id = None - self.invoice_section_status = None - self.invoice_section_status_reason_code = None - self.is_transitioned_billing_account = None - self.sku_description = None - self.sku_id = None - self.subscription_billing_status = None - self.subscription_billing_status_details = None - self.subscription_billing_type = None + self.customer_display_name: Optional[str] = None + self.customer_id: Optional[str] = None + self.customer_status: Optional[Union[str, "_models.CustomerStatus"]] = None + self.invoice_section_display_name: Optional[str] = None + self.invoice_section_id: Optional[str] = None + self.invoice_section_status: Optional[Union[str, "_models.InvoiceSectionState"]] = None + self.invoice_section_status_reason_code: Optional[Union[str, "_models.InvoiceSectionStateReasonCode"]] = None + self.is_transitioned_billing_account: Optional[bool] = None + self.sku_description: Optional[str] = None + self.sku_id: Optional[str] = None + self.subscription_billing_status: Optional[Union[str, "_models.BillingSubscriptionStatus"]] = None + self.subscription_billing_status_details: Optional[List["_models.BillingSubscriptionStatusDetails"]] = None + self.subscription_billing_type: Optional[Union[str, "_models.SubscriptionBillingType"]] = None self.subscription_service_usage_address = subscription_service_usage_address - self.subscription_workload_type = None + self.subscription_workload_type: Optional[Union[str, "_models.SubscriptionWorkloadType"]] = None self.enrollment_details = enrollment_details - self.is_account_admin = None - self.product_id = None - self.product_name = None + self.is_account_admin: Optional[bool] = None + self.product_id: Optional[str] = None + self.product_name: Optional[str] = None class SubscriptionEnrollmentDetails(_serialization.Model): @@ -2971,9 +2968,7 @@ class BillingPropertyPropertiesEnrollmentDetails(SubscriptionEnrollmentDetails): """ -class BillingPropertyPropertiesSubscriptionServiceUsageAddress( - AddressDetails -): # pylint: disable=too-many-instance-attributes,name-too-long +class BillingPropertyPropertiesSubscriptionServiceUsageAddress(AddressDetails): # pylint: disable=name-too-long """The address of the individual or organization where service subscription is being used. Available for agreement type Microsoft Online Services Program. This property can be updated via patch. @@ -3020,7 +3015,7 @@ class BillingRequest(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3099,11 +3094,11 @@ class BillingRequestListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.BillingRequest"]] = None -class BillingRequestProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BillingRequestProperties(_serialization.Model): """A request submitted by a user to manage billing. Users with an owner role on the scope can approve or decline these requests. @@ -3285,38 +3280,38 @@ def __init__( # pylint: disable=too-many-locals :paramtype last_updated_by: ~azure.mgmt.billing.models.BillingRequestPropertiesLastUpdatedBy """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.additional_information = additional_information self.reviewed_by = reviewed_by - self.reviewal_date = None - self.billing_account_id = None - self.billing_account_name = None - self.billing_account_display_name = None - self.billing_account_primary_billing_tenant_id = None - self.billing_profile_id = None - self.billing_profile_name = None - self.billing_profile_display_name = None + self.reviewal_date: Optional[datetime.datetime] = None + self.billing_account_id: Optional[str] = None + self.billing_account_name: Optional[str] = None + self.billing_account_display_name: Optional[str] = None + self.billing_account_primary_billing_tenant_id: Optional[str] = None + self.billing_profile_id: Optional[str] = None + self.billing_profile_name: Optional[str] = None + self.billing_profile_display_name: Optional[str] = None self.created_by = created_by - self.creation_date = None - self.expiration_date = None + self.creation_date: Optional[datetime.datetime] = None + self.expiration_date: Optional[datetime.datetime] = None self.decision_reason = decision_reason - self.invoice_section_id = None - self.invoice_section_name = None - self.invoice_section_display_name = None - self.customer_id = None - self.customer_name = None - self.customer_display_name = None - self.subscription_id = None - self.subscription_name = None - self.subscription_display_name = None + self.invoice_section_id: Optional[str] = None + self.invoice_section_name: Optional[str] = None + self.invoice_section_display_name: Optional[str] = None + self.customer_id: Optional[str] = None + self.customer_name: Optional[str] = None + self.customer_display_name: Optional[str] = None + self.subscription_id: Optional[str] = None + self.subscription_name: Optional[str] = None + self.subscription_display_name: Optional[str] = None self.justification = justification self.recipients = recipients self.request_scope = request_scope - self.billing_scope = None + self.billing_scope: Optional[str] = None self.status = status self.type = type self.last_updated_by = last_updated_by - self.last_updated_date = None + self.last_updated_date: Optional[datetime.datetime] = None class Principal(_serialization.Model): @@ -3401,7 +3396,7 @@ class BillingRoleAssignment(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3478,11 +3473,11 @@ class BillingRoleAssignmentListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.BillingRoleAssignment"]] = None -class BillingRoleAssignmentProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BillingRoleAssignmentProperties(_serialization.Model): """The properties of the billing role assignment. Variables are only populated by the server, and will be ignored when sending a request. @@ -3662,17 +3657,17 @@ def __init__( # pylint: disable=too-many-locals :paramtype user_email_address: str """ super().__init__(**kwargs) - self.provisioning_state = None - self.created_on = None - self.created_by_principal_tenant_id = None - self.created_by_principal_id = None - self.created_by_principal_puid = None - self.created_by_user_email_address = None - self.modified_on = None - self.modified_by_principal_puid = None - self.modified_by_user_email_address = None - self.modified_by_principal_id = None - self.modified_by_principal_tenant_id = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.created_on: Optional[datetime.datetime] = None + self.created_by_principal_tenant_id: Optional[str] = None + self.created_by_principal_id: Optional[str] = None + self.created_by_principal_puid: Optional[str] = None + self.created_by_user_email_address: Optional[str] = None + self.modified_on: Optional[datetime.datetime] = None + self.modified_by_principal_puid: Optional[str] = None + self.modified_by_user_email_address: Optional[str] = None + self.modified_by_principal_id: Optional[str] = None + self.modified_by_principal_tenant_id: Optional[str] = None self.principal_puid = principal_puid self.principal_id = principal_id self.principal_tenant_id = principal_tenant_id @@ -3680,18 +3675,18 @@ def __init__( # pylint: disable=too-many-locals self.scope = scope self.user_authentication_type = user_authentication_type self.user_email_address = user_email_address - self.principal_tenant_name = None - self.principal_display_name = None - self.principal_type = None - self.billing_request_id = None - self.billing_account_id = None - self.billing_account_display_name = None - self.billing_profile_id = None - self.billing_profile_display_name = None - self.invoice_section_id = None - self.invoice_section_display_name = None - self.customer_id = None - self.customer_display_name = None + self.principal_tenant_name: Optional[str] = None + self.principal_display_name: Optional[str] = None + self.principal_type: Optional[Union[str, "_models.PrincipalType"]] = None + self.billing_request_id: Optional[str] = None + self.billing_account_id: Optional[str] = None + self.billing_account_display_name: Optional[str] = None + self.billing_profile_id: Optional[str] = None + self.billing_profile_display_name: Optional[str] = None + self.invoice_section_id: Optional[str] = None + self.invoice_section_display_name: Optional[str] = None + self.customer_id: Optional[str] = None + self.customer_display_name: Optional[str] = None class BillingRoleDefinition(ProxyResourceWithTags): @@ -3700,7 +3695,7 @@ class BillingRoleDefinition(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3777,8 +3772,8 @@ class BillingRoleDefinitionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.BillingRoleDefinition"]] = None class BillingRoleDefinitionProperties(_serialization.Model): @@ -3814,18 +3809,18 @@ def __init__(self, *, role_name: str, **kwargs: Any) -> None: :paramtype role_name: str """ super().__init__(**kwargs) - self.description = None - self.permissions = None + self.description: Optional[str] = None + self.permissions: Optional[List["_models.BillingPermission"]] = None self.role_name = role_name -class BillingSubscription(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class BillingSubscription(ProxyResourceWithTags): """The billing properties of a subscription. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -3890,7 +3885,8 @@ class BillingSubscription(ProxyResourceWithTags): # pylint: disable=too-many-in :ivar next_billing_cycle_details: Next billing cycle details of the subscription. :vartype next_billing_cycle_details: ~azure.mgmt.billing.models.NextBillingCycleDetails :ivar offer_id: The offer ID for the subscription. This field is only available for the - Microsoft Online Services Program billing accounts. + Microsoft Online Services Program billing accounts or billing accounts with agreement type + Enterprise Agreement. :vartype offer_id: str :ivar product_category: The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, @@ -4131,55 +4127,57 @@ def __init__( # pylint: disable=too-many-locals self.beneficiary = beneficiary self.billing_frequency = billing_frequency self.billing_profile_id = billing_profile_id - self.billing_policies = None - self.billing_profile_display_name = None - self.billing_profile_name = None + self.billing_policies: Optional[Dict[str, str]] = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_name: Optional[str] = None self.consumption_cost_center = consumption_cost_center self.customer_id = customer_id - self.customer_display_name = None - self.customer_name = None + self.customer_display_name: Optional[str] = None + self.customer_name: Optional[str] = None self.display_name = display_name - self.enrollment_account_id = None - self.enrollment_account_display_name = None + self.enrollment_account_id: Optional[str] = None + self.enrollment_account_display_name: Optional[str] = None self.invoice_section_id = invoice_section_id - self.invoice_section_display_name = None - self.invoice_section_name = None - self.last_month_charges = None - self.month_to_date_charges = None - self.next_billing_cycle_details = None - self.offer_id = None - self.product_category = None - self.product_type = None + self.invoice_section_display_name: Optional[str] = None + self.invoice_section_name: Optional[str] = None + self.last_month_charges: Optional["_models.Amount"] = None + self.month_to_date_charges: Optional["_models.Amount"] = None + self.next_billing_cycle_details: Optional["_models.NextBillingCycleDetails"] = None + self.offer_id: Optional[str] = None + self.product_category: Optional[str] = None + self.product_type: Optional[str] = None self.product_type_id = product_type_id - self.purchase_date = None + self.purchase_date: Optional[datetime.datetime] = None self.quantity = quantity - self.reseller = None - self.renewal_term_details = None + self.reseller: Optional["_models.Reseller"] = None + self.renewal_term_details: Optional["_models.RenewalTermDetails"] = None self.sku_id = sku_id - self.sku_description = None + self.sku_description: Optional[str] = None self.system_overrides = system_overrides - self.resource_uri = None + self.resource_uri: Optional[str] = None self.term_duration = term_duration - self.term_start_date = None - self.term_end_date = None + self.term_start_date: Optional[datetime.datetime] = None + self.term_end_date: Optional[datetime.datetime] = None self.provisioning_tenant_id = provisioning_tenant_id - self.status = None - self.operation_status = None - self.provisioning_state = None - self.subscription_id = None - self.suspension_reasons = None - self.suspension_reason_details = None - self.enrollment_account_start_date = None - self.subscription_enrollment_account_status = None - - -class BillingSubscriptionAlias(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes + self.status: Optional[Union[str, "_models.BillingSubscriptionStatus"]] = None + self.operation_status: Optional[Union[str, "_models.BillingSubscriptionOperationStatus"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.subscription_id: Optional[str] = None + self.suspension_reasons: Optional[List[str]] = None + self.suspension_reason_details: Optional[List["_models.BillingSubscriptionStatusDetails"]] = None + self.enrollment_account_start_date: Optional[datetime.datetime] = None + self.subscription_enrollment_account_status: Optional[ + Union[str, "_models.SubscriptionEnrollmentAccountStatus"] + ] = None + + +class BillingSubscriptionAlias(ProxyResourceWithTags): """A billing subscription alias. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -4244,7 +4242,8 @@ class BillingSubscriptionAlias(ProxyResourceWithTags): # pylint: disable=too-ma :ivar next_billing_cycle_details: Next billing cycle details of the subscription. :vartype next_billing_cycle_details: ~azure.mgmt.billing.models.NextBillingCycleDetails :ivar offer_id: The offer ID for the subscription. This field is only available for the - Microsoft Online Services Program billing accounts. + Microsoft Online Services Program billing accounts or billing accounts with agreement type + Enterprise Agreement. :vartype offer_id: str :ivar product_category: The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, @@ -4489,47 +4488,49 @@ def __init__( # pylint: disable=too-many-locals self.beneficiary = beneficiary self.billing_frequency = billing_frequency self.billing_profile_id = billing_profile_id - self.billing_policies = None - self.billing_profile_display_name = None - self.billing_profile_name = None + self.billing_policies: Optional[Dict[str, str]] = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_name: Optional[str] = None self.consumption_cost_center = consumption_cost_center self.customer_id = customer_id - self.customer_display_name = None - self.customer_name = None + self.customer_display_name: Optional[str] = None + self.customer_name: Optional[str] = None self.display_name = display_name - self.enrollment_account_id = None - self.enrollment_account_display_name = None + self.enrollment_account_id: Optional[str] = None + self.enrollment_account_display_name: Optional[str] = None self.invoice_section_id = invoice_section_id - self.invoice_section_display_name = None - self.invoice_section_name = None - self.last_month_charges = None - self.month_to_date_charges = None - self.next_billing_cycle_details = None - self.offer_id = None - self.product_category = None - self.product_type = None + self.invoice_section_display_name: Optional[str] = None + self.invoice_section_name: Optional[str] = None + self.last_month_charges: Optional["_models.Amount"] = None + self.month_to_date_charges: Optional["_models.Amount"] = None + self.next_billing_cycle_details: Optional["_models.NextBillingCycleDetails"] = None + self.offer_id: Optional[str] = None + self.product_category: Optional[str] = None + self.product_type: Optional[str] = None self.product_type_id = product_type_id - self.purchase_date = None + self.purchase_date: Optional[datetime.datetime] = None self.quantity = quantity - self.reseller = None - self.renewal_term_details = None + self.reseller: Optional["_models.Reseller"] = None + self.renewal_term_details: Optional["_models.RenewalTermDetails"] = None self.sku_id = sku_id - self.sku_description = None + self.sku_description: Optional[str] = None self.system_overrides = system_overrides - self.resource_uri = None + self.resource_uri: Optional[str] = None self.term_duration = term_duration - self.term_start_date = None - self.term_end_date = None + self.term_start_date: Optional[datetime.datetime] = None + self.term_end_date: Optional[datetime.datetime] = None self.provisioning_tenant_id = provisioning_tenant_id - self.status = None - self.operation_status = None - self.provisioning_state = None - self.subscription_id = None - self.suspension_reasons = None - self.suspension_reason_details = None - self.enrollment_account_start_date = None - self.subscription_enrollment_account_status = None - self.billing_subscription_id = None + self.status: Optional[Union[str, "_models.BillingSubscriptionStatus"]] = None + self.operation_status: Optional[Union[str, "_models.BillingSubscriptionOperationStatus"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.subscription_id: Optional[str] = None + self.suspension_reasons: Optional[List[str]] = None + self.suspension_reason_details: Optional[List["_models.BillingSubscriptionStatusDetails"]] = None + self.enrollment_account_start_date: Optional[datetime.datetime] = None + self.subscription_enrollment_account_status: Optional[ + Union[str, "_models.SubscriptionEnrollmentAccountStatus"] + ] = None + self.billing_subscription_id: Optional[str] = None class BillingSubscriptionAliasListResult(_serialization.Model): @@ -4556,11 +4557,11 @@ class BillingSubscriptionAliasListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.BillingSubscriptionAlias"]] = None -class BillingSubscriptionProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class BillingSubscriptionProperties(_serialization.Model): """The billing properties of a subscription. Variables are only populated by the server, and will be ignored when sending a request. @@ -4616,7 +4617,8 @@ class BillingSubscriptionProperties(_serialization.Model): # pylint: disable=to :ivar next_billing_cycle_details: Next billing cycle details of the subscription. :vartype next_billing_cycle_details: ~azure.mgmt.billing.models.NextBillingCycleDetails :ivar offer_id: The offer ID for the subscription. This field is only available for the - Microsoft Online Services Program billing accounts. + Microsoft Online Services Program billing accounts or billing accounts with agreement type + Enterprise Agreement. :vartype offer_id: str :ivar product_category: The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, @@ -4840,49 +4842,51 @@ def __init__( # pylint: disable=too-many-locals self.beneficiary = beneficiary self.billing_frequency = billing_frequency self.billing_profile_id = billing_profile_id - self.billing_policies = None - self.billing_profile_display_name = None - self.billing_profile_name = None + self.billing_policies: Optional[Dict[str, str]] = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_name: Optional[str] = None self.consumption_cost_center = consumption_cost_center self.customer_id = customer_id - self.customer_display_name = None - self.customer_name = None + self.customer_display_name: Optional[str] = None + self.customer_name: Optional[str] = None self.display_name = display_name - self.enrollment_account_id = None - self.enrollment_account_display_name = None + self.enrollment_account_id: Optional[str] = None + self.enrollment_account_display_name: Optional[str] = None self.invoice_section_id = invoice_section_id - self.invoice_section_display_name = None - self.invoice_section_name = None - self.last_month_charges = None - self.month_to_date_charges = None - self.next_billing_cycle_details = None - self.offer_id = None - self.product_category = None - self.product_type = None + self.invoice_section_display_name: Optional[str] = None + self.invoice_section_name: Optional[str] = None + self.last_month_charges: Optional["_models.Amount"] = None + self.month_to_date_charges: Optional["_models.Amount"] = None + self.next_billing_cycle_details: Optional["_models.NextBillingCycleDetails"] = None + self.offer_id: Optional[str] = None + self.product_category: Optional[str] = None + self.product_type: Optional[str] = None self.product_type_id = product_type_id - self.purchase_date = None + self.purchase_date: Optional[datetime.datetime] = None self.quantity = quantity - self.reseller = None - self.renewal_term_details = None + self.reseller: Optional["_models.Reseller"] = None + self.renewal_term_details: Optional["_models.RenewalTermDetails"] = None self.sku_id = sku_id - self.sku_description = None + self.sku_description: Optional[str] = None self.system_overrides = system_overrides - self.resource_uri = None + self.resource_uri: Optional[str] = None self.term_duration = term_duration - self.term_start_date = None - self.term_end_date = None + self.term_start_date: Optional[datetime.datetime] = None + self.term_end_date: Optional[datetime.datetime] = None self.provisioning_tenant_id = provisioning_tenant_id - self.status = None - self.operation_status = None - self.provisioning_state = None - self.subscription_id = None - self.suspension_reasons = None - self.suspension_reason_details = None - self.enrollment_account_start_date = None - self.subscription_enrollment_account_status = None - - -class BillingSubscriptionAliasProperties(BillingSubscriptionProperties): # pylint: disable=too-many-instance-attributes + self.status: Optional[Union[str, "_models.BillingSubscriptionStatus"]] = None + self.operation_status: Optional[Union[str, "_models.BillingSubscriptionOperationStatus"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.subscription_id: Optional[str] = None + self.suspension_reasons: Optional[List[str]] = None + self.suspension_reason_details: Optional[List["_models.BillingSubscriptionStatusDetails"]] = None + self.enrollment_account_start_date: Optional[datetime.datetime] = None + self.subscription_enrollment_account_status: Optional[ + Union[str, "_models.SubscriptionEnrollmentAccountStatus"] + ] = None + + +class BillingSubscriptionAliasProperties(BillingSubscriptionProperties): """A billing subscription alias. Variables are only populated by the server, and will be ignored when sending a request. @@ -4938,7 +4942,8 @@ class BillingSubscriptionAliasProperties(BillingSubscriptionProperties): # pyli :ivar next_billing_cycle_details: Next billing cycle details of the subscription. :vartype next_billing_cycle_details: ~azure.mgmt.billing.models.NextBillingCycleDetails :ivar offer_id: The offer ID for the subscription. This field is only available for the - Microsoft Online Services Program billing accounts. + Microsoft Online Services Program billing accounts or billing accounts with agreement type + Enterprise Agreement. :vartype offer_id: str :ivar product_category: The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, @@ -5178,7 +5183,7 @@ def __init__( # pylint: disable=too-many-locals provisioning_tenant_id=provisioning_tenant_id, **kwargs ) - self.billing_subscription_id = None + self.billing_subscription_id: Optional[str] = None class BillingSubscriptionListResult(_serialization.Model): @@ -5209,9 +5214,9 @@ class BillingSubscriptionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.total_count = None - self.value = None + self.next_link: Optional[str] = None + self.total_count: Optional[int] = None + self.value: Optional[List["_models.BillingSubscription"]] = None class BillingSubscriptionMergeRequest(_serialization.Model): @@ -5246,13 +5251,13 @@ def __init__( self.quantity = quantity -class BillingSubscriptionPatch(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class BillingSubscriptionPatch(ProxyResourceWithTags): """The billing properties of a subscription. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -5317,7 +5322,8 @@ class BillingSubscriptionPatch(ProxyResourceWithTags): # pylint: disable=too-ma :ivar next_billing_cycle_details: Next billing cycle details of the subscription. :vartype next_billing_cycle_details: ~azure.mgmt.billing.models.NextBillingCycleDetails :ivar offer_id: The offer ID for the subscription. This field is only available for the - Microsoft Online Services Program billing accounts. + Microsoft Online Services Program billing accounts or billing accounts with agreement type + Enterprise Agreement. :vartype offer_id: str :ivar product_category: The category of the product for which the subscription is purchased. Possible values include: AzureSupport, Hardware, ReservationOrder, SaaS, SavingsPlanOrder, @@ -5558,46 +5564,48 @@ def __init__( # pylint: disable=too-many-locals self.beneficiary = beneficiary self.billing_frequency = billing_frequency self.billing_profile_id = billing_profile_id - self.billing_policies = None - self.billing_profile_display_name = None - self.billing_profile_name = None + self.billing_policies: Optional[Dict[str, str]] = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_name: Optional[str] = None self.consumption_cost_center = consumption_cost_center self.customer_id = customer_id - self.customer_display_name = None - self.customer_name = None + self.customer_display_name: Optional[str] = None + self.customer_name: Optional[str] = None self.display_name = display_name - self.enrollment_account_id = None - self.enrollment_account_display_name = None + self.enrollment_account_id: Optional[str] = None + self.enrollment_account_display_name: Optional[str] = None self.invoice_section_id = invoice_section_id - self.invoice_section_display_name = None - self.invoice_section_name = None - self.last_month_charges = None - self.month_to_date_charges = None - self.next_billing_cycle_details = None - self.offer_id = None - self.product_category = None - self.product_type = None + self.invoice_section_display_name: Optional[str] = None + self.invoice_section_name: Optional[str] = None + self.last_month_charges: Optional["_models.Amount"] = None + self.month_to_date_charges: Optional["_models.Amount"] = None + self.next_billing_cycle_details: Optional["_models.NextBillingCycleDetails"] = None + self.offer_id: Optional[str] = None + self.product_category: Optional[str] = None + self.product_type: Optional[str] = None self.product_type_id = product_type_id - self.purchase_date = None + self.purchase_date: Optional[datetime.datetime] = None self.quantity = quantity - self.reseller = None - self.renewal_term_details = None + self.reseller: Optional["_models.Reseller"] = None + self.renewal_term_details: Optional["_models.RenewalTermDetails"] = None self.sku_id = sku_id - self.sku_description = None + self.sku_description: Optional[str] = None self.system_overrides = system_overrides - self.resource_uri = None + self.resource_uri: Optional[str] = None self.term_duration = term_duration - self.term_start_date = None - self.term_end_date = None + self.term_start_date: Optional[datetime.datetime] = None + self.term_end_date: Optional[datetime.datetime] = None self.provisioning_tenant_id = provisioning_tenant_id - self.status = None - self.operation_status = None - self.provisioning_state = None - self.subscription_id = None - self.suspension_reasons = None - self.suspension_reason_details = None - self.enrollment_account_start_date = None - self.subscription_enrollment_account_status = None + self.status: Optional[Union[str, "_models.BillingSubscriptionStatus"]] = None + self.operation_status: Optional[Union[str, "_models.BillingSubscriptionOperationStatus"]] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None + self.subscription_id: Optional[str] = None + self.suspension_reasons: Optional[List[str]] = None + self.suspension_reason_details: Optional[List["_models.BillingSubscriptionStatusDetails"]] = None + self.enrollment_account_start_date: Optional[datetime.datetime] = None + self.subscription_enrollment_account_status: Optional[ + Union[str, "_models.SubscriptionEnrollmentAccountStatus"] + ] = None class BillingSubscriptionSplitRequest(_serialization.Model): @@ -5696,8 +5704,8 @@ class BillingSubscriptionStatusDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.effective_date = None - self.reason = None + self.effective_date: Optional[datetime.datetime] = None + self.reason: Optional[Union[str, "_models.SubscriptionStatusReason"]] = None class CancelSubscriptionRequest(_serialization.Model): @@ -5787,8 +5795,8 @@ class CheckAccessResponse(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.access_decision = None - self.action = None + self.access_decision: Optional[Union[str, "_models.AccessDecision"]] = None + self.action: Optional[str] = None class Price(_serialization.Model): @@ -5864,7 +5872,7 @@ class Customer(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -5941,8 +5949,8 @@ class CustomerListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.Customer"]] = None class CustomerPolicy(ProxyResourceWithTags): @@ -5951,7 +5959,7 @@ class CustomerPolicy(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6050,7 +6058,7 @@ def __init__( :paramtype policies: list[~azure.mgmt.billing.models.PolicySummary] """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.view_charges = view_charges self.policies = policies @@ -6120,11 +6128,11 @@ def __init__( :paramtype tags: dict[str, str] """ super().__init__(**kwargs) - self.billing_profile_display_name = None - self.billing_profile_id = None - self.display_name = None - self.system_id = None - self.status = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_id: Optional[str] = None + self.display_name: Optional[str] = None + self.system_id: Optional[str] = None + self.status: Optional[Union[str, "_models.CustomerStatus"]] = None self.enabled_azure_plans = enabled_azure_plans self.resellers = resellers self.tags = tags @@ -6285,7 +6293,7 @@ class Department(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6364,8 +6372,8 @@ class DepartmentListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.Department"]] = None class DepartmentProperties(_serialization.Model): @@ -6406,8 +6414,8 @@ def __init__(self, *, cost_center: Optional[str] = None, display_name: Optional[ super().__init__(**kwargs) self.cost_center = cost_center self.display_name = display_name - self.id = None - self.status = None + self.id: Optional[str] = None + self.status: Optional[str] = None class DetailedTransferStatus(_serialization.Model): @@ -6454,11 +6462,11 @@ def __init__(self, *, error_details: Optional["_models.TransferError"] = None, * :paramtype error_details: ~azure.mgmt.billing.models.TransferError """ super().__init__(**kwargs) - self.product_type = None - self.product_id = None - self.product_name = None - self.sku_description = None - self.transfer_status = None + self.product_type: Optional[Union[str, "_models.ProductType"]] = None + self.product_id: Optional[str] = None + self.product_name: Optional[str] = None + self.sku_description: Optional[str] = None + self.transfer_status: Optional[Union[str, "_models.ProductTransferStatus"]] = None self.error_details = error_details @@ -6518,8 +6526,8 @@ class DocumentDownloadResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.expiry_time = None - self.url = None + self.expiry_time: Optional[str] = None + self.url: Optional[str] = None class EnrollmentAccount(ProxyResourceWithTags): @@ -6529,7 +6537,7 @@ class EnrollmentAccount(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -6608,8 +6616,8 @@ class EnrollmentAccountListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.EnrollmentAccount"]] = None class EnrollmentAccountProperties(_serialization.Model): @@ -6685,14 +6693,14 @@ def __init__( super().__init__(**kwargs) self.cost_center = cost_center self.display_name = display_name - self.department_display_name = None - self.department_id = None + self.department_display_name: Optional[str] = None + self.department_id: Optional[str] = None self.is_dev_test_enabled = is_dev_test_enabled - self.account_owner = None - self.auth_type = None - self.status = None - self.start_date = None - self.end_date = None + self.account_owner: Optional[str] = None + self.auth_type: Optional[str] = None + self.status: Optional[str] = None + self.start_date: Optional[datetime.datetime] = None + self.end_date: Optional[datetime.datetime] = None class EnrollmentDetailsIndirectRelationshipInfo(IndirectRelationshipInfo): # pylint: disable=name-too-long @@ -6733,8 +6741,8 @@ class ErrorAdditionalInfo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.info = None + self.type: Optional[str] = None + self.info: Optional[JSON] = None class ErrorDetail(_serialization.Model): @@ -6773,11 +6781,11 @@ class ErrorDetail(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + self.code: Optional[str] = None + self.message: Optional[str] = None + self.target: Optional[str] = None + self.details: Optional[List["_models.ErrorDetail"]] = None + self.additional_info: Optional[List["_models.ErrorAdditionalInfo"]] = None class ErrorResponse(_serialization.Model): @@ -6884,8 +6892,8 @@ class ExternalReference(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None - self.url = None + self.id: Optional[str] = None + self.url: Optional[str] = None class FailedPayment(_serialization.Model): @@ -6913,8 +6921,8 @@ class FailedPayment(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.date = None - self.failed_payment_reason = None + self.date: Optional[datetime.datetime] = None + self.failed_payment_reason: Optional[Union[str, "_models.FailedPaymentReason"]] = None class InitiateTransferRequest(_serialization.Model): @@ -6944,7 +6952,7 @@ class Invoice(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -7042,12 +7050,12 @@ class InvoiceDocument(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.document_numbers = None - self.external_url = None - self.kind = None - self.name = None - self.url = None - self.source = None + self.document_numbers: Optional[List[str]] = None + self.external_url: Optional[str] = None + self.kind: Optional[Union[str, "_models.InvoiceDocumentType"]] = None + self.name: Optional[str] = None + self.url: Optional[str] = None + self.source: Optional[Union[str, "_models.DocumentSource"]] = None class InvoiceListResult(_serialization.Model): @@ -7074,11 +7082,11 @@ class InvoiceListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.Invoice"]] = None -class InvoiceProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class InvoiceProperties(_serialization.Model): """An invoice. Variables are only populated by the server, and will be ignored when sending a request. @@ -7276,28 +7284,28 @@ def __init__( # pylint: disable=too-many-locals self.amount_due = amount_due self.azure_prepayment_applied = azure_prepayment_applied self.billed_amount = billed_amount - self.billed_document_id = None - self.billing_profile_display_name = None - self.billing_profile_id = None + self.billed_document_id: Optional[str] = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_id: Optional[str] = None self.credit_amount = credit_amount - self.credit_for_document_id = None - self.documents = None - self.document_type = None - self.due_date = None - self.failed_payments = None + self.credit_for_document_id: Optional[str] = None + self.documents: Optional[List["_models.InvoiceDocument"]] = None + self.document_type: Optional[Union[str, "_models.InvoiceDocumentType"]] = None + self.due_date: Optional[datetime.datetime] = None + self.failed_payments: Optional[List["_models.FailedPayment"]] = None self.free_azure_credit_applied = free_azure_credit_applied - self.invoice_date = None - self.invoice_period_end_date = None - self.invoice_period_start_date = None - self.invoice_type = None - self.is_monthly_invoice = None - self.payments = None - self.purchase_order_number = None + self.invoice_date: Optional[datetime.datetime] = None + self.invoice_period_end_date: Optional[datetime.datetime] = None + self.invoice_period_start_date: Optional[datetime.datetime] = None + self.invoice_type: Optional[Union[str, "_models.InvoiceType"]] = None + self.is_monthly_invoice: Optional[bool] = None + self.payments: Optional[List["_models.Payment"]] = None + self.purchase_order_number: Optional[str] = None self.rebill_details = rebill_details - self.status = None - self.subscription_display_name = None - self.subscription_id = None - self.special_taxation_type = None + self.status: Optional[Union[str, "_models.InvoiceStatus"]] = None + self.subscription_display_name: Optional[str] = None + self.subscription_id: Optional[str] = None + self.special_taxation_type: Optional[Union[str, "_models.SpecialTaxationType"]] = None self.sub_total = sub_total self.tax_amount = tax_amount self.total_amount = total_amount @@ -7400,9 +7408,9 @@ class RebillDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.invoice_document_id = None - self.credit_note_document_id = None - self.rebill_details = None + self.invoice_document_id: Optional[str] = None + self.credit_note_document_id: Optional[str] = None + self.rebill_details: Optional["_models.RebillDetails"] = None class InvoicePropertiesRebillDetails(RebillDetails): @@ -7486,16 +7494,16 @@ def __init__( :paramtype amount_refunded: ~azure.mgmt.billing.models.RefundDetailsSummaryAmountRefunded """ super().__init__(**kwargs) - self.requested_on = None - self.approved_on = None - self.completed_on = None + self.requested_on: Optional[datetime.datetime] = None + self.approved_on: Optional[datetime.datetime] = None + self.completed_on: Optional[datetime.datetime] = None self.amount_requested = amount_requested self.amount_refunded = amount_refunded - self.rebill_invoice_id = None - self.transaction_count = None - self.refund_status = None - self.refund_operation_id = None - self.refund_reason = None + self.rebill_invoice_id: Optional[str] = None + self.transaction_count: Optional[int] = None + self.refund_status: Optional[Union[str, "_models.RefundStatus"]] = None + self.refund_operation_id: Optional[str] = None + self.refund_reason: Optional[Union[str, "_models.RefundReasonCode"]] = None class InvoicePropertiesRefundDetails(RefundDetailsSummary): @@ -7576,7 +7584,7 @@ class InvoiceSection(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -7653,8 +7661,8 @@ class InvoiceSectionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.InvoiceSection"]] = None class InvoiceSectionProperties(_serialization.Model): @@ -7730,11 +7738,11 @@ def __init__( :paramtype tags: dict[str, str] """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.display_name = display_name self.state = state self.reason_code = reason_code - self.system_id = None + self.system_id: Optional[str] = None self.target_cloud = target_cloud self.tags = tags @@ -7800,16 +7808,16 @@ class InvoiceSectionWithCreateSubPermission(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.billing_profile_display_name = None - self.billing_profile_id = None - self.billing_profile_system_id = None - self.billing_profile_status = None - self.billing_profile_status_reason_code = None - self.billing_profile_spending_limit = None - self.enabled_azure_plans = None - self.invoice_section_display_name = None - self.invoice_section_id = None - self.invoice_section_system_id = None + self.billing_profile_display_name: Optional[str] = None + self.billing_profile_id: Optional[str] = None + self.billing_profile_system_id: Optional[str] = None + self.billing_profile_status: Optional[Union[str, "_models.BillingProfileStatus"]] = None + self.billing_profile_status_reason_code: Optional[Union[str, "_models.BillingProfileStatusReasonCode"]] = None + self.billing_profile_spending_limit: Optional[Union[str, "_models.SpendingLimit"]] = None + self.enabled_azure_plans: Optional[List["_models.AzurePlan"]] = None + self.invoice_section_display_name: Optional[str] = None + self.invoice_section_id: Optional[str] = None + self.invoice_section_system_id: Optional[str] = None class InvoiceSectionWithCreateSubPermissionListResult(_serialization.Model): # pylint: disable=name-too-long @@ -7836,8 +7844,8 @@ class InvoiceSectionWithCreateSubPermissionListResult(_serialization.Model): # def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.InvoiceSectionWithCreateSubPermission"]] = None class MoveBillingSubscriptionEligibilityResult(_serialization.Model): @@ -7868,7 +7876,7 @@ def __init__( :paramtype error_details: ~azure.mgmt.billing.models.MoveBillingSubscriptionErrorDetails """ super().__init__(**kwargs) - self.is_move_eligible = None + self.is_move_eligible: Optional[bool] = None self.error_details = error_details @@ -8029,9 +8037,9 @@ class MoveProductErrorDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None - self.details = None + self.code: Optional[Union[str, "_models.MoveValidationErrorCode"]] = None + self.message: Optional[str] = None + self.details: Optional[str] = None class MoveProductEligibilityResultErrorDetails(MoveProductErrorDetails): @@ -8100,7 +8108,7 @@ class NextBillingCycleDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.billing_frequency = None + self.billing_frequency: Optional[str] = None class Operation(_serialization.Model): @@ -8135,8 +8143,8 @@ def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kw :paramtype display: ~azure.mgmt.billing.models.OperationDisplay """ super().__init__(**kwargs) - self.name = None - self.is_data_action = None + self.name: Optional[str] = None + self.is_data_action: Optional[bool] = None self.display = display @@ -8176,10 +8184,10 @@ class OperationDisplay(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.description = None - self.operation = None - self.provider = None - self.resource = None + self.description: Optional[str] = None + self.operation: Optional[str] = None + self.provider: Optional[str] = None + self.resource: Optional[str] = None class OperationListResult(_serialization.Model): @@ -8206,8 +8214,8 @@ class OperationListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.Operation"]] = None class Participant(_serialization.Model): @@ -8238,9 +8246,9 @@ class Participant(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.email = None - self.status = None - self.status_date = None + self.email: Optional[str] = None + self.status: Optional[str] = None + self.status_date: Optional[datetime.datetime] = None class PartnerInitiateTransferRequest(_serialization.Model): @@ -8274,13 +8282,13 @@ def __init__( self.reseller_id = reseller_id -class PartnerTransferDetails(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class PartnerTransferDetails(ProxyResourceWithTags): """Details of the transfer. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -8359,15 +8367,15 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N :paramtype tags: dict[str, str] """ super().__init__(tags=tags, **kwargs) - self.expiration_time = None - self.transfer_status = None - self.recipient_email_id = None - self.initiator_customer_type = None - self.initiator_email_id = None - self.reseller_id = None - self.reseller_name = None - self.canceled_by = None - self.detailed_transfer_status = None + self.expiration_time: Optional[datetime.datetime] = None + self.transfer_status: Optional[Union[str, "_models.TransferStatus"]] = None + self.recipient_email_id: Optional[str] = None + self.initiator_customer_type: Optional[Union[str, "_models.InitiatorCustomerType"]] = None + self.initiator_email_id: Optional[str] = None + self.reseller_id: Optional[str] = None + self.reseller_name: Optional[str] = None + self.canceled_by: Optional[str] = None + self.detailed_transfer_status: Optional[List["_models.DetailedTransferStatus"]] = None class PartnerTransferDetailsListResult(_serialization.Model): @@ -8394,8 +8402,8 @@ class PartnerTransferDetailsListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.PartnerTransferDetails"]] = None + self.next_link: Optional[str] = None class Patch(_serialization.Model): @@ -8545,11 +8553,11 @@ def __init__(self, *, amount: Optional["_models.PaymentAmount"] = None, **kwargs """ super().__init__(**kwargs) self.amount = amount - self.date = None - self.payment_method_id = None - self.payment_method_family = None - self.payment_method_type = None - self.payment_type = None + self.date: Optional[datetime.datetime] = None + self.payment_method_id: Optional[str] = None + self.payment_method_family: Optional[Union[str, "_models.PaymentMethodFamily"]] = None + self.payment_method_type: Optional[str] = None + self.payment_type: Optional[str] = None class PaymentAmount(Amount): @@ -8631,16 +8639,16 @@ def __init__( self.pricing_currency_total = pricing_currency_total self.billing_currency_total = billing_currency_total self.status = status - self.extended_status_info = None + self.extended_status_info: Optional["_models.ExtendedStatusInfo"] = None -class PaymentMethod(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class PaymentMethod(ProxyResourceWithTags): """A payment method. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -8730,24 +8738,24 @@ def __init__( :paramtype status: str or ~azure.mgmt.billing.models.PaymentMethodStatus """ super().__init__(tags=tags, **kwargs) - self.id_properties_id = None - self.account_holder_name = None - self.display_name = None - self.expiration = None + self.id_properties_id: Optional[str] = None + self.account_holder_name: Optional[str] = None + self.display_name: Optional[str] = None + self.expiration: Optional[str] = None self.family = family - self.last_four_digits = None + self.last_four_digits: Optional[str] = None self.logos = logos - self.payment_method_type = None + self.payment_method_type: Optional[str] = None self.status = status -class PaymentMethodLink(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class PaymentMethodLink(ProxyResourceWithTags): """A payment method link. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -8842,16 +8850,16 @@ def __init__( :paramtype payment_method_id: str """ super().__init__(tags=tags, **kwargs) - self.account_holder_name = None - self.display_name = None - self.expiration = None - self.family = None - self.last_four_digits = None - self.logos = None + self.account_holder_name: Optional[str] = None + self.display_name: Optional[str] = None + self.expiration: Optional[str] = None + self.family: Optional[Union[str, "_models.PaymentMethodFamily"]] = None + self.last_four_digits: Optional[str] = None + self.logos: Optional[List["_models.PaymentMethodLogo"]] = None self.payment_method = payment_method self.payment_method_id = payment_method_id - self.payment_method_type = None - self.status = None + self.payment_method_type: Optional[str] = None + self.status: Optional[Union[str, "_models.PaymentMethodStatus"]] = None class PaymentMethodLinksListResult(_serialization.Model): @@ -8878,8 +8886,8 @@ class PaymentMethodLinksListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.PaymentMethodLink"]] = None class PaymentMethodLogo(_serialization.Model): @@ -8906,8 +8914,8 @@ class PaymentMethodLogo(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.mime_type = None - self.url = None + self.mime_type: Optional[str] = None + self.url: Optional[str] = None class PaymentMethodProperties(_serialization.Model): @@ -8977,14 +8985,14 @@ def __init__( :paramtype status: str or ~azure.mgmt.billing.models.PaymentMethodStatus """ super().__init__(**kwargs) - self.id = None - self.account_holder_name = None - self.display_name = None - self.expiration = None + self.id: Optional[str] = None + self.account_holder_name: Optional[str] = None + self.display_name: Optional[str] = None + self.expiration: Optional[str] = None self.family = family - self.last_four_digits = None + self.last_four_digits: Optional[str] = None self.logos = logos - self.payment_method_type = None + self.payment_method_type: Optional[str] = None self.status = status @@ -9012,8 +9020,8 @@ class PaymentMethodsListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.PaymentMethod"]] = None class PaymentOnAccount(_serialization.Model): @@ -9065,12 +9073,12 @@ def __init__(self, *, amount: Optional["_models.PaymentOnAccountAmount"] = None, """ super().__init__(**kwargs) self.amount = amount - self.billing_profile_id = None - self.billing_profile_display_name = None - self.invoice_id = None - self.invoice_name = None - self.date = None - self.payment_method_type = None + self.billing_profile_id: Optional[str] = None + self.billing_profile_display_name: Optional[str] = None + self.invoice_id: Optional[str] = None + self.invoice_name: Optional[str] = None + self.date: Optional[datetime.datetime] = None + self.payment_method_type: Optional[Union[str, "_models.PaymentMethodFamily"]] = None class PaymentOnAccountAmount(Amount): @@ -9212,7 +9220,7 @@ class Product(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -9323,8 +9331,8 @@ class ProductListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.Product"]] = None class ProductPatch(ProxyResourceWithTags): @@ -9333,7 +9341,7 @@ class ProductPatch(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -9386,7 +9394,7 @@ def __init__( self.properties = properties -class ProductProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ProductProperties(_serialization.Model): """A product. Variables are only populated by the server, and will be ignored when sending a request. @@ -9511,26 +9519,26 @@ def __init__( """ super().__init__(**kwargs) self.auto_renew = auto_renew - self.availability_id = None - self.billing_frequency = None - self.billing_profile_id = None - self.billing_profile_display_name = None - self.customer_id = None - self.customer_display_name = None - self.display_name = None - self.end_date = None - self.invoice_section_id = None - self.invoice_section_display_name = None + self.availability_id: Optional[str] = None + self.billing_frequency: Optional[str] = None + self.billing_profile_id: Optional[str] = None + self.billing_profile_display_name: Optional[str] = None + self.customer_id: Optional[str] = None + self.customer_display_name: Optional[str] = None + self.display_name: Optional[str] = None + self.end_date: Optional[str] = None + self.invoice_section_id: Optional[str] = None + self.invoice_section_display_name: Optional[str] = None self.last_charge = last_charge - self.last_charge_date = None - self.product_type = None - self.product_type_id = None - self.sku_id = None - self.sku_description = None - self.purchase_date = None - self.quantity = None - self.status = None - self.tenant_id = None + self.last_charge_date: Optional[str] = None + self.product_type: Optional[str] = None + self.product_type_id: Optional[str] = None + self.sku_id: Optional[str] = None + self.sku_description: Optional[str] = None + self.purchase_date: Optional[str] = None + self.quantity: Optional[int] = None + self.status: Optional[Union[str, "_models.ProductStatus"]] = None + self.tenant_id: Optional[str] = None self.reseller = reseller @@ -9571,8 +9579,8 @@ class Reseller(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.reseller_id = None - self.description = None + self.reseller_id: Optional[str] = None + self.description: Optional[str] = None class ProductPropertiesReseller(Reseller): @@ -9679,13 +9687,13 @@ def __init__( self.applied_scope_properties = applied_scope_properties -class RecipientTransferDetails(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class RecipientTransferDetails(ProxyResourceWithTags): """Details of the transfer. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -9776,18 +9784,18 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N :paramtype tags: dict[str, str] """ super().__init__(tags=tags, **kwargs) - self.expiration_time = None - self.allowed_product_type = None - self.transfer_status = None - self.recipient_email_id = None - self.initiator_email_id = None - self.reseller_id = None - self.reseller_name = None - self.initiator_customer_type = None - self.canceled_by = None - self.detailed_transfer_status = None - self.customer_tenant_id = None - self.supported_accounts = None + self.expiration_time: Optional[datetime.datetime] = None + self.allowed_product_type: Optional[List[Union[str, "_models.EligibleProductType"]]] = None + self.transfer_status: Optional[Union[str, "_models.TransferStatus"]] = None + self.recipient_email_id: Optional[str] = None + self.initiator_email_id: Optional[str] = None + self.reseller_id: Optional[str] = None + self.reseller_name: Optional[str] = None + self.initiator_customer_type: Optional[Union[str, "_models.InitiatorCustomerType"]] = None + self.canceled_by: Optional[str] = None + self.detailed_transfer_status: Optional[List["_models.DetailedTransferStatus"]] = None + self.customer_tenant_id: Optional[str] = None + self.supported_accounts: Optional[List[Union[str, "_models.SupportedAccountType"]]] = None class RecipientTransferDetailsListResult(_serialization.Model): @@ -9814,8 +9822,8 @@ class RecipientTransferDetailsListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.RecipientTransferDetails"]] = None + self.next_link: Optional[str] = None class RefundDetailsSummaryAmountRefunded(Amount): @@ -9958,13 +9966,13 @@ def __init__(self, *, quantity: Optional[int] = None, **kwargs: Any) -> None: :paramtype quantity: int """ super().__init__(**kwargs) - self.billing_frequency = None - self.product_id = None - self.product_type_id = None - self.sku_id = None - self.term_duration = None + self.billing_frequency: Optional[str] = None + self.product_id: Optional[str] = None + self.product_type_id: Optional[str] = None + self.sku_id: Optional[str] = None + self.term_duration: Optional[str] = None self.quantity = quantity - self.term_end_date = None + self.term_end_date: Optional[datetime.datetime] = None class RenewProperties(_serialization.Model): @@ -10030,13 +10038,13 @@ def __init__( self.billing_currency_total = billing_currency_total -class Reservation(ProxyResource): # pylint: disable=too-many-instance-attributes +class Reservation(ProxyResource): """The definition of the reservation. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10310,42 +10318,42 @@ def __init__( # pylint: disable=too-many-locals self.etag = etag self.tags = tags self.sku = sku - self.reserved_resource_type = None + self.reserved_resource_type: Optional[str] = None self.instance_flexibility = instance_flexibility - self.display_name = None + self.display_name: Optional[str] = None self.applied_scopes = applied_scopes - self.applied_scope_type = None + self.applied_scope_type: Optional[str] = None self.archived = archived self.capabilities = capabilities - self.quantity = None - self.provisioning_state = None - self.effective_date_time = None + self.quantity: Optional[float] = None + self.provisioning_state: Optional[str] = None + self.effective_date_time: Optional[datetime.datetime] = None self.benefit_start_time = benefit_start_time - self.last_updated_date_time = None - self.expiry_date = None + self.last_updated_date_time: Optional[datetime.datetime] = None + self.expiry_date: Optional[str] = None self.expiry_date_time = expiry_date_time self.review_date_time = review_date_time - self.sku_description = None + self.sku_description: Optional[str] = None self.extended_status_info = extended_status_info self.billing_plan = billing_plan - self.display_provisioning_state = None - self.provisioning_sub_state = None + self.display_provisioning_state: Optional[str] = None + self.provisioning_sub_state: Optional[str] = None self.purchase_date = purchase_date self.purchase_date_time = purchase_date_time self.split_properties = split_properties self.merge_properties = merge_properties self.swap_properties = swap_properties self.applied_scope_properties = applied_scope_properties - self.billing_scope_id = None - self.renew = None - self.renew_source = None + self.billing_scope_id: Optional[str] = None + self.renew: Optional[bool] = None + self.renew_source: Optional[str] = None self.renew_destination = renew_destination self.renew_properties = renew_properties - self.term = None - self.user_friendly_applied_scope_type = None - self.user_friendly_renew_state = None + self.term: Optional[str] = None + self.user_friendly_applied_scope_type: Optional[str] = None + self.user_friendly_renew_state: Optional[str] = None self.product_code = product_code - self.trend = None + self.trend: Optional[str] = None self.aggregates = aggregates @@ -10516,13 +10524,13 @@ def __init__( self.merge_sources = merge_sources -class ReservationOrder(ProxyResource): # pylint: disable=too-many-instance-attributes +class ReservationOrder(ProxyResource): """Details of a reservation order being returned. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -10701,8 +10709,8 @@ def __init__( # pylint: disable=too-many-locals self.expiry_date_time = expiry_date_time self.benefit_start_time = benefit_start_time self.original_quantity = original_quantity - self.term = None - self.provisioning_state = None + self.term: Optional[str] = None + self.provisioning_state: Optional[str] = None self.billing_plan = billing_plan self.plan_information = plan_information self.reservations = reservations @@ -10864,7 +10872,7 @@ def __init__( self.extended_status_info = extended_status_info -class ReservationPurchaseRequest(_serialization.Model): # pylint: disable=too-many-instance-attributes +class ReservationPurchaseRequest(_serialization.Model): """The request for reservation purchase. Variables are only populated by the server, and will be ignored when sending a request. @@ -11013,9 +11021,9 @@ def __init__( super().__init__(**kwargs) self.sku = sku self.location = location - self.reserved_resource_type = None - self.billing_scope_id = None - self.term = None + self.reserved_resource_type: Optional[str] = None + self.billing_scope_id: Optional[str] = None + self.term: Optional[str] = None self.billing_plan = billing_plan self.quantity = quantity self.display_name = display_name @@ -11050,7 +11058,7 @@ class ReservationSkuProperty(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None + self.name: Optional[str] = None class ReservationsListResult(_serialization.Model): @@ -11083,9 +11091,9 @@ def __init__(self, *, summary: Optional["_models.ReservationSummary"] = None, ** :paramtype summary: ~azure.mgmt.billing.models.ReservationSummary """ super().__init__(**kwargs) - self.next_link = None + self.next_link: Optional[str] = None self.summary = summary - self.value = None + self.value: Optional[List["_models.Reservation"]] = None class ReservationSplitProperties(_serialization.Model): @@ -11176,15 +11184,15 @@ class ReservationSummary(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.cancelled_count = None - self.expired_count = None - self.expiring_count = None - self.failed_count = None - self.pending_count = None - self.succeeded_count = None - self.no_benefit_count = None - self.warning_count = None - self.processing_count = None + self.cancelled_count: Optional[float] = None + self.expired_count: Optional[float] = None + self.expiring_count: Optional[float] = None + self.failed_count: Optional[float] = None + self.pending_count: Optional[float] = None + self.succeeded_count: Optional[float] = None + self.no_benefit_count: Optional[float] = None + self.warning_count: Optional[float] = None + self.processing_count: Optional[float] = None class ReservationSwapProperties(_serialization.Model): @@ -11255,13 +11263,13 @@ class ReservationUtilizationAggregates(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.grain = None - self.grain_unit = None - self.value = None - self.value_unit = None + self.grain: Optional[float] = None + self.grain_unit: Optional[str] = None + self.value: Optional[float] = None + self.value_unit: Optional[str] = None -class SavingsPlanModel(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class SavingsPlanModel(ProxyResourceWithTags): """Savings plan. Variables are only populated by the server, and will be ignored when sending a request. @@ -11269,7 +11277,7 @@ class SavingsPlanModel(ProxyResourceWithTags): # pylint: disable=too-many-insta All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -11467,12 +11475,12 @@ def __init__( # pylint: disable=too-many-locals self.sku = sku self.display_name = display_name self.provisioning_state = provisioning_state - self.display_provisioning_state = None - self.user_friendly_applied_scope_type = None + self.display_provisioning_state: Optional[str] = None + self.user_friendly_applied_scope_type: Optional[str] = None self.billing_scope_id = billing_scope_id - self.billing_profile_id = None - self.customer_id = None - self.billing_account_id = None + self.billing_profile_id: Optional[str] = None + self.customer_id: Optional[str] = None + self.billing_account_id: Optional[str] = None self.term = term self.renew = renew self.renew_source = renew_source @@ -11482,12 +11490,12 @@ def __init__( # pylint: disable=too-many-locals self.applied_scope_type = applied_scope_type self.applied_scope_properties = applied_scope_properties self.commitment = commitment - self.effective_date_time = None - self.benefit_start_time = None - self.expiry_date_time = None - self.purchase_date_time = None - self.utilization = None - self.extended_status_info = None + self.effective_date_time: Optional[datetime.datetime] = None + self.benefit_start_time: Optional[datetime.datetime] = None + self.expiry_date_time: Optional[datetime.datetime] = None + self.purchase_date_time: Optional[datetime.datetime] = None + self.utilization: Optional["_models.Utilization"] = None + self.extended_status_info: Optional["_models.ExtendedStatusInfo"] = None self.product_code = product_code @@ -11560,7 +11568,7 @@ def __init__( self.summary = summary -class SavingsPlanOrderModel(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class SavingsPlanOrderModel(ProxyResourceWithTags): """Savings plan order. Variables are only populated by the server, and will be ignored when sending a request. @@ -11568,7 +11576,7 @@ class SavingsPlanOrderModel(ProxyResourceWithTags): # pylint: disable=too-many- All required parameters must be populated in order to send to server. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -11699,18 +11707,18 @@ def __init__( super().__init__(tags=tags, **kwargs) self.sku = sku self.display_name = display_name - self.provisioning_state = None + self.provisioning_state: Optional[str] = None self.billing_scope_id = billing_scope_id - self.billing_profile_id = None - self.customer_id = None - self.billing_account_id = None + self.billing_profile_id: Optional[str] = None + self.customer_id: Optional[str] = None + self.billing_account_id: Optional[str] = None self.term = term self.billing_plan = billing_plan - self.benefit_start_time = None - self.expiry_date_time = None + self.benefit_start_time: Optional[datetime.datetime] = None + self.expiry_date_time: Optional[datetime.datetime] = None self.plan_information = plan_information self.savings_plans = savings_plans - self.extended_status_info = None + self.extended_status_info: Optional["_models.ExtendedStatusInfo"] = None self.product_code = product_code @@ -11798,15 +11806,15 @@ class SavingsPlanSummaryCount(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.succeeded_count = None - self.failed_count = None - self.expiring_count = None - self.expired_count = None - self.pending_count = None - self.cancelled_count = None - self.processing_count = None - self.no_benefit_count = None - self.warning_count = None + self.succeeded_count: Optional[float] = None + self.failed_count: Optional[float] = None + self.expiring_count: Optional[float] = None + self.expired_count: Optional[float] = None + self.pending_count: Optional[float] = None + self.cancelled_count: Optional[float] = None + self.processing_count: Optional[float] = None + self.no_benefit_count: Optional[float] = None + self.warning_count: Optional[float] = None class SavingsPlanUpdateRequest(_serialization.Model): @@ -12114,7 +12122,7 @@ class SubscriptionPolicy(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -12195,7 +12203,7 @@ def __init__(self, *, policies: Optional[List["_models.PolicySummary"]] = None, :paramtype policies: list[~azure.mgmt.billing.models.PolicySummary] """ super().__init__(**kwargs) - self.provisioning_state = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.policies = policies @@ -12289,8 +12297,8 @@ class SystemOverrides(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.cancellation = None - self.cancellation_allowed_end_date = None + self.cancellation: Optional[Union[str, "_models.Cancellation"]] = None + self.cancellation_allowed_end_date: Optional[datetime.datetime] = None class TaxIdentifier(_serialization.Model): @@ -12362,7 +12370,7 @@ class Transaction(ProxyResourceWithTags): Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -12439,11 +12447,11 @@ class TransactionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.next_link = None - self.value = None + self.next_link: Optional[str] = None + self.value: Optional[List["_models.Transaction"]] = None -class TransactionProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes +class TransactionProperties(_serialization.Model): """A transaction. :ivar azure_credit_applied: The amount of any Azure credits automatically applied to this @@ -12925,21 +12933,21 @@ class TransactionSummary(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.azure_credit_applied = None - self.billing_currency = None - self.consumption_commitment_decremented = None - self.sub_total = None - self.tax = None - self.total = None + self.azure_credit_applied: Optional[float] = None + self.billing_currency: Optional[str] = None + self.consumption_commitment_decremented: Optional[float] = None + self.sub_total: Optional[float] = None + self.tax: Optional[float] = None + self.total: Optional[float] = None -class TransferDetails(ProxyResourceWithTags): # pylint: disable=too-many-instance-attributes +class TransferDetails(ProxyResourceWithTags): """Details of the transfer. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Fully qualified resource ID for the resource. E.g. - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -13003,12 +13011,12 @@ def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> N :paramtype tags: dict[str, str] """ super().__init__(tags=tags, **kwargs) - self.expiration_time = None - self.transfer_status = None - self.recipient_email_id = None - self.initiator_email_id = None - self.canceled_by = None - self.detailed_transfer_status = None + self.expiration_time: Optional[datetime.datetime] = None + self.transfer_status: Optional[Union[str, "_models.TransferStatus"]] = None + self.recipient_email_id: Optional[str] = None + self.initiator_email_id: Optional[str] = None + self.canceled_by: Optional[str] = None + self.detailed_transfer_status: Optional[List["_models.DetailedTransferStatus"]] = None class TransferDetailsListResult(_serialization.Model): @@ -13035,8 +13043,8 @@ class TransferDetailsListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.TransferDetails"]] = None + self.next_link: Optional[str] = None class TransferError(_serialization.Model): @@ -13063,8 +13071,8 @@ class TransferError(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.code = None - self.message = None + self.code: Optional[str] = None + self.message: Optional[str] = None class TransferItemQueryParameter(_serialization.Model): @@ -13113,8 +13121,8 @@ class TransitionDetails(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.transition_date = None - self.anniversary_day = None + self.transition_date: Optional[datetime.datetime] = None + self.anniversary_day: Optional[int] = None class Utilization(_serialization.Model): @@ -13143,7 +13151,7 @@ def __init__(self, *, aggregates: Optional[List["_models.UtilizationAggregates"] :paramtype aggregates: list[~azure.mgmt.billing.models.UtilizationAggregates] """ super().__init__(**kwargs) - self.trend = None + self.trend: Optional[str] = None self.aggregates = aggregates @@ -13179,10 +13187,10 @@ class UtilizationAggregates(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.grain = None - self.grain_unit = None - self.value = None - self.value_unit = None + self.grain: Optional[float] = None + self.grain_unit: Optional[str] = None + self.value: Optional[float] = None + self.value_unit: Optional[str] = None class ValidateTransferListResponse(_serialization.Model): @@ -13205,7 +13213,7 @@ class ValidateTransferListResponse(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[List["_models.ValidateTransferResponse"]] = None class ValidateTransferResponse(_serialization.Model): @@ -13238,8 +13246,8 @@ def __init__(self, *, results: Optional[List["_models.ValidationResultProperties :paramtype results: list[~azure.mgmt.billing.models.ValidationResultProperties] """ super().__init__(**kwargs) - self.status = None - self.product_id = None + self.status: Optional[str] = None + self.product_id: Optional[str] = None self.results = results @@ -13271,6 +13279,6 @@ class ValidationResultProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.level = None - self.code = None - self.message = None + self.level: Optional[str] = None + self.code: Optional[str] = None + self.message: Optional[str] = None diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py index 5239c254e4be..3dad78203a50 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/__init__.py @@ -5,40 +5,46 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._agreements_operations import AgreementsOperations -from ._associated_tenants_operations import AssociatedTenantsOperations -from ._available_balances_operations import AvailableBalancesOperations -from ._billing_accounts_operations import BillingAccountsOperations -from ._address_operations import AddressOperations -from ._billing_permissions_operations import BillingPermissionsOperations -from ._billing_profiles_operations import BillingProfilesOperations -from ._billing_property_operations import BillingPropertyOperations -from ._billing_requests_operations import BillingRequestsOperations -from ._billing_role_assignments_operations import BillingRoleAssignmentsOperations -from ._billing_role_definition_operations import BillingRoleDefinitionOperations -from ._savings_plan_orders_operations import SavingsPlanOrdersOperations -from ._savings_plans_operations import SavingsPlansOperations -from ._billing_subscriptions_operations import BillingSubscriptionsOperations -from ._billing_subscriptions_aliases_operations import BillingSubscriptionsAliasesOperations -from ._customers_operations import CustomersOperations -from ._departments_operations import DepartmentsOperations -from ._enrollment_accounts_operations import EnrollmentAccountsOperations -from ._invoices_operations import InvoicesOperations -from ._invoice_sections_operations import InvoiceSectionsOperations -from ._operations import Operations -from ._payment_methods_operations import PaymentMethodsOperations -from ._policies_operations import PoliciesOperations -from ._products_operations import ProductsOperations -from ._reservations_operations import ReservationsOperations -from ._reservation_orders_operations import ReservationOrdersOperations -from ._transactions_operations import TransactionsOperations -from ._transfers_operations import TransfersOperations -from ._partner_transfers_operations import PartnerTransfersOperations -from ._recipient_transfers_operations import RecipientTransfersOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._agreements_operations import AgreementsOperations # type: ignore +from ._associated_tenants_operations import AssociatedTenantsOperations # type: ignore +from ._available_balances_operations import AvailableBalancesOperations # type: ignore +from ._billing_accounts_operations import BillingAccountsOperations # type: ignore +from ._address_operations import AddressOperations # type: ignore +from ._billing_permissions_operations import BillingPermissionsOperations # type: ignore +from ._billing_profiles_operations import BillingProfilesOperations # type: ignore +from ._billing_property_operations import BillingPropertyOperations # type: ignore +from ._billing_requests_operations import BillingRequestsOperations # type: ignore +from ._billing_role_assignments_operations import BillingRoleAssignmentsOperations # type: ignore +from ._billing_role_definition_operations import BillingRoleDefinitionOperations # type: ignore +from ._savings_plan_orders_operations import SavingsPlanOrdersOperations # type: ignore +from ._savings_plans_operations import SavingsPlansOperations # type: ignore +from ._billing_subscriptions_operations import BillingSubscriptionsOperations # type: ignore +from ._billing_subscriptions_aliases_operations import BillingSubscriptionsAliasesOperations # type: ignore +from ._customers_operations import CustomersOperations # type: ignore +from ._departments_operations import DepartmentsOperations # type: ignore +from ._enrollment_accounts_operations import EnrollmentAccountsOperations # type: ignore +from ._invoices_operations import InvoicesOperations # type: ignore +from ._invoice_sections_operations import InvoiceSectionsOperations # type: ignore +from ._operations import Operations # type: ignore +from ._payment_methods_operations import PaymentMethodsOperations # type: ignore +from ._policies_operations import PoliciesOperations # type: ignore +from ._products_operations import ProductsOperations # type: ignore +from ._reservations_operations import ReservationsOperations # type: ignore +from ._reservation_orders_operations import ReservationOrdersOperations # type: ignore +from ._transactions_operations import TransactionsOperations # type: ignore +from ._transfers_operations import TransfersOperations # type: ignore +from ._partner_transfers_operations import PartnerTransfersOperations # type: ignore +from ._recipient_transfers_operations import RecipientTransfersOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -73,5 +79,5 @@ "PartnerTransfersOperations", "RecipientTransfersOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_address_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_address_operations.py index 93394751345c..78c9efe26ea1 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_address_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_address_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +25,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -74,10 +71,10 @@ class AddressOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def validate( @@ -136,7 +133,7 @@ def validate( :rtype: ~azure.mgmt.billing.models.AddressValidationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_agreements_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_agreements_operations.py index d94929e73bd9..97b9b8ea5291 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_agreements_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_agreements_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +47,7 @@ def build_get_request(billing_account_name: str, agreement_name: str, **kwargs: # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements/{agreementName}" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -118,10 +116,10 @@ class AgreementsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, billing_account_name: str, agreement_name: str, **kwargs: Any) -> _models.Agreement: @@ -138,7 +136,7 @@ def get(self, billing_account_name: str, agreement_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.billing.models.Agreement :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -203,7 +201,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AgreementListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_associated_tenants_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_associated_tenants_operations.py index 20984e99a8a9..e4724de8b665 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_associated_tenants_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_associated_tenants_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +53,7 @@ def build_delete_request(billing_account_name: str, associated_tenant_name: str, _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -93,7 +91,7 @@ def build_get_request(billing_account_name: str, associated_tenant_name: str, ** _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -134,7 +132,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -233,13 +231,13 @@ class AssociatedTenantsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _delete_initial(self, billing_account_name: str, associated_tenant_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -363,7 +361,7 @@ def get(self, billing_account_name: str, associated_tenant_name: str, **kwargs: :rtype: ~azure.mgmt.billing.models.AssociatedTenant :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -412,7 +410,7 @@ def _create_or_update_initial( parameters: Union[_models.AssociatedTenant, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -663,7 +661,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AssociatedTenantListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_available_balances_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_available_balances_operations.py index 10df377e8ad2..74f4e99b9d8b 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_available_balances_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_available_balances_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -24,12 +25,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +45,7 @@ def build_get_by_billing_account_request(billing_account_name: str, **kwargs: An # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/availableBalance/default" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -81,7 +79,7 @@ def build_get_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/availableBalance/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -119,10 +117,10 @@ class AvailableBalancesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) -> _models.AvailableBalance: @@ -141,7 +139,7 @@ def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.billing.models.AvailableBalance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -202,7 +200,7 @@ def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.AvailableBalance :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_accounts_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_accounts_operations.py index 7ab06ad69d78..1f8e2afac3e1 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_accounts_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_accounts_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -32,12 +33,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -159,7 +157,7 @@ def build_list_invoice_sections_by_create_subscription_permission_request( # py _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/listInvoiceSectionsWithCreateSubscriptionPermission", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -193,7 +191,7 @@ def build_validate_payment_terms_request(billing_account_name: str, **kwargs: An # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/validatePaymentTerms" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -353,15 +351,15 @@ class BillingAccountsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _add_payment_terms_initial( self, billing_account_name: str, parameters: Union[List[_models.PaymentTerm], IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -552,7 +550,7 @@ def get_long_running_output(pipeline_response): def _cancel_payment_terms_initial( self, billing_account_name: str, parameters: datetime.datetime, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -690,7 +688,7 @@ def confirm_transition(self, billing_account_name: str, **kwargs: Any) -> _model :rtype: ~azure.mgmt.billing.models.TransitionDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -759,7 +757,7 @@ def list_invoice_sections_by_create_subscription_permission( # pylint: disable= api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceSectionWithCreateSubPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -889,7 +887,7 @@ def validate_payment_terms( :rtype: ~azure.mgmt.billing.models.PaymentTermsEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -955,7 +953,7 @@ def get(self, billing_account_name: str, **kwargs: Any) -> _models.BillingAccoun :rtype: ~azure.mgmt.billing.models.BillingAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -999,7 +997,7 @@ def get(self, billing_account_name: str, **kwargs: Any) -> _models.BillingAccoun def _update_initial( self, billing_account_name: str, parameters: Union[_models.BillingAccountPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1263,7 +1261,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_permissions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_permissions_operations.py index 9152a8cecb06..61ed468d57ca 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_permissions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_permissions_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -84,7 +82,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingPermissions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -122,7 +120,7 @@ def build_check_access_by_billing_profile_request( # pylint: disable=name-too-l _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/checkAccess", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -161,7 +159,7 @@ def build_list_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingPermissions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -200,7 +198,7 @@ def build_check_access_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/checkAccess", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -240,7 +238,7 @@ def build_list_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingPermissions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -281,7 +279,7 @@ def build_check_access_by_invoice_section_request( # pylint: disable=name-too-l _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/checkAccess", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -357,7 +355,7 @@ def build_list_by_customer_at_billing_account_request( # pylint: disable=name-t _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingPermissions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -390,7 +388,7 @@ def build_list_by_department_request(billing_account_name: str, department_name: _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingPermissions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -426,7 +424,7 @@ def build_check_access_by_department_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/checkAccess", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -463,7 +461,7 @@ def build_list_by_enrollment_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingPermissions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -501,7 +499,7 @@ def build_check_access_by_enrollment_account_request( # pylint: disable=name-to _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/checkAccess", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -541,10 +539,10 @@ class BillingPermissionsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_account( @@ -567,7 +565,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -651,7 +649,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -797,7 +795,7 @@ def check_access_by_billing_profile( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -876,7 +874,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1032,7 +1030,7 @@ def check_access_by_customer( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1112,7 +1110,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1268,7 +1266,7 @@ def check_access_by_invoice_section( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1390,7 +1388,7 @@ def check_access_by_billing_account( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1466,7 +1464,7 @@ def list_by_customer_at_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1551,7 +1549,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1697,7 +1695,7 @@ def check_access_by_department( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1774,7 +1772,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingPermissionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1920,7 +1918,7 @@ def check_access_by_enrollment_account( :rtype: list[~azure.mgmt.billing.models.CheckAccessResponse] :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_profiles_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_profiles_operations.py index c587239bf6d4..e3f2d836a143 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_profiles_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_profiles_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +55,7 @@ def build_validate_delete_eligibility_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/validateDeleteEligibility", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -92,7 +90,7 @@ def build_delete_request(billing_account_name: str, billing_profile_name: str, * _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -127,7 +125,7 @@ def build_get_request(billing_account_name: str, billing_profile_name: str, **kw _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -163,7 +161,7 @@ def build_create_or_update_request(billing_account_name: str, billing_profile_na _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -259,10 +257,10 @@ class BillingProfilesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def validate_delete_eligibility( @@ -282,7 +280,7 @@ def validate_delete_eligibility( :rtype: ~azure.mgmt.billing.models.DeleteBillingProfileEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -325,7 +323,7 @@ def validate_delete_eligibility( return deserialized # type: ignore def _delete_initial(self, billing_account_name: str, billing_profile_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -451,7 +449,7 @@ def get(self, billing_account_name: str, billing_profile_name: str, **kwargs: An :rtype: ~azure.mgmt.billing.models.BillingProfile :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -500,7 +498,7 @@ def _create_or_update_initial( parameters: Union[_models.BillingProfile, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -759,7 +757,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingProfileListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_property_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_property_operations.py index 086f98520f82..d61bf3a65aa0 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_property_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_property_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +25,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -123,10 +120,10 @@ class BillingPropertyOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -148,7 +145,7 @@ def get( :rtype: ~azure.mgmt.billing.models.BillingProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -252,7 +249,7 @@ def update(self, parameters: Union[_models.BillingProperty, IO[bytes]], **kwargs :rtype: ~azure.mgmt.billing.models.BillingProperty :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_requests_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_requests_operations.py index 0f8b0711c3b4..d11f24ed9bc2 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_requests_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_requests_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -66,7 +64,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRequests", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -125,7 +123,7 @@ def build_list_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRequests", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -185,7 +183,7 @@ def build_list_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRequests", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -392,10 +390,10 @@ class BillingRequestsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_profile( @@ -448,7 +446,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -570,7 +568,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -693,7 +691,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -810,7 +808,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -890,7 +888,7 @@ def get(self, billing_request_name: str, **kwargs: Any) -> _models.BillingReques :rtype: ~azure.mgmt.billing.models.BillingRequest :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -934,7 +932,7 @@ def get(self, billing_request_name: str, **kwargs: Any) -> _models.BillingReques def _create_or_update_initial( self, billing_request_name: str, parameters: Union[_models.BillingRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1161,7 +1159,7 @@ def list_by_user( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRequestListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_assignments_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_assignments_operations.py index f3d466758fb3..ba5342c36311 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_assignments_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_assignments_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +55,7 @@ def build_delete_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -100,7 +98,7 @@ def build_get_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -149,7 +147,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -193,7 +191,7 @@ def build_create_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/createBillingRoleAssignment", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -236,7 +234,7 @@ def build_delete_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -284,7 +282,7 @@ def build_get_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -335,7 +333,7 @@ def build_list_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -380,7 +378,7 @@ def build_create_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/createBillingRoleAssignment", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -426,7 +424,7 @@ def build_resolve_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/resolveBillingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -474,7 +472,7 @@ def build_delete_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -524,7 +522,7 @@ def build_get_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -577,7 +575,7 @@ def build_list_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -624,7 +622,7 @@ def build_create_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/createBillingRoleAssignment", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -672,7 +670,7 @@ def build_resolve_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/resolveBillingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -723,7 +721,7 @@ def build_resolve_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/resolveBillingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -766,7 +764,7 @@ def build_delete_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -806,7 +804,7 @@ def build_get_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -847,7 +845,7 @@ def build_create_or_update_by_billing_account_request( # pylint: disable=name-t _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -893,7 +891,7 @@ def build_list_by_billing_account_request( # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -931,7 +929,7 @@ def build_create_by_billing_account_request(billing_account_name: str, **kwargs: # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -967,7 +965,7 @@ def build_delete_by_department_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1008,7 +1006,7 @@ def build_get_by_department_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1050,7 +1048,7 @@ def build_create_or_update_by_department_request( # pylint: disable=name-too-lo _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1091,7 +1089,7 @@ def build_list_by_department_request(billing_account_name: str, department_name: _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1126,7 +1124,7 @@ def build_delete_by_enrollment_account_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1169,7 +1167,7 @@ def build_get_by_enrollment_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1213,7 +1211,7 @@ def build_create_or_update_by_enrollment_account_request( # pylint: disable=nam _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleAssignments/{billingRoleAssignmentName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1258,7 +1256,7 @@ def build_list_by_enrollment_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1295,7 +1293,7 @@ def build_resolve_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/resolveBillingRoleAssignments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -1336,10 +1334,10 @@ class BillingRoleAssignmentsOperations: # pylint: disable=too-many-public-metho def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def delete_by_billing_profile( # pylint: disable=inconsistent-return-statements @@ -1362,7 +1360,7 @@ def delete_by_billing_profile( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1423,7 +1421,7 @@ def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1507,7 +1505,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1579,7 +1577,7 @@ def _create_by_billing_profile_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1808,7 +1806,7 @@ def delete_by_customer( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1876,7 +1874,7 @@ def get_by_customer( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1963,7 +1961,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2037,7 +2035,7 @@ def _create_by_customer_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2258,7 +2256,7 @@ def _resolve_by_customer_initial( filter: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2425,7 +2423,7 @@ def delete_by_invoice_section( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2493,7 +2491,7 @@ def get_by_invoice_section( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2580,7 +2578,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2654,7 +2652,7 @@ def _create_by_invoice_section_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2875,7 +2873,7 @@ def _resolve_by_invoice_section_initial( filter: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3022,7 +3020,7 @@ def _resolve_by_billing_profile_initial( filter: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3176,7 +3174,7 @@ def delete_by_billing_account( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3234,7 +3232,7 @@ def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3283,7 +3281,7 @@ def _create_or_update_by_billing_account_initial( # pylint: disable=name-too-lo parameters: Union[_models.BillingRoleAssignment, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3523,7 +3521,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3593,7 +3591,7 @@ def _create_by_billing_account_initial( parameters: Union[_models.BillingRoleAssignmentProperties, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3799,7 +3797,7 @@ def delete_by_department( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3859,7 +3857,7 @@ def get_by_department( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3910,7 +3908,7 @@ def _create_or_update_by_department_initial( parameters: Union[_models.BillingRoleAssignment, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4148,7 +4146,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4231,7 +4229,7 @@ def delete_by_enrollment_account( # pylint: disable=inconsistent-return-stateme :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4291,7 +4289,7 @@ def get_by_enrollment_account( :rtype: ~azure.mgmt.billing.models.BillingRoleAssignment :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4342,7 +4340,7 @@ def _create_or_update_by_enrollment_account_initial( # pylint: disable=name-too parameters: Union[_models.BillingRoleAssignment, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4580,7 +4578,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleAssignmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -4649,7 +4647,7 @@ def _resolve_by_billing_account_initial( filter: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_definition_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_definition_operations.py index 43f9403843d4..22dcd69e8051 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_definition_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_role_definition_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +50,7 @@ def build_get_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions/{roleDefinitionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -95,7 +93,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleDefinitions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -132,7 +130,7 @@ def build_get_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRoleDefinitions/{roleDefinitionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -176,7 +174,7 @@ def build_list_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingRoleDefinitions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -218,7 +216,7 @@ def build_get_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions/{roleDefinitionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -264,7 +262,7 @@ def build_list_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingRoleDefinitions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -304,7 +302,7 @@ def build_get_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/{roleDefinitionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -341,7 +339,7 @@ def build_list_by_billing_account_request(billing_account_name: str, **kwargs: A # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -375,7 +373,7 @@ def build_get_by_department_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleDefinitions/{roleDefinitionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -414,7 +412,7 @@ def build_list_by_department_request(billing_account_name: str, department_name: _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/billingRoleDefinitions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -449,7 +447,7 @@ def build_get_by_enrollment_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleDefinitions/{roleDefinitionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -492,7 +490,7 @@ def build_list_by_enrollment_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingRoleDefinitions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -530,10 +528,10 @@ class BillingRoleDefinitionOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_by_billing_profile( @@ -555,7 +553,7 @@ def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -624,7 +622,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -713,7 +711,7 @@ def get_by_customer( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -784,7 +782,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -874,7 +872,7 @@ def get_by_invoice_section( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -945,7 +943,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1027,7 +1025,7 @@ def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1093,7 +1091,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1174,7 +1172,7 @@ def get_by_department( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1242,7 +1240,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1324,7 +1322,7 @@ def get_by_enrollment_account( :rtype: ~azure.mgmt.billing.models.BillingRoleDefinition :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1392,7 +1390,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingRoleDefinitionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_aliases_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_aliases_operations.py index 9083cd014ecf..68bc3e6b91af 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_aliases_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_aliases_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +31,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +52,7 @@ def build_get_request(billing_account_name: str, alias_name: str, **kwargs: Any) _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptionAliases/{aliasName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "aliasName": _SERIALIZER.url("alias_name", alias_name, "str"), @@ -84,7 +81,7 @@ def build_create_or_update_request(billing_account_name: str, alias_name: str, * _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptionAliases/{aliasName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "aliasName": _SERIALIZER.url("alias_name", alias_name, "str"), @@ -124,7 +121,7 @@ def build_list_by_billing_account_request( # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptionAliases" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), } @@ -168,10 +165,10 @@ class BillingSubscriptionsAliasesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, billing_account_name: str, alias_name: str, **kwargs: Any) -> _models.BillingSubscriptionAlias: @@ -189,7 +186,7 @@ def get(self, billing_account_name: str, alias_name: str, **kwargs: Any) -> _mod :rtype: ~azure.mgmt.billing.models.BillingSubscriptionAlias :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -238,7 +235,7 @@ def _create_or_update_initial( parameters: Union[_models.BillingSubscriptionAlias, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -493,7 +490,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionAliasListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_operations.py index fdccdbd48a82..0d62113d1278 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_billing_subscriptions_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -62,7 +60,7 @@ def build_get_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions/{billingSubscriptionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), @@ -106,7 +104,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingSubscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), @@ -164,7 +162,7 @@ def build_list_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/billingSubscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), @@ -223,7 +221,7 @@ def build_list_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/billingSubscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), @@ -269,7 +267,7 @@ def build_cancel_request(billing_account_name: str, billing_subscription_name: s _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/cancel", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -300,7 +298,7 @@ def build_merge_request(billing_account_name: str, billing_subscription_name: st _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/merge", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -331,7 +329,7 @@ def build_move_request(billing_account_name: str, billing_subscription_name: str _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/move", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -362,7 +360,7 @@ def build_split_request(billing_account_name: str, billing_subscription_name: st _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/split", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -395,7 +393,7 @@ def build_validate_move_eligibility_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}/validateMoveEligibility", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -425,7 +423,7 @@ def build_delete_request(billing_account_name: str, billing_subscription_name: s _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -455,7 +453,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -486,7 +484,7 @@ def build_update_request(billing_account_name: str, billing_subscription_name: s _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions/{billingSubscriptionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingSubscriptionName": _SERIALIZER.url("billing_subscription_name", billing_subscription_name, "str"), @@ -529,7 +527,7 @@ def build_list_by_billing_account_request( # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), } @@ -591,7 +589,7 @@ def build_list_by_customer_at_billing_account_request( # pylint: disable=name-t _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/billingSubscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "customerName": _SERIALIZER.url("customer_name", customer_name, "str"), @@ -646,7 +644,7 @@ def build_list_by_enrollment_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}/billingSubscriptions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "enrollmentAccountName": _SERIALIZER.url( @@ -691,10 +689,10 @@ class BillingSubscriptionsOperations: # pylint: disable=too-many-public-methods def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_by_billing_profile( @@ -724,7 +722,7 @@ def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingSubscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -829,7 +827,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -962,7 +960,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1096,7 +1094,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1174,7 +1172,7 @@ def _cancel_initial( parameters: Union[_models.CancelSubscriptionRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1374,7 +1372,7 @@ def _merge_initial( parameters: Union[_models.BillingSubscriptionMergeRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1581,7 +1579,7 @@ def _move_initial( parameters: Union[_models.MoveBillingSubscriptionRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1792,7 +1790,7 @@ def _split_initial( parameters: Union[_models.BillingSubscriptionSplitRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2080,7 +2078,7 @@ def validate_move_eligibility( :rtype: ~azure.mgmt.billing.models.MoveBillingSubscriptionEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2137,7 +2135,7 @@ def validate_move_eligibility( def _delete_initial( self, billing_account_name: str, billing_subscription_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2268,7 +2266,7 @@ def get( :rtype: ~azure.mgmt.billing.models.BillingSubscription :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2318,7 +2316,7 @@ def _update_initial( parameters: Union[_models.BillingSubscriptionPatch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2580,7 +2578,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2711,7 +2709,7 @@ def list_by_customer_at_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2833,7 +2831,7 @@ def list_by_enrollment_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.BillingSubscriptionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_customers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_customers_operations.py index e76216c1ec89..1883f5e425ee 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_customers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_customers_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +50,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -100,7 +98,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -148,7 +146,7 @@ def build_get_by_billing_account_request(billing_account_name: str, customer_nam # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -238,10 +236,10 @@ class CustomersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -263,7 +261,7 @@ def get( :rtype: ~azure.mgmt.billing.models.Customer :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -361,7 +359,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CustomerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -446,7 +444,7 @@ def get_by_billing_account(self, billing_account_name: str, customer_name: str, :rtype: ~azure.mgmt.billing.models.Customer :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -540,7 +538,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.CustomerListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_departments_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_departments_operations.py index c0ea06a2ed7d..21888cd25e02 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_departments_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_departments_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +47,7 @@ def build_get_request(billing_account_name: str, department_name: str, **kwargs: # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -133,10 +131,10 @@ class DepartmentsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get(self, billing_account_name: str, department_name: str, **kwargs: Any) -> _models.Department: @@ -154,7 +152,7 @@ def get(self, billing_account_name: str, department_name: str, **kwargs: Any) -> :rtype: ~azure.mgmt.billing.models.Department :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -241,7 +239,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.DepartmentListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_enrollment_accounts_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_enrollment_accounts_operations.py index ad55392a68d5..94efb567a2ab 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_enrollment_accounts_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_enrollment_accounts_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +50,7 @@ def build_get_by_department_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/enrollmentAccounts/{enrollmentAccountName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -99,7 +97,7 @@ def build_list_by_department_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/departments/{departmentName}/enrollmentAccounts", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -144,7 +142,7 @@ def build_get_request(billing_account_name: str, enrollment_account_name: str, * _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -235,10 +233,10 @@ class EnrollmentAccountsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_by_department( @@ -260,7 +258,7 @@ def get_by_department( :rtype: ~azure.mgmt.billing.models.EnrollmentAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -355,7 +353,7 @@ def list_by_department( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EnrollmentAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -439,7 +437,7 @@ def get(self, billing_account_name: str, enrollment_account_name: str, **kwargs: :rtype: ~azure.mgmt.billing.models.EnrollmentAccount :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -530,7 +528,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EnrollmentAccountListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoice_sections_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoice_sections_operations.py index e9b0d4a3651b..4d970f81b9dc 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoice_sections_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoice_sections_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +55,7 @@ def build_validate_delete_eligibility_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/validateDeleteEligibility", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -97,7 +95,7 @@ def build_delete_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -137,7 +135,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -178,7 +176,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -230,7 +228,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -282,10 +280,10 @@ class InvoiceSectionsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def validate_delete_eligibility( @@ -307,7 +305,7 @@ def validate_delete_eligibility( :rtype: ~azure.mgmt.billing.models.DeleteInvoiceSectionEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -353,7 +351,7 @@ def validate_delete_eligibility( def _delete_initial( self, billing_account_name: str, billing_profile_name: str, invoice_section_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -489,7 +487,7 @@ def get( :rtype: ~azure.mgmt.billing.models.InvoiceSection :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -540,7 +538,7 @@ def _create_or_update_initial( parameters: Union[_models.InvoiceSection, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -807,7 +805,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceSectionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoices_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoices_operations.py index b05d70fd69a9..b41850645980 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoices_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_invoices_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,12 +6,13 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -32,12 +33,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -69,7 +67,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoices", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -155,7 +153,7 @@ def build_amend_request(billing_account_name: str, invoice_name: str, **kwargs: # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/amend" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -195,7 +193,7 @@ def build_download_by_billing_account_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/download", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -237,7 +235,7 @@ def build_download_summary_by_billing_account_request( # pylint: disable=name-t _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/downloadSummary", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -274,7 +272,7 @@ def build_get_by_billing_account_request(billing_account_name: str, invoice_name # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -372,7 +370,7 @@ def build_download_documents_by_billing_subscription_request( # pylint: disable _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/downloadDocuments", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url( "subscription_id", subscription_id, "str", pattern=r"^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$" @@ -405,7 +403,7 @@ def build_download_by_billing_subscription_request( # pylint: disable=name-too- _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}/download", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url( "subscription_id", subscription_id, "str", pattern=r"^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$" @@ -444,7 +442,7 @@ def build_get_by_billing_subscription_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url( "subscription_id", subscription_id, "str", pattern=r"^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$" @@ -491,7 +489,7 @@ def build_list_by_billing_subscription_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url( "subscription_id", subscription_id, "str", pattern=r"^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$" @@ -568,10 +566,10 @@ class InvoicesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_profile( @@ -634,7 +632,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -710,7 +708,7 @@ def _download_documents_by_billing_account_initial( # pylint: disable=name-too- parameters: Union[List[_models.DocumentDownloadRequest], IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -899,7 +897,7 @@ def get_long_running_output(pipeline_response): ) def _amend_initial(self, billing_account_name: str, invoice_name: str, **kwargs: Any) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1011,7 +1009,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent- def _download_by_billing_account_initial( self, billing_account_name: str, invoice_name: str, document_name: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1137,7 +1135,7 @@ def get_long_running_output(pipeline_response): def _download_summary_by_billing_account_initial( # pylint: disable=name-too-long self, billing_account_name: str, invoice_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1270,7 +1268,7 @@ def get_by_billing_account(self, billing_account_name: str, invoice_name: str, * :rtype: ~azure.mgmt.billing.models.Invoice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1369,7 +1367,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1441,7 +1439,7 @@ def get_next(next_link=None): def _download_documents_by_billing_subscription_initial( # pylint: disable=name-too-long self, parameters: Union[List[_models.DocumentDownloadRequest], IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1621,7 +1619,7 @@ def get_long_running_output(pipeline_response): def _download_by_billing_subscription_initial( # pylint: disable=name-too-long self, invoice_name: str, document_name: Optional[str] = None, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1755,7 +1753,7 @@ def get_by_billing_subscription(self, invoice_name: str, **kwargs: Any) -> _mode :rtype: ~azure.mgmt.billing.models.Invoice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1851,7 +1849,7 @@ def list_by_billing_subscription( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.InvoiceListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1934,7 +1932,7 @@ def get(self, invoice_name: str, **kwargs: Any) -> _models.Invoice: :rtype: ~azure.mgmt.billing.models.Invoice :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_operations.py index 0b3efbcb00d0..dc5301b30e54 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -72,10 +69,10 @@ class Operations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: @@ -94,7 +91,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_partner_transfers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_partner_transfers_operations.py index 9b0ae9ec1a43..d260832d52dc 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_partner_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_partner_transfers_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +51,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers/{transferName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -93,7 +91,7 @@ def build_initiate_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers/{transferName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -134,7 +132,7 @@ def build_cancel_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers/{transferName}/cancel", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -173,7 +171,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transfers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -212,10 +210,10 @@ class PartnerTransfersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -241,7 +239,7 @@ def get( :rtype: ~azure.mgmt.billing.models.PartnerTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -384,7 +382,7 @@ def initiate( :rtype: ~azure.mgmt.billing.models.PartnerTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -464,7 +462,7 @@ def cancel( :rtype: ~azure.mgmt.billing.models.PartnerTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -532,7 +530,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PartnerTransferDetailsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_payment_methods_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_payment_methods_operations.py index a29a2ab75baf..6d1e5d1eb564 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_payment_methods_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_payment_methods_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +50,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethodLinks", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), @@ -82,7 +80,7 @@ def build_get_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/paymentMethodLinks/{paymentMethodName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "billingProfileName": _SERIALIZER.url("billing_profile_name", billing_profile_name, "str"), @@ -139,7 +137,7 @@ def build_get_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/paymentMethods/{paymentMethodName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url("billing_account_name", billing_account_name, "str"), "paymentMethodName": _SERIALIZER.url("payment_method_name", payment_method_name, "str"), @@ -237,10 +235,10 @@ class PaymentMethodsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_profile( @@ -266,7 +264,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PaymentMethodLinksListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -348,7 +346,7 @@ def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.PaymentMethodLink :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -413,7 +411,7 @@ def list_by_billing_account(self, billing_account_name: str, **kwargs: Any) -> I api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PaymentMethodsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -492,7 +490,7 @@ def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.PaymentMethod :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -551,7 +549,7 @@ def list_by_user(self, **kwargs: Any) -> Iterable["_models.PaymentMethod"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PaymentMethodsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -626,7 +624,7 @@ def delete_by_user( # pylint: disable=inconsistent-return-statements :rtype: None :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -676,7 +674,7 @@ def get_by_user(self, payment_method_name: str, **kwargs: Any) -> _models.Paymen :rtype: ~azure.mgmt.billing.models.PaymentMethod :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_policies_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_policies_operations.py index abe7cb0faa0b..220e10eaa146 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_policies_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_policies_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterator, Optional, TypeVar, Union, cast, overload +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -29,12 +30,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +57,7 @@ def build_get_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/policies/{policyName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -99,7 +97,7 @@ def build_create_or_update_by_customer_request( # pylint: disable=name-too-long _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/policies/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -139,7 +137,7 @@ def build_get_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -177,7 +175,7 @@ def build_create_or_update_by_billing_profile_request( # pylint: disable=name-t _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/policies/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -216,7 +214,7 @@ def build_get_by_customer_at_billing_account_request( # pylint: disable=name-to _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -252,7 +250,7 @@ def build_create_or_update_by_customer_at_billing_account_request( # pylint: di _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/policies/default", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -383,10 +381,10 @@ class PoliciesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_by_customer( @@ -416,7 +414,7 @@ def get_by_customer( :rtype: ~azure.mgmt.billing.models.CustomerPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -468,7 +466,7 @@ def _create_or_update_by_customer_initial( parameters: Union[_models.CustomerPolicy, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -696,7 +694,7 @@ def get_by_billing_profile( :rtype: ~azure.mgmt.billing.models.BillingProfilePolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -745,7 +743,7 @@ def _create_or_update_by_billing_profile_initial( # pylint: disable=name-too-lo parameters: Union[_models.BillingProfilePolicy, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -962,7 +960,7 @@ def get_by_customer_at_billing_account( :rtype: ~azure.mgmt.billing.models.CustomerPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1011,7 +1009,7 @@ def _create_or_update_by_customer_at_billing_account_initial( # pylint: disable parameters: Union[_models.CustomerPolicy, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1223,7 +1221,7 @@ def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.billing.models.BillingAccountPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1267,7 +1265,7 @@ def get_by_billing_account(self, billing_account_name: str, **kwargs: Any) -> _m def _create_or_update_by_billing_account_initial( # pylint: disable=name-too-long self, billing_account_name: str, parameters: Union[_models.BillingAccountPolicy, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1457,7 +1455,7 @@ def get_by_subscription(self, **kwargs: Any) -> _models.SubscriptionPolicy: :rtype: ~azure.mgmt.billing.models.SubscriptionPolicy :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_products_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_products_operations.py index d1d67c5a133c..c8d55e291743 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_products_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_products_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -67,7 +65,7 @@ def build_list_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/products", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -128,7 +126,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/products", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -186,7 +184,7 @@ def build_list_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerName}/products", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -231,7 +229,7 @@ def build_move_request(billing_account_name: str, product_name: str, **kwargs: A # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/move" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -269,7 +267,7 @@ def build_validate_move_eligibility_request(billing_account_name: str, product_n _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}/validateMoveEligibility", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -305,7 +303,7 @@ def build_get_request(billing_account_name: str, product_name: str, **kwargs: An # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -340,7 +338,7 @@ def build_update_request(billing_account_name: str, product_name: str, **kwargs: # Construct URL _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/products/{productName}" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -431,10 +429,10 @@ class ProductsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_invoice_section( @@ -492,7 +490,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -614,7 +612,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -735,7 +733,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -810,7 +808,7 @@ def _move_initial( parameters: Union[_models.MoveProductRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1102,7 +1100,7 @@ def validate_move_eligibility( :rtype: ~azure.mgmt.billing.models.MoveProductEligibilityResult :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1172,7 +1170,7 @@ def get(self, billing_account_name: str, product_name: str, **kwargs: Any) -> _m :rtype: ~azure.mgmt.billing.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1298,7 +1296,7 @@ def update( :rtype: ~azure.mgmt.billing.models.Product :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1402,7 +1400,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProductListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_recipient_transfers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_recipient_transfers_operations.py index c86ac7527872..36052fd9eba0 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_recipient_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_recipient_transfers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines,too-many-statements # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -175,10 +172,10 @@ class RecipientTransfersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def accept( @@ -244,7 +241,7 @@ def accept( :rtype: ~azure.mgmt.billing.models.RecipientTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -367,7 +364,7 @@ def validate( :rtype: ~azure.mgmt.billing.models.ValidateTransferListResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -432,7 +429,7 @@ def decline(self, transfer_name: str, **kwargs: Any) -> _models.RecipientTransfe :rtype: ~azure.mgmt.billing.models.RecipientTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -485,7 +482,7 @@ def get(self, transfer_name: str, **kwargs: Any) -> _models.RecipientTransferDet :rtype: ~azure.mgmt.billing.models.RecipientTransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -543,7 +540,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.RecipientTransferDetails"]: api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecipientTransferDetailsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservation_orders_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservation_orders_operations.py index de5aecd10441..4e29c3af0eb8 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservation_orders_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservation_orders_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +50,7 @@ def build_get_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -134,10 +132,10 @@ class ReservationOrdersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_by_billing_account( @@ -158,7 +156,7 @@ def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.ReservationOrder :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -235,7 +233,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationOrderList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservations_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservations_operations.py index bb795e9ea4e5..a7a56413fd1c 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservations_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_reservations_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -117,7 +115,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/reservations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -171,7 +169,7 @@ def build_get_by_reservation_order_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -210,7 +208,7 @@ def build_update_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations/{reservationId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -248,7 +246,7 @@ def build_list_by_reservation_order_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservationOrders/{reservationOrderId}/reservations", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -284,10 +282,10 @@ class ReservationsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_billing_account( @@ -332,7 +330,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -445,7 +443,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -539,7 +537,7 @@ def get_by_reservation_order( :rtype: ~azure.mgmt.billing.models.Reservation :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -591,7 +589,7 @@ def _update_by_billing_account_initial( body: Union[_models.Patch, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -816,7 +814,7 @@ def list_by_reservation_order( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReservationList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plan_orders_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plan_orders_operations.py index 80c9755c013a..dc668ac8368e 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plan_orders_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plan_orders_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar +from collections.abc import MutableMapping +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +50,7 @@ def build_get_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -134,10 +132,10 @@ class SavingsPlanOrdersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get_by_billing_account( @@ -155,7 +153,7 @@ def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.SavingsPlanOrderModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -231,7 +229,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SavingsPlanOrderModelList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plans_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plans_operations.py index 47548d71bd47..a54487db0f40 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plans_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_savings_plans_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +55,7 @@ def build_list_by_savings_plan_order_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -148,7 +146,7 @@ def build_get_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -187,7 +185,7 @@ def build_update_by_billing_account_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -226,7 +224,7 @@ def build_validate_update_by_billing_account_request( # pylint: disable=name-to _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/validate", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -265,10 +263,10 @@ class SavingsPlansOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_savings_plan_order( @@ -290,7 +288,7 @@ def list_by_savings_plan_order( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SavingsPlanModelList] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -394,7 +392,7 @@ def list_by_billing_account( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SavingsPlanModelListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -484,7 +482,7 @@ def get_by_billing_account( :rtype: ~azure.mgmt.billing.models.SavingsPlanModel :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -536,7 +534,7 @@ def _update_by_billing_account_initial( body: Union[_models.SavingsPlanUpdateRequest, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -821,7 +819,7 @@ def validate_update_by_billing_account( :rtype: ~azure.mgmt.billing.models.SavingsPlanValidateResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transactions_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transactions_operations.py index 8742b2da003d..1f4955d162cc 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transactions_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transactions_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys -from typing import Any, Callable, Dict, Iterable, Iterator, Optional, Type, TypeVar, Union, cast +from typing import Any, Callable, Dict, Iterable, Iterator, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -70,7 +68,7 @@ def build_list_by_customer_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/customers/{customerName}/transactions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -136,7 +134,7 @@ def build_list_by_invoice_section_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transactions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -203,7 +201,7 @@ def build_list_by_billing_profile_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/transactions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -264,7 +262,7 @@ def build_list_by_invoice_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -316,7 +314,7 @@ def build_transactions_download_by_invoice_request( # pylint: disable=name-too- _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactionsDownload", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -361,7 +359,7 @@ def build_get_transaction_summary_by_invoice_request( # pylint: disable=name-to _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactionSummary", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -406,10 +404,10 @@ class TransactionsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_customer( @@ -480,7 +478,7 @@ def list_by_customer( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -621,7 +619,7 @@ def list_by_invoice_section( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -759,7 +757,7 @@ def list_by_billing_profile( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -882,7 +880,7 @@ def list_by_invoice( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransactionListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -953,7 +951,7 @@ def get_next(next_link=None): def _transactions_download_by_invoice_initial( # pylint: disable=name-too-long self, billing_account_name: str, invoice_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1099,7 +1097,7 @@ def get_transaction_summary_by_invoice( :rtype: ~azure.mgmt.billing.models.TransactionSummary :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transfers_operations.py b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transfers_operations.py index 411591bdfd08..a1328d38c512 100644 --- a/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/azure/mgmt/billing/operations/_transfers_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys -from typing import Any, Callable, Dict, IO, Iterable, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -27,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import BillingManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +51,7 @@ def build_get_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers/{transferName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -95,7 +93,7 @@ def build_initiate_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers/{transferName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -138,7 +136,7 @@ def build_cancel_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers/{transferName}/cancel", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -179,7 +177,7 @@ def build_list_request( _url = kwargs.pop( "template_url", "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/transfers", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "billingAccountName": _SERIALIZER.url( "billing_account_name", @@ -220,10 +218,10 @@ class TransfersOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: BillingManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( @@ -249,7 +247,7 @@ def get( :rtype: ~azure.mgmt.billing.models.TransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -392,7 +390,7 @@ def initiate( :rtype: ~azure.mgmt.billing.models.TransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -472,7 +470,7 @@ def cancel( :rtype: ~azure.mgmt.billing.models.TransferDetails :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -539,7 +537,7 @@ def list( api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TransferDetailsListResult] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_invalid.py b/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_invalid.py index 6deffaf1ca0e..9bb15e5c1c2c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_invalid.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_invalid.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_valid.py b/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_valid.py index 134d7af96abd..9dab240e98cd 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_valid.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/address_validate_valid.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/agreement_by_name.py b/sdk/billing/azure-mgmt-billing/generated_samples/agreement_by_name.py index dbac1fc3db0f..2f3468168148 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/agreement_by_name.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/agreement_by_name.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/agreements_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/agreements_list_by_billing_account.py index 092e7f39d302..64c5a697556f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/agreements_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/agreements_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_create_or_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_create_or_update.py index f79b0214430c..5ba25b19d80e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_create_or_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_delete.py b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_delete.py index 8da3ac635926..ac554c6ce8d2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_delete.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_get.py index 7beb2cc8d060..ea5b1dcc8ec5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_list_by_billing_account.py index 1ab71229a532..5e2ac7b6ad2f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/associated_tenants_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_account.py index 10ae858ae814..618c4fc6e169 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_profile.py index 561c7b53936c..066dc4c9f04d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/available_balance_get_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_for_legacy_account_details.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_for_legacy_account_details.py index 1676b22f24df..826aef9f9a92 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_for_legacy_account_details.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_for_legacy_account_details.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_update_with_po_number.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_update_with_po_number.py index 54ad15ccc4ec..17118e51c56e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_update_with_po_number.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_update_with_po_number.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_expand_for_po_number.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_expand_for_po_number.py index f821d004a97c..60574448f5f6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_expand_for_po_number.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_expand_for_po_number.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_default_type.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_default_type.py index d8d621a94f20..a8403d5740f8 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_default_type.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_default_type.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_type.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_type.py index b0be38a51cee..08cb515580cb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_type.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_account_with_registration_number_with_type.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_confirm_transition.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_confirm_transition.py index 16fa82558327..cce773495b76 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_confirm_transition.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_confirm_transition.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get.py index 96be4fc2f2fe..6d5de1fe7a38 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_ea.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_ea.py index 65238ff9ad0e..fbf01403071c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_ea.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_ea.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_with_expand.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_with_expand.py index 2268b2b703c1..928cbd5fe352 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_with_expand.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_get_with_expand.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list.py index d20a7a0a03a3..66b44a7c528a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list_with_expand_for_po_number.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list_with_expand_for_po_number.py index c102ceeb069a..c261f9433e16 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list_with_expand_for_po_number.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_list_with_expand_for_po_number.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_update.py index b32dad4b5f60..7ea66f26cdcf 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_accounts_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_account.py index 74587609dd47..33e47b614619 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_profile.py index c30ca57bd1a2..072c6644fb84 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer.py index 8715557365a7..9c7cae619835 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer_at_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer_at_billing_account.py index 9508c3d03229..c6b3f3e4442c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer_at_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_customer_at_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_department.py index a67b1421d918..af7b5ba1abf6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_enrollment_account.py index 63e2cd5e31ee..4181d8dd06cb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_invoice_section.py index 1f3f82dfd204..2a5547c391a2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_permissions_list_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_create_or_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_create_or_update.py index 7bede355780b..528affef605d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_create_or_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_delete.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_delete.py index 644e758db100..87be31f804e1 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_delete.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_get.py index f0846facdcb0..89b517e47107 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_list_by_billing_account.py index c4980a150d20..b91c2ccfeb2a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_failure.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_failure.py index e44b55b53fc0..2aead70dd60e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_failure.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_failure.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_success.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_success.py index 978f2696eede..0a078f0cbc68 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_success.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_profiles_validate_delete_eligibility_success.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mca.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mca.py index 0b2c9803a9de..d81caeef7400 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mca.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mca.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mosp.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mosp.py index 64d4c4e84756..830c0af170e6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mosp.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mosp.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mpa.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mpa.py index f513fba37d1e..1abc4f6ec52c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mpa.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_get_mpa.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_cost_center.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_cost_center.py index a9bdd67cc9b7..7c41cf20ef34 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_cost_center.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_cost_center.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_subscription_service_usage_address.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_subscription_service_usage_address.py index ca3c5002cc25..43458976659e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_subscription_service_usage_address.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_property_patch_subscription_service_usage_address.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_create_or_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_create_or_update.py index 5a7577341dca..f1416d5058f4 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_create_or_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_get.py index 95d9ffc18f85..387f27068c6a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_account.py index 8a8f0b6d06b3..c6c72d0277b9 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_profile.py index 46ee20d1e8a5..354cf5368453 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_customer.py index 673e6173e784..735eb42fff4c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_invoice_section.py index ecd5af37670c..f6423ca016a5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user.py index d476f415dc09..2ab93c90bb40 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user_with_filter.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user_with_filter.py index 32e5eb28507c..e87b1e91544d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user_with_filter.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_requests_list_by_user_with_filter.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_account.py index 5b3ac7d90f87..eb82b8e2a61e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_profile.py index 29090bd869d9..4d8380ee1f7e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_customer.py index cafbd9879d4a..ea329e7cddea 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_invoice_section.py index 40e04bf379d5..a3e953eaa4ef 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_billing_account.py index cf3d78630456..a3e7c6080f42 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_department.py index 522d825aa1da..f48fee916d3c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_enrollment_account.py index e4456676377c..e32714f438da 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_create_or_update_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_account.py index c088a03a0518..544617f16f3c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_profile.py index 7dc810900f0d..2fc5b01c3671 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_customer.py index d881476ca070..90ed93184048 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_department.py index e07522c8164a..d3d80af5bd8f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_enrollment_account.py index 4f63ad2e9138..c4fad43653cc 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_invoice_section.py index d53c26239fb1..76addefb33d0 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_delete_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_account.py index f71bd90b98f5..f0c0925b7c4b 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_profile.py index d5bcae78855a..85babc5a8c13 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_customer.py index ab8a0c9b683c..f00e30ff3163 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_department.py index 5d71d7736069..4c2fc25d5ea8 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_enrollment_account.py index 49a256a82387..ffd451e7a4b7 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_invoice_section.py index 5ea4612c2c69..51d7b9f7f581 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_get_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_account.py index d5f80015cea6..a513f3644b5e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_profile.py index 3b8f343f8ddd..c2daff9c8ed6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_customer.py index 4c299cc9930e..144c8d1795c3 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_department.py index 60d743ca750a..96a21bc3f647 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_enrollment_account.py index cbc76ae234ec..96c3b7dbc3e8 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_invoice_section.py index 221969e78529..ae28ac50bf94 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_assignment_list_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_account.py index 285f3dd65db7..ea443bd3f7b5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_profile.py index e31b352d9361..b5eb7114f66a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_customer.py index 18071c130892..664baf4ec0cd 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_department.py index a37057bb5af1..e8a86c9c3783 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_enrollment_account.py index ab7a7799a19e..52af0fbad89e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_invoice_section.py index 6ad4ffa58e8d..32bd404f2832 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_get_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_account.py index 7b4fd153b8c4..67eb452e3694 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_profile.py index eb63b124322a..8154c235d63c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_customer.py index ef40d3b78327..6d72c444d985 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_department.py index 1e0996421816..616d26aa4bc6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_enrollment_account.py index 409421c94883..b80a13864e58 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_invoice_section.py index 8df083b880ea..857f348a291b 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_role_definition_list_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_create_or_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_create_or_update.py index 07ffbe2d0735..784483a48e49 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_create_or_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_get.py index 6c22ed7738ea..83a352c60629 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_list.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_list.py index 590a36b59511..78e4a8153a12 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_list.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_alias_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_get_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_get_by_billing_profile.py index 49db7faec608..92b0f96f74eb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_get_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_get_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_move.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_move.py index a3df66d24691..65a08a548e5c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_move.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_move.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_failure.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_failure.py index c55b862bb506..7d0fbb199daf 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_failure.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_failure.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_success.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_success.py index defc279538e6..2a3ad3173615 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_success.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscription_validate_move_success.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_cancel.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_cancel.py index a400bfce036f..356fa0b296c4 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_cancel.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_cancel.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_delete.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_delete.py index d73af4480cfc..bff6386bd02d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_delete.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_get.py index 02b471c22baf..b8b72d3d2439 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_account.py index 06423a6d6b66..a9038d0dd00b 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_ea.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_ea.py index bad701cdd57f..98f2690b32dd 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_ea.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_ea.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_mca.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_mca.py index 8f58eb0246db..86a0fbad065e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_mca.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_billing_profile_mca.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer.py index b3fb35ce006e..2bace5b4ba66 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer_at_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer_at_billing_account.py index a753e733d709..0869153dae97 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer_at_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_customer_at_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_enrollment_account.py index f2a0a325f249..808a79a04d1c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_invoice_section.py index a5d18a723dde..c610d340e8c1 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_list_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_merge.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_merge.py index f53ea5c5b4f4..dc7837e5d0b2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_merge.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_merge.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_split.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_split.py index 05604d80c0d2..bdafdeb7f455 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_split.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_split.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_update.py index d72ae99530a5..2b118a1e9eb2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/billing_subscriptions_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_account.py index 81ca219a6b30..4a5347cd0999 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_profile.py index 7a65689c1227..8308df556e8f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_customer.py index 75b392e21099..f1688e24a84c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_department.py index 9f68b6bbb4c1..b9d87f6b4eef 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_enrollment_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_enrollment_account.py index 94f4b2df7ec0..2fea73e7a0cc 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_enrollment_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_enrollment_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_invoice_section.py index d34325e63dd5..ea95e317eeb0 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/check_access_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/customers_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/customers_get.py index c6b78381cba0..d5e6a68abe6c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/customers_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/customers_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/customers_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/customers_get_by_billing_account.py index 818216db7a43..e2c9ae8f03ed 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/customers_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/customers_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account.py index 8e6d1f673ed9..4405e8bfccff 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account_with_expand.py b/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account_with_expand.py index d1daab15cf61..c54718a7a5e0 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account_with_expand.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_account_with_expand.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_profile.py index 57cad1d1db50..e870494a8354 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/customers_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/department_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/department_get.py index 59e4327ca9a2..61969a90d20c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/department_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/department_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/departments_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/departments_list_by_billing_account.py index 5387adee43fe..023529547acd 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/departments_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/departments_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_by_department.py index e20949cce3bc..59a9cfecd056 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_get.py index 57ebbf40f9a5..bd3060ea0ab5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_account_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_billing_account.py index 3f4f4a307ad2..dc5c7c9bb640 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_department.py b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_department.py index c162d62c4a1c..e5fa64afa523 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_department.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/enrollment_accounts_list_by_department.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_create_or_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_create_or_update.py index 1f614b270f4a..6e894ea7d141 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_create_or_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_delete.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_delete.py index 10e6d2e98276..766df9a7e32a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_delete.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_delete.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_get.py index a309dc35e03f..2ebbee026987 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_list_by_billing_profile.py index c610b855071a..fb1a7a120365 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_failure.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_failure.py index 6b9c2be74655..ee5c6c49c131 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_failure.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_failure.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_success.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_success.py index ee1125895978..5295501a91af 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_success.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_validate_delete_eligibility_success.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_with_create_subscription_permission_list.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_with_create_subscription_permission_list.py index 7bdefeb26199..a202c45649c0 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_with_create_subscription_permission_list.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoice_sections_with_create_subscription_permission_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_amend.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_amend.py index 2e1ab7a79d04..a60813652d56 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_amend.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_amend.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_account.py index 682333e10e6a..6c2ebf322101 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_subscription.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_subscription.py index 38d330633764..499ad1fa5ba0 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_subscription.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_by_billing_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_account.py index 6b2c62a0da00..5ab3115a27fb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_subscription.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_subscription.py index baaf3365a923..85f74da9c008 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_subscription.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_documents_by_billing_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_summary_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_summary_by_billing_account.py index 5ff9e8bec19c..3475df6737ce 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_summary_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_download_summary_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get.py index c261e73e8120..f8e517e1ca8d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_account.py index 4595b22e66c1..e97b8830b86a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_subscription.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_subscription.py index 50a2f6cdc649..615fe5307da2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_subscription.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_get_by_billing_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_account.py index a49fa70d5099..61284c3db40f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_profile.py index 13b2949e8e33..caa91c3ff36f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_subscription.py b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_subscription.py index 82262faca240..eca34ae93f51 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_subscription.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/invoices_list_by_billing_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/operations_list.py b/sdk/billing/azure-mgmt-billing/generated_samples/operations_list.py index 740e3fded7ca..d6f8a5651f9f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/operations_list.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/operations_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_cancel.py b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_cancel.py index db430f3300aa..62562a627959 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_cancel.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_cancel.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_get.py index 5597d2485027..aec88bc8960b 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_initiate.py b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_initiate.py index 770fffa9d151..57c11a154726 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_initiate.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_initiate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_list.py b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_list.py index 9355d2d5d5b2..be54b35f58e6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_list.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/partner_transfers_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_delete_by_user.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_delete_by_user.py index f57babad4324..828ed82d653c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_delete_by_user.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_delete_by_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_account.py index 039b59b6fbc0..3282640b3333 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_profile.py index 08cd8aeb59d2..466485e67692 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_user.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_user.py index f84133aac868..c76546623ce6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_user.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_get_by_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_account.py index a83595760975..61c660322434 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_profile.py index 229b49728ba2..41e06f2610eb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_user.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_user.py index 657e61145105..8b8903404342 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_user.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_methods_list_by_user.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_invalid.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_invalid.py index 4f3b9df8b48a..e8bc7e41a7c3 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_invalid.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_invalid.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_valid.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_valid.py index d2d22108983d..439aa7022006 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_valid.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_term_valid.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_add.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_add.py index e74b04c8199f..90d58cddea75 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_add.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_add.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_cancel.py b/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_cancel.py index 28cf99eba66c..ab7f1ed22c46 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_cancel.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/payment_terms_cancel.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_account.py index 4d332f4b9f6c..1bfd1e3597b9 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_profile.py index 97e94b81a571..4c56d7f7da59 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer.py index 5dab4fc75d12..835aeff40507 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer_at_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer_at_billing_account.py index 60db85423117..c425c360a018 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer_at_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_customer_at_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_subscription.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_subscription.py index 1c16da61d780..3f3f9d4b38dd 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_subscription.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_get_by_subscription.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_account.py index fa466a716b6a..3480514c7872 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_profile.py index 21eff6a3243d..8d52b21637c5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer.py index d4340f843814..04703375307d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer_at_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer_at_billing_account.py index fa52623c2ff8..515e6bd0d417 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer_at_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/policies_put_by_customer_at_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/product_move.py b/sdk/billing/azure-mgmt-billing/generated_samples/product_move.py index 97e248d570e4..382f664152ef 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/product_move.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/product_move.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_failure.py b/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_failure.py index 2a18455537e8..ce5e0e59de14 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_failure.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_failure.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_success.py b/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_success.py index aaf7986aa910..7ad4c01203b6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_success.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/product_validate_move_success.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/products_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/products_get.py index f5fcac2cd313..3d068a4dd279 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/products_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/products_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_account.py index 7078cb52df2e..93db11419f9d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_profile.py index 351f892d0a10..34e277e80376 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_customer.py index 7299cde98a7a..735f586eb3ca 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_invoice_section.py index d6b4654e5959..a88b3f4a17c2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/products_list_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/products_update.py b/sdk/billing/azure-mgmt-billing/generated_samples/products_update.py index bce628a761ce..5c2c7c6752b6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/products_update.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/products_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_accept.py b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_accept.py index 51b423e6495c..5f2e4abd8f42 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_accept.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_accept.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_decline.py b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_decline.py index 0c4f5cb2484c..b05055a98d65 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_decline.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_decline.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_get.py index 8437c7b6df6a..953fd6c476fe 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_list.py b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_list.py index 3e757dff9fc3..056c845c96b5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_list.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_validate.py b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_validate.py index fe0628c2fd7e..af30e51c8647 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_validate.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/recipient_transfers_validate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account.py index 7cb6de393863..8d1d5c1db13b 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_management_group.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_management_group.py index af1a474daa1d..c0bf2698bed9 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_management_group.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_management_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_resource_group.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_resource_group.py index dac8fa7f012e..08136556523a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_resource_group.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_resource_group.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_scope.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_scope.py index d8d0d96ea5ad..883b72cbed0a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_scope.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_get_by_billing_account_single_scope.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account.py index 6030f3b1ca37..eea168293d75 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account_with_expand_plan_information.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account_with_expand_plan_information.py index 70db91d4fd0e..91d700bb736f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account_with_expand_plan_information.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_order_get_by_billing_account_with_expand_plan_information.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_orders_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_orders_list_by_billing_account.py index de803acf4c87..b7bd7c7fb9d8 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_orders_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_orders_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_update_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_update_by_billing_account.py index 590b2bfe8934..7ed1d1d405b1 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservation_update_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservation_update_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservations_get_from_order_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservations_get_from_order_by_billing_account.py index dacb13a99de0..c6884841a505 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservations_get_from_order_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservations_get_from_order_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_account.py index 7c3547ba8c2a..7958fc29d01d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_profile.py index 6734cf60b231..d7b2115f75a0 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/reservations_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_account.py index 59625af0269a..f23c7f682db2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_profile.py index 568d15b74222..42b98d0b1146 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_customer.py index d8b8664d3452..d77a821c5651 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_invoice_section.py index 7b848db4d32e..eeaaeb9efe29 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/resolve_billing_role_assignment_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_by_billing_account.py index a5aff63013d1..d7283f75c397 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_expand_renew_properties_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_expand_renew_properties_by_billing_account.py index 2510192a94e6..b63343596d1b 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_expand_renew_properties_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_get_expand_renew_properties_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_expanded_schedule_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_expanded_schedule_get_by_billing_account.py index b748eea28b06..086b2b73ce1a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_expanded_schedule_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_expanded_schedule_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_get_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_get_by_billing_account.py index 8f27c19cb5d3..0a4040c7dfd6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_get_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_get_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_list_by_billing_account.py index eaa204d2afe7..d6462107b96d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_order_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_update_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_update_by_billing_account.py index b62e2a1ce2a2..ea6cda9a87b2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_update_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_update_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_validate_update_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_validate_update_by_billing_account.py index fd4acfd752e5..6bd403fd5ffc 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_validate_update_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plan_validate_update_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_billing_account.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_billing_account.py index 59530edb23d8..532228e22114 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_billing_account.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_billing_account.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_savings_plan_orders.py b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_savings_plan_orders.py index c136ed713141..55524203e47d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_savings_plan_orders.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/savings_plans_list_by_savings_plan_orders.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transaction_summary_get_by_invoice.py b/sdk/billing/azure-mgmt-billing/generated_samples/transaction_summary_get_by_invoice.py index a8c45f012df9..0c67bba1ac80 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transaction_summary_get_by_invoice.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transaction_summary_get_by_invoice.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_download_by_invoice.py b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_download_by_invoice.py index 9d6c8228aa2b..cbecb4e2c34a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_download_by_invoice.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_download_by_invoice.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_billing_profile.py b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_billing_profile.py index e134cd034ac3..d87dc0a27341 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_billing_profile.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_billing_profile.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_customer.py b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_customer.py index cb97f8533896..34afeb83f1c5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_customer.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_customer.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice.py b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice.py index 18285f998a9f..d19dbfb1f6b9 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice_section.py b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice_section.py index 38986f163849..c5623d31bafe 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice_section.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transactions_list_by_invoice_section.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_cancel.py b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_cancel.py index dd69047b17ec..b60f75221ce1 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_cancel.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_cancel.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_get.py b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_get.py index e39953342695..9db290bd935d 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_get.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_get.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_initiate.py b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_initiate.py index 21ede4eeb41e..ed4aa55c6322 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_initiate.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_initiate.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_list.py b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_list.py index 000e01034071..61aec3071b79 100644 --- a/sdk/billing/azure-mgmt-billing/generated_samples/transfers_list.py +++ b/sdk/billing/azure-mgmt-billing/generated_samples/transfers_list.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/conftest.py b/sdk/billing/azure-mgmt-billing/generated_tests/conftest.py index 0983e431431f..a6cb2273b451 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/conftest.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/conftest.py @@ -18,7 +18,7 @@ load_dotenv() -# aovid record sensitive identity information in recordings +# For security, please avoid record sensitive identity information in recordings @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): billingmanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations.py index 465ef8a5be6d..651377a5e17f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate(self, resource_group): + def test_address_validate(self, resource_group): response = self.client.address.validate( parameters={ "addressLine1": "str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations_async.py index b5a6e8b670fe..94bfb4fa10bb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_address_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate(self, resource_group): + async def test_address_validate(self, resource_group): response = await self.client.address.validate( parameters={ "addressLine1": "str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations.py index 6eaa737bf5bc..097e03da8929 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_agreements_get(self, resource_group): response = self.client.agreements.get( billing_account_name="str", agreement_name="str", @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_agreements_list_by_billing_account(self, resource_group): response = self.client.agreements.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations_async.py index 90fd2d50faf5..07c692500d7f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_agreements_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_agreements_get(self, resource_group): response = await self.client.agreements.get( billing_account_name="str", agreement_name="str", @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_agreements_list_by_billing_account(self, resource_group): response = self.client.agreements.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations.py index 74ad56e5193a..23a1d1790ff9 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_associated_tenants_begin_delete(self, resource_group): response = self.client.associated_tenants.begin_delete( billing_account_name="str", associated_tenant_name="str", @@ -32,7 +32,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_associated_tenants_get(self, resource_group): response = self.client.associated_tenants.get( billing_account_name="str", associated_tenant_name="str", @@ -44,7 +44,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_associated_tenants_begin_create_or_update(self, resource_group): response = self.client.associated_tenants.begin_create_or_update( billing_account_name="str", associated_tenant_name="str", @@ -78,7 +78,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_associated_tenants_list_by_billing_account(self, resource_group): response = self.client.associated_tenants.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations_async.py index c350e5778aee..17b38612c0ec 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_associated_tenants_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_associated_tenants_begin_delete(self, resource_group): response = await ( await self.client.associated_tenants.begin_delete( billing_account_name="str", @@ -35,7 +35,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_associated_tenants_get(self, resource_group): response = await self.client.associated_tenants.get( billing_account_name="str", associated_tenant_name="str", @@ -47,7 +47,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_associated_tenants_begin_create_or_update(self, resource_group): response = await ( await self.client.associated_tenants.begin_create_or_update( billing_account_name="str", @@ -83,7 +83,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_associated_tenants_list_by_billing_account(self, resource_group): response = self.client.associated_tenants.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations.py index b32a5c605da7..e72c5c734e3e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_available_balances_get_by_billing_account(self, resource_group): response = self.client.available_balances.get_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -31,7 +31,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_profile(self, resource_group): + def test_available_balances_get_by_billing_profile(self, resource_group): response = self.client.available_balances.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations_async.py index fbde62c95abc..66c3948e30e1 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_available_balances_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_available_balances_get_by_billing_account(self, resource_group): response = await self.client.available_balances.get_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -32,7 +32,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_profile(self, resource_group): + async def test_available_balances_get_by_billing_profile(self, resource_group): response = await self.client.available_balances.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations.py index f822c04f7bf0..9a7099bdb8ef 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_add_payment_terms(self, resource_group): + def test_billing_accounts_begin_add_payment_terms(self, resource_group): response = self.client.billing_accounts.begin_add_payment_terms( billing_account_name="str", parameters=[ @@ -34,7 +34,7 @@ def test_begin_add_payment_terms(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_cancel_payment_terms(self, resource_group): + def test_billing_accounts_begin_cancel_payment_terms(self, resource_group): response = self.client.billing_accounts.begin_cancel_payment_terms( billing_account_name="str", parameters="2020-02-20 00:00:00", @@ -46,7 +46,7 @@ def test_begin_cancel_payment_terms(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_confirm_transition(self, resource_group): + def test_billing_accounts_confirm_transition(self, resource_group): response = self.client.billing_accounts.confirm_transition( billing_account_name="str", api_version="2024-04-01", @@ -57,7 +57,7 @@ def test_confirm_transition(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_invoice_sections_by_create_subscription_permission(self, resource_group): + def test_billing_accounts_list_invoice_sections_by_create_subscription_permission(self, resource_group): response = self.client.billing_accounts.list_invoice_sections_by_create_subscription_permission( billing_account_name="str", api_version="2024-04-01", @@ -68,7 +68,7 @@ def test_list_invoice_sections_by_create_subscription_permission(self, resource_ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate_payment_terms(self, resource_group): + def test_billing_accounts_validate_payment_terms(self, resource_group): response = self.client.billing_accounts.validate_payment_terms( billing_account_name="str", parameters=[ @@ -82,7 +82,7 @@ def test_validate_payment_terms(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_billing_accounts_get(self, resource_group): response = self.client.billing_accounts.get( billing_account_name="str", api_version="2024-04-01", @@ -93,7 +93,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_billing_accounts_begin_update(self, resource_group): response = self.client.billing_accounts.begin_update( billing_account_name="str", parameters={ @@ -173,7 +173,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_billing_accounts_list(self, resource_group): response = self.client.billing_accounts.list( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations_async.py index b0260ac3af56..72d59fe978ca 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_accounts_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_add_payment_terms(self, resource_group): + async def test_billing_accounts_begin_add_payment_terms(self, resource_group): response = await ( await self.client.billing_accounts.begin_add_payment_terms( billing_account_name="str", @@ -42,7 +42,7 @@ async def test_begin_add_payment_terms(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_cancel_payment_terms(self, resource_group): + async def test_billing_accounts_begin_cancel_payment_terms(self, resource_group): response = await ( await self.client.billing_accounts.begin_cancel_payment_terms( billing_account_name="str", @@ -56,7 +56,7 @@ async def test_begin_cancel_payment_terms(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_confirm_transition(self, resource_group): + async def test_billing_accounts_confirm_transition(self, resource_group): response = await self.client.billing_accounts.confirm_transition( billing_account_name="str", api_version="2024-04-01", @@ -67,7 +67,7 @@ async def test_confirm_transition(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_invoice_sections_by_create_subscription_permission(self, resource_group): + async def test_billing_accounts_list_invoice_sections_by_create_subscription_permission(self, resource_group): response = self.client.billing_accounts.list_invoice_sections_by_create_subscription_permission( billing_account_name="str", api_version="2024-04-01", @@ -78,7 +78,7 @@ async def test_list_invoice_sections_by_create_subscription_permission(self, res @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate_payment_terms(self, resource_group): + async def test_billing_accounts_validate_payment_terms(self, resource_group): response = await self.client.billing_accounts.validate_payment_terms( billing_account_name="str", parameters=[ @@ -92,7 +92,7 @@ async def test_validate_payment_terms(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_billing_accounts_get(self, resource_group): response = await self.client.billing_accounts.get( billing_account_name="str", api_version="2024-04-01", @@ -103,7 +103,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_billing_accounts_begin_update(self, resource_group): response = await ( await self.client.billing_accounts.begin_update( billing_account_name="str", @@ -185,7 +185,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_billing_accounts_list(self, resource_group): response = self.client.billing_accounts.list( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations.py index 2f09642d2908..317cdd99142e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_billing_permissions_list_by_billing_account(self, resource_group): response = self.client.billing_permissions.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -31,7 +31,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_billing_permissions_list_by_billing_profile(self, resource_group): response = self.client.billing_permissions.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -43,7 +43,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_check_access_by_billing_profile(self, resource_group): + def test_billing_permissions_check_access_by_billing_profile(self, resource_group): response = self.client.billing_permissions.check_access_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -56,7 +56,7 @@ def test_check_access_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer(self, resource_group): + def test_billing_permissions_list_by_customer(self, resource_group): response = self.client.billing_permissions.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -69,7 +69,7 @@ def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_check_access_by_customer(self, resource_group): + def test_billing_permissions_check_access_by_customer(self, resource_group): response = self.client.billing_permissions.check_access_by_customer( billing_account_name="str", billing_profile_name="str", @@ -83,7 +83,7 @@ def test_check_access_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice_section(self, resource_group): + def test_billing_permissions_list_by_invoice_section(self, resource_group): response = self.client.billing_permissions.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -96,7 +96,7 @@ def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_check_access_by_invoice_section(self, resource_group): + def test_billing_permissions_check_access_by_invoice_section(self, resource_group): response = self.client.billing_permissions.check_access_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -110,7 +110,7 @@ def test_check_access_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_check_access_by_billing_account(self, resource_group): + def test_billing_permissions_check_access_by_billing_account(self, resource_group): response = self.client.billing_permissions.check_access_by_billing_account( billing_account_name="str", parameters={"actions": ["str"]}, @@ -122,7 +122,7 @@ def test_check_access_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer_at_billing_account(self, resource_group): + def test_billing_permissions_list_by_customer_at_billing_account(self, resource_group): response = self.client.billing_permissions.list_by_customer_at_billing_account( billing_account_name="str", customer_name="str", @@ -134,7 +134,7 @@ def test_list_by_customer_at_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_department(self, resource_group): + def test_billing_permissions_list_by_department(self, resource_group): response = self.client.billing_permissions.list_by_department( billing_account_name="str", department_name="str", @@ -146,7 +146,7 @@ def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_check_access_by_department(self, resource_group): + def test_billing_permissions_check_access_by_department(self, resource_group): response = self.client.billing_permissions.check_access_by_department( billing_account_name="str", department_name="str", @@ -159,7 +159,7 @@ def test_check_access_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_enrollment_account(self, resource_group): + def test_billing_permissions_list_by_enrollment_account(self, resource_group): response = self.client.billing_permissions.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -171,7 +171,7 @@ def test_list_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_check_access_by_enrollment_account(self, resource_group): + def test_billing_permissions_check_access_by_enrollment_account(self, resource_group): response = self.client.billing_permissions.check_access_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations_async.py index 690b91035cee..deb8ab454ce8 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_permissions_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_billing_permissions_list_by_billing_account(self, resource_group): response = self.client.billing_permissions.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -32,7 +32,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_billing_permissions_list_by_billing_profile(self, resource_group): response = self.client.billing_permissions.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -44,7 +44,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_check_access_by_billing_profile(self, resource_group): + async def test_billing_permissions_check_access_by_billing_profile(self, resource_group): response = await self.client.billing_permissions.check_access_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -57,7 +57,7 @@ async def test_check_access_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer(self, resource_group): + async def test_billing_permissions_list_by_customer(self, resource_group): response = self.client.billing_permissions.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -70,7 +70,7 @@ async def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_check_access_by_customer(self, resource_group): + async def test_billing_permissions_check_access_by_customer(self, resource_group): response = await self.client.billing_permissions.check_access_by_customer( billing_account_name="str", billing_profile_name="str", @@ -84,7 +84,7 @@ async def test_check_access_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice_section(self, resource_group): + async def test_billing_permissions_list_by_invoice_section(self, resource_group): response = self.client.billing_permissions.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -97,7 +97,7 @@ async def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_check_access_by_invoice_section(self, resource_group): + async def test_billing_permissions_check_access_by_invoice_section(self, resource_group): response = await self.client.billing_permissions.check_access_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -111,7 +111,7 @@ async def test_check_access_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_check_access_by_billing_account(self, resource_group): + async def test_billing_permissions_check_access_by_billing_account(self, resource_group): response = await self.client.billing_permissions.check_access_by_billing_account( billing_account_name="str", parameters={"actions": ["str"]}, @@ -123,7 +123,7 @@ async def test_check_access_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer_at_billing_account(self, resource_group): + async def test_billing_permissions_list_by_customer_at_billing_account(self, resource_group): response = self.client.billing_permissions.list_by_customer_at_billing_account( billing_account_name="str", customer_name="str", @@ -135,7 +135,7 @@ async def test_list_by_customer_at_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_department(self, resource_group): + async def test_billing_permissions_list_by_department(self, resource_group): response = self.client.billing_permissions.list_by_department( billing_account_name="str", department_name="str", @@ -147,7 +147,7 @@ async def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_check_access_by_department(self, resource_group): + async def test_billing_permissions_check_access_by_department(self, resource_group): response = await self.client.billing_permissions.check_access_by_department( billing_account_name="str", department_name="str", @@ -160,7 +160,7 @@ async def test_check_access_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_enrollment_account(self, resource_group): + async def test_billing_permissions_list_by_enrollment_account(self, resource_group): response = self.client.billing_permissions.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -172,7 +172,7 @@ async def test_list_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_check_access_by_enrollment_account(self, resource_group): + async def test_billing_permissions_check_access_by_enrollment_account(self, resource_group): response = await self.client.billing_permissions.check_access_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations.py index 120d04703c36..e8eac9257f8f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate_delete_eligibility(self, resource_group): + def test_billing_profiles_validate_delete_eligibility(self, resource_group): response = self.client.billing_profiles.validate_delete_eligibility( billing_account_name="str", billing_profile_name="str", @@ -32,7 +32,7 @@ def test_validate_delete_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_billing_profiles_begin_delete(self, resource_group): response = self.client.billing_profiles.begin_delete( billing_account_name="str", billing_profile_name="str", @@ -44,7 +44,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_billing_profiles_get(self, resource_group): response = self.client.billing_profiles.get( billing_account_name="str", billing_profile_name="str", @@ -56,7 +56,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_billing_profiles_begin_create_or_update(self, resource_group): response = self.client.billing_profiles.begin_create_or_update( billing_account_name="str", billing_profile_name="str", @@ -180,7 +180,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_billing_profiles_list_by_billing_account(self, resource_group): response = self.client.billing_profiles.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations_async.py index c1bb6aa94329..492cb798a0ca 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_profiles_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate_delete_eligibility(self, resource_group): + async def test_billing_profiles_validate_delete_eligibility(self, resource_group): response = await self.client.billing_profiles.validate_delete_eligibility( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ async def test_validate_delete_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_billing_profiles_begin_delete(self, resource_group): response = await ( await self.client.billing_profiles.begin_delete( billing_account_name="str", @@ -47,7 +47,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_billing_profiles_get(self, resource_group): response = await self.client.billing_profiles.get( billing_account_name="str", billing_profile_name="str", @@ -59,7 +59,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_billing_profiles_begin_create_or_update(self, resource_group): response = await ( await self.client.billing_profiles.begin_create_or_update( billing_account_name="str", @@ -185,7 +185,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_billing_profiles_list_by_billing_account(self, resource_group): response = self.client.billing_profiles.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations.py index 9ef1866f7bc2..4382990943da 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_billing_property_get(self, resource_group): response = self.client.billing_property.get( api_version="2024-04-01", ) @@ -30,7 +30,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_billing_property_update(self, resource_group): response = self.client.billing_property.update( parameters={ "id": "str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations_async.py index 34f8f015b4cd..738768ab2af3 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_property_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_billing_property_get(self, resource_group): response = await self.client.billing_property.get( api_version="2024-04-01", ) @@ -31,7 +31,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_billing_property_update(self, resource_group): response = await self.client.billing_property.update( parameters={ "id": "str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations.py index 4ceea849264d..8b12ab0c4ecb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_billing_requests_list_by_billing_profile(self, resource_group): response = self.client.billing_requests.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -32,7 +32,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer(self, resource_group): + def test_billing_requests_list_by_customer(self, resource_group): response = self.client.billing_requests.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -45,7 +45,7 @@ def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice_section(self, resource_group): + def test_billing_requests_list_by_invoice_section(self, resource_group): response = self.client.billing_requests.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -58,7 +58,7 @@ def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_billing_requests_list_by_billing_account(self, resource_group): response = self.client.billing_requests.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -69,7 +69,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_billing_requests_get(self, resource_group): response = self.client.billing_requests.get( billing_request_name="str", api_version="2024-04-01", @@ -80,7 +80,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_billing_requests_begin_create_or_update(self, resource_group): response = self.client.billing_requests.begin_create_or_update( billing_request_name="str", parameters={ @@ -139,7 +139,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_user(self, resource_group): + def test_billing_requests_list_by_user(self, resource_group): response = self.client.billing_requests.list_by_user( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations_async.py index 0ff21dac2a32..1e19ae34544a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_requests_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_billing_requests_list_by_billing_profile(self, resource_group): response = self.client.billing_requests.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer(self, resource_group): + async def test_billing_requests_list_by_customer(self, resource_group): response = self.client.billing_requests.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ async def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice_section(self, resource_group): + async def test_billing_requests_list_by_invoice_section(self, resource_group): response = self.client.billing_requests.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -59,7 +59,7 @@ async def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_billing_requests_list_by_billing_account(self, resource_group): response = self.client.billing_requests.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -70,7 +70,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_billing_requests_get(self, resource_group): response = await self.client.billing_requests.get( billing_request_name="str", api_version="2024-04-01", @@ -81,7 +81,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_billing_requests_begin_create_or_update(self, resource_group): response = await ( await self.client.billing_requests.begin_create_or_update( billing_request_name="str", @@ -142,7 +142,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_user(self, resource_group): + async def test_billing_requests_list_by_user(self, resource_group): response = self.client.billing_requests.list_by_user( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations.py index 29643fa18348..aa255151ad74 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete_by_billing_profile(self, resource_group): + def test_billing_role_assignments_delete_by_billing_profile(self, resource_group): response = self.client.billing_role_assignments.delete_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ def test_delete_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_profile(self, resource_group): + def test_billing_role_assignments_get_by_billing_profile(self, resource_group): response = self.client.billing_role_assignments.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_billing_role_assignments_list_by_billing_profile(self, resource_group): response = self.client.billing_role_assignments.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -58,7 +58,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_by_billing_profile(self, resource_group): + def test_billing_role_assignments_begin_create_by_billing_profile(self, resource_group): response = self.client.billing_role_assignments.begin_create_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -102,7 +102,7 @@ def test_begin_create_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete_by_customer(self, resource_group): + def test_billing_role_assignments_delete_by_customer(self, resource_group): response = self.client.billing_role_assignments.delete_by_customer( billing_account_name="str", billing_profile_name="str", @@ -116,7 +116,7 @@ def test_delete_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_customer(self, resource_group): + def test_billing_role_assignments_get_by_customer(self, resource_group): response = self.client.billing_role_assignments.get_by_customer( billing_account_name="str", billing_profile_name="str", @@ -130,7 +130,7 @@ def test_get_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer(self, resource_group): + def test_billing_role_assignments_list_by_customer(self, resource_group): response = self.client.billing_role_assignments.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -143,7 +143,7 @@ def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_by_customer(self, resource_group): + def test_billing_role_assignments_begin_create_by_customer(self, resource_group): response = self.client.billing_role_assignments.begin_create_by_customer( billing_account_name="str", billing_profile_name="str", @@ -188,7 +188,7 @@ def test_begin_create_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_resolve_by_customer(self, resource_group): + def test_billing_role_assignments_begin_resolve_by_customer(self, resource_group): response = self.client.billing_role_assignments.begin_resolve_by_customer( billing_account_name="str", billing_profile_name="str", @@ -201,7 +201,7 @@ def test_begin_resolve_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete_by_invoice_section(self, resource_group): + def test_billing_role_assignments_delete_by_invoice_section(self, resource_group): response = self.client.billing_role_assignments.delete_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -215,7 +215,7 @@ def test_delete_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_invoice_section(self, resource_group): + def test_billing_role_assignments_get_by_invoice_section(self, resource_group): response = self.client.billing_role_assignments.get_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -229,7 +229,7 @@ def test_get_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice_section(self, resource_group): + def test_billing_role_assignments_list_by_invoice_section(self, resource_group): response = self.client.billing_role_assignments.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -242,7 +242,7 @@ def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_by_invoice_section(self, resource_group): + def test_billing_role_assignments_begin_create_by_invoice_section(self, resource_group): response = self.client.billing_role_assignments.begin_create_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -287,7 +287,7 @@ def test_begin_create_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_resolve_by_invoice_section(self, resource_group): + def test_billing_role_assignments_begin_resolve_by_invoice_section(self, resource_group): response = self.client.billing_role_assignments.begin_resolve_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -300,7 +300,7 @@ def test_begin_resolve_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_resolve_by_billing_profile(self, resource_group): + def test_billing_role_assignments_begin_resolve_by_billing_profile(self, resource_group): response = self.client.billing_role_assignments.begin_resolve_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -312,7 +312,7 @@ def test_begin_resolve_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete_by_billing_account(self, resource_group): + def test_billing_role_assignments_delete_by_billing_account(self, resource_group): response = self.client.billing_role_assignments.delete_by_billing_account( billing_account_name="str", billing_role_assignment_name="str", @@ -324,7 +324,7 @@ def test_delete_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_billing_role_assignments_get_by_billing_account(self, resource_group): response = self.client.billing_role_assignments.get_by_billing_account( billing_account_name="str", billing_role_assignment_name="str", @@ -336,7 +336,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update_by_billing_account(self, resource_group): + def test_billing_role_assignments_begin_create_or_update_by_billing_account(self, resource_group): response = self.client.billing_role_assignments.begin_create_or_update_by_billing_account( billing_account_name="str", billing_role_assignment_name="str", @@ -394,7 +394,7 @@ def test_begin_create_or_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_billing_role_assignments_list_by_billing_account(self, resource_group): response = self.client.billing_role_assignments.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -405,7 +405,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_by_billing_account(self, resource_group): + def test_billing_role_assignments_begin_create_by_billing_account(self, resource_group): response = self.client.billing_role_assignments.begin_create_by_billing_account( billing_account_name="str", parameters={ @@ -448,7 +448,7 @@ def test_begin_create_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete_by_department(self, resource_group): + def test_billing_role_assignments_delete_by_department(self, resource_group): response = self.client.billing_role_assignments.delete_by_department( billing_account_name="str", department_name="str", @@ -461,7 +461,7 @@ def test_delete_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_department(self, resource_group): + def test_billing_role_assignments_get_by_department(self, resource_group): response = self.client.billing_role_assignments.get_by_department( billing_account_name="str", department_name="str", @@ -474,7 +474,7 @@ def test_get_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update_by_department(self, resource_group): + def test_billing_role_assignments_begin_create_or_update_by_department(self, resource_group): response = self.client.billing_role_assignments.begin_create_or_update_by_department( billing_account_name="str", department_name="str", @@ -533,7 +533,7 @@ def test_begin_create_or_update_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_department(self, resource_group): + def test_billing_role_assignments_list_by_department(self, resource_group): response = self.client.billing_role_assignments.list_by_department( billing_account_name="str", department_name="str", @@ -545,7 +545,7 @@ def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete_by_enrollment_account(self, resource_group): + def test_billing_role_assignments_delete_by_enrollment_account(self, resource_group): response = self.client.billing_role_assignments.delete_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -558,7 +558,7 @@ def test_delete_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_enrollment_account(self, resource_group): + def test_billing_role_assignments_get_by_enrollment_account(self, resource_group): response = self.client.billing_role_assignments.get_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -571,7 +571,7 @@ def test_get_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update_by_enrollment_account(self, resource_group): + def test_billing_role_assignments_begin_create_or_update_by_enrollment_account(self, resource_group): response = self.client.billing_role_assignments.begin_create_or_update_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -630,7 +630,7 @@ def test_begin_create_or_update_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_enrollment_account(self, resource_group): + def test_billing_role_assignments_list_by_enrollment_account(self, resource_group): response = self.client.billing_role_assignments.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -642,7 +642,7 @@ def test_list_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_resolve_by_billing_account(self, resource_group): + def test_billing_role_assignments_begin_resolve_by_billing_account(self, resource_group): response = self.client.billing_role_assignments.begin_resolve_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations_async.py index abe3997b5c0c..b5e45e5a0231 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_assignments_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete_by_billing_profile(self, resource_group): + async def test_billing_role_assignments_delete_by_billing_profile(self, resource_group): response = await self.client.billing_role_assignments.delete_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ async def test_delete_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_profile(self, resource_group): + async def test_billing_role_assignments_get_by_billing_profile(self, resource_group): response = await self.client.billing_role_assignments.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -47,7 +47,7 @@ async def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_billing_role_assignments_list_by_billing_profile(self, resource_group): response = self.client.billing_role_assignments.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -59,7 +59,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_by_billing_profile(self, resource_group): + async def test_billing_role_assignments_begin_create_by_billing_profile(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_create_by_billing_profile( billing_account_name="str", @@ -105,7 +105,7 @@ async def test_begin_create_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete_by_customer(self, resource_group): + async def test_billing_role_assignments_delete_by_customer(self, resource_group): response = await self.client.billing_role_assignments.delete_by_customer( billing_account_name="str", billing_profile_name="str", @@ -119,7 +119,7 @@ async def test_delete_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_customer(self, resource_group): + async def test_billing_role_assignments_get_by_customer(self, resource_group): response = await self.client.billing_role_assignments.get_by_customer( billing_account_name="str", billing_profile_name="str", @@ -133,7 +133,7 @@ async def test_get_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer(self, resource_group): + async def test_billing_role_assignments_list_by_customer(self, resource_group): response = self.client.billing_role_assignments.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -146,7 +146,7 @@ async def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_by_customer(self, resource_group): + async def test_billing_role_assignments_begin_create_by_customer(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_create_by_customer( billing_account_name="str", @@ -193,7 +193,7 @@ async def test_begin_create_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_resolve_by_customer(self, resource_group): + async def test_billing_role_assignments_begin_resolve_by_customer(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_resolve_by_customer( billing_account_name="str", @@ -208,7 +208,7 @@ async def test_begin_resolve_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete_by_invoice_section(self, resource_group): + async def test_billing_role_assignments_delete_by_invoice_section(self, resource_group): response = await self.client.billing_role_assignments.delete_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -222,7 +222,7 @@ async def test_delete_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_invoice_section(self, resource_group): + async def test_billing_role_assignments_get_by_invoice_section(self, resource_group): response = await self.client.billing_role_assignments.get_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -236,7 +236,7 @@ async def test_get_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice_section(self, resource_group): + async def test_billing_role_assignments_list_by_invoice_section(self, resource_group): response = self.client.billing_role_assignments.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -249,7 +249,7 @@ async def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_by_invoice_section(self, resource_group): + async def test_billing_role_assignments_begin_create_by_invoice_section(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_create_by_invoice_section( billing_account_name="str", @@ -296,7 +296,7 @@ async def test_begin_create_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_resolve_by_invoice_section(self, resource_group): + async def test_billing_role_assignments_begin_resolve_by_invoice_section(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_resolve_by_invoice_section( billing_account_name="str", @@ -311,7 +311,7 @@ async def test_begin_resolve_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_resolve_by_billing_profile(self, resource_group): + async def test_billing_role_assignments_begin_resolve_by_billing_profile(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_resolve_by_billing_profile( billing_account_name="str", @@ -325,7 +325,7 @@ async def test_begin_resolve_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete_by_billing_account(self, resource_group): + async def test_billing_role_assignments_delete_by_billing_account(self, resource_group): response = await self.client.billing_role_assignments.delete_by_billing_account( billing_account_name="str", billing_role_assignment_name="str", @@ -337,7 +337,7 @@ async def test_delete_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_billing_role_assignments_get_by_billing_account(self, resource_group): response = await self.client.billing_role_assignments.get_by_billing_account( billing_account_name="str", billing_role_assignment_name="str", @@ -349,7 +349,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update_by_billing_account(self, resource_group): + async def test_billing_role_assignments_begin_create_or_update_by_billing_account(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_create_or_update_by_billing_account( billing_account_name="str", @@ -409,7 +409,7 @@ async def test_begin_create_or_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_billing_role_assignments_list_by_billing_account(self, resource_group): response = self.client.billing_role_assignments.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -420,7 +420,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_by_billing_account(self, resource_group): + async def test_billing_role_assignments_begin_create_by_billing_account(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_create_by_billing_account( billing_account_name="str", @@ -465,7 +465,7 @@ async def test_begin_create_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete_by_department(self, resource_group): + async def test_billing_role_assignments_delete_by_department(self, resource_group): response = await self.client.billing_role_assignments.delete_by_department( billing_account_name="str", department_name="str", @@ -478,7 +478,7 @@ async def test_delete_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_department(self, resource_group): + async def test_billing_role_assignments_get_by_department(self, resource_group): response = await self.client.billing_role_assignments.get_by_department( billing_account_name="str", department_name="str", @@ -491,7 +491,7 @@ async def test_get_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update_by_department(self, resource_group): + async def test_billing_role_assignments_begin_create_or_update_by_department(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_create_or_update_by_department( billing_account_name="str", @@ -552,7 +552,7 @@ async def test_begin_create_or_update_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_department(self, resource_group): + async def test_billing_role_assignments_list_by_department(self, resource_group): response = self.client.billing_role_assignments.list_by_department( billing_account_name="str", department_name="str", @@ -564,7 +564,7 @@ async def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete_by_enrollment_account(self, resource_group): + async def test_billing_role_assignments_delete_by_enrollment_account(self, resource_group): response = await self.client.billing_role_assignments.delete_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -577,7 +577,7 @@ async def test_delete_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_enrollment_account(self, resource_group): + async def test_billing_role_assignments_get_by_enrollment_account(self, resource_group): response = await self.client.billing_role_assignments.get_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -590,7 +590,7 @@ async def test_get_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update_by_enrollment_account(self, resource_group): + async def test_billing_role_assignments_begin_create_or_update_by_enrollment_account(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_create_or_update_by_enrollment_account( billing_account_name="str", @@ -651,7 +651,7 @@ async def test_begin_create_or_update_by_enrollment_account(self, resource_group @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_enrollment_account(self, resource_group): + async def test_billing_role_assignments_list_by_enrollment_account(self, resource_group): response = self.client.billing_role_assignments.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -663,7 +663,7 @@ async def test_list_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_resolve_by_billing_account(self, resource_group): + async def test_billing_role_assignments_begin_resolve_by_billing_account(self, resource_group): response = await ( await self.client.billing_role_assignments.begin_resolve_by_billing_account( billing_account_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations.py index 64d941e5ac51..f200a339f016 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_profile(self, resource_group): + def test_billing_role_definition_get_by_billing_profile(self, resource_group): response = self.client.billing_role_definition.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_billing_role_definition_list_by_billing_profile(self, resource_group): response = self.client.billing_role_definition.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -45,7 +45,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_customer(self, resource_group): + def test_billing_role_definition_get_by_customer(self, resource_group): response = self.client.billing_role_definition.get_by_customer( billing_account_name="str", billing_profile_name="str", @@ -59,7 +59,7 @@ def test_get_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer(self, resource_group): + def test_billing_role_definition_list_by_customer(self, resource_group): response = self.client.billing_role_definition.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -72,7 +72,7 @@ def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_invoice_section(self, resource_group): + def test_billing_role_definition_get_by_invoice_section(self, resource_group): response = self.client.billing_role_definition.get_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -86,7 +86,7 @@ def test_get_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice_section(self, resource_group): + def test_billing_role_definition_list_by_invoice_section(self, resource_group): response = self.client.billing_role_definition.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -99,7 +99,7 @@ def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_billing_role_definition_get_by_billing_account(self, resource_group): response = self.client.billing_role_definition.get_by_billing_account( billing_account_name="str", role_definition_name="str", @@ -111,7 +111,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_billing_role_definition_list_by_billing_account(self, resource_group): response = self.client.billing_role_definition.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -122,7 +122,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_department(self, resource_group): + def test_billing_role_definition_get_by_department(self, resource_group): response = self.client.billing_role_definition.get_by_department( billing_account_name="str", department_name="str", @@ -135,7 +135,7 @@ def test_get_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_department(self, resource_group): + def test_billing_role_definition_list_by_department(self, resource_group): response = self.client.billing_role_definition.list_by_department( billing_account_name="str", department_name="str", @@ -147,7 +147,7 @@ def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_enrollment_account(self, resource_group): + def test_billing_role_definition_get_by_enrollment_account(self, resource_group): response = self.client.billing_role_definition.get_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -160,7 +160,7 @@ def test_get_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_enrollment_account(self, resource_group): + def test_billing_role_definition_list_by_enrollment_account(self, resource_group): response = self.client.billing_role_definition.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations_async.py index b4a293a27c5f..60805b869895 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_role_definition_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_profile(self, resource_group): + async def test_billing_role_definition_get_by_billing_profile(self, resource_group): response = await self.client.billing_role_definition.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ async def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_billing_role_definition_list_by_billing_profile(self, resource_group): response = self.client.billing_role_definition.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_customer(self, resource_group): + async def test_billing_role_definition_get_by_customer(self, resource_group): response = await self.client.billing_role_definition.get_by_customer( billing_account_name="str", billing_profile_name="str", @@ -60,7 +60,7 @@ async def test_get_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer(self, resource_group): + async def test_billing_role_definition_list_by_customer(self, resource_group): response = self.client.billing_role_definition.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -73,7 +73,7 @@ async def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_invoice_section(self, resource_group): + async def test_billing_role_definition_get_by_invoice_section(self, resource_group): response = await self.client.billing_role_definition.get_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -87,7 +87,7 @@ async def test_get_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice_section(self, resource_group): + async def test_billing_role_definition_list_by_invoice_section(self, resource_group): response = self.client.billing_role_definition.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -100,7 +100,7 @@ async def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_billing_role_definition_get_by_billing_account(self, resource_group): response = await self.client.billing_role_definition.get_by_billing_account( billing_account_name="str", role_definition_name="str", @@ -112,7 +112,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_billing_role_definition_list_by_billing_account(self, resource_group): response = self.client.billing_role_definition.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -123,7 +123,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_department(self, resource_group): + async def test_billing_role_definition_get_by_department(self, resource_group): response = await self.client.billing_role_definition.get_by_department( billing_account_name="str", department_name="str", @@ -136,7 +136,7 @@ async def test_get_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_department(self, resource_group): + async def test_billing_role_definition_list_by_department(self, resource_group): response = self.client.billing_role_definition.list_by_department( billing_account_name="str", department_name="str", @@ -148,7 +148,7 @@ async def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_enrollment_account(self, resource_group): + async def test_billing_role_definition_get_by_enrollment_account(self, resource_group): response = await self.client.billing_role_definition.get_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", @@ -161,7 +161,7 @@ async def test_get_by_enrollment_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_enrollment_account(self, resource_group): + async def test_billing_role_definition_list_by_enrollment_account(self, resource_group): response = self.client.billing_role_definition.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations.py index bdd90d445a7f..36d98bd934ec 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_billing_subscriptions_aliases_get(self, resource_group): response = self.client.billing_subscriptions_aliases.get( billing_account_name="str", alias_name="str", @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_billing_subscriptions_aliases_begin_create_or_update(self, resource_group): response = self.client.billing_subscriptions_aliases.begin_create_or_update( billing_account_name="str", alias_name="str", @@ -112,7 +112,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_billing_subscriptions_aliases_list_by_billing_account(self, resource_group): response = self.client.billing_subscriptions_aliases.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations_async.py index 8eb20d371076..87dc3fff4be0 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_aliases_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_billing_subscriptions_aliases_get(self, resource_group): response = await self.client.billing_subscriptions_aliases.get( billing_account_name="str", alias_name="str", @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_billing_subscriptions_aliases_begin_create_or_update(self, resource_group): response = await ( await self.client.billing_subscriptions_aliases.begin_create_or_update( billing_account_name="str", @@ -115,7 +115,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_billing_subscriptions_aliases_list_by_billing_account(self, resource_group): response = self.client.billing_subscriptions_aliases.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations.py index 922221ecb7e4..785c6377babb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_profile(self, resource_group): + def test_billing_subscriptions_get_by_billing_profile(self, resource_group): response = self.client.billing_subscriptions.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_billing_subscriptions_list_by_billing_profile(self, resource_group): response = self.client.billing_subscriptions.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -45,7 +45,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer(self, resource_group): + def test_billing_subscriptions_list_by_customer(self, resource_group): response = self.client.billing_subscriptions.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -58,7 +58,7 @@ def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice_section(self, resource_group): + def test_billing_subscriptions_list_by_invoice_section(self, resource_group): response = self.client.billing_subscriptions.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -71,7 +71,7 @@ def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_cancel(self, resource_group): + def test_billing_subscriptions_begin_cancel(self, resource_group): response = self.client.billing_subscriptions.begin_cancel( billing_account_name="str", billing_subscription_name="str", @@ -84,7 +84,7 @@ def test_begin_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_merge(self, resource_group): + def test_billing_subscriptions_begin_merge(self, resource_group): response = self.client.billing_subscriptions.begin_merge( billing_account_name="str", billing_subscription_name="str", @@ -97,7 +97,7 @@ def test_begin_merge(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_move(self, resource_group): + def test_billing_subscriptions_begin_move(self, resource_group): response = self.client.billing_subscriptions.begin_move( billing_account_name="str", billing_subscription_name="str", @@ -110,7 +110,7 @@ def test_begin_move(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_split(self, resource_group): + def test_billing_subscriptions_begin_split(self, resource_group): response = self.client.billing_subscriptions.begin_split( billing_account_name="str", billing_subscription_name="str", @@ -129,7 +129,7 @@ def test_begin_split(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate_move_eligibility(self, resource_group): + def test_billing_subscriptions_validate_move_eligibility(self, resource_group): response = self.client.billing_subscriptions.validate_move_eligibility( billing_account_name="str", billing_subscription_name="str", @@ -142,7 +142,7 @@ def test_validate_move_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_billing_subscriptions_begin_delete(self, resource_group): response = self.client.billing_subscriptions.begin_delete( billing_account_name="str", billing_subscription_name="str", @@ -154,7 +154,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_billing_subscriptions_get(self, resource_group): response = self.client.billing_subscriptions.get( billing_account_name="str", billing_subscription_name="str", @@ -166,7 +166,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update(self, resource_group): + def test_billing_subscriptions_begin_update(self, resource_group): response = self.client.billing_subscriptions.begin_update( billing_account_name="str", billing_subscription_name="str", @@ -245,7 +245,7 @@ def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_billing_subscriptions_list_by_billing_account(self, resource_group): response = self.client.billing_subscriptions.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -256,7 +256,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer_at_billing_account(self, resource_group): + def test_billing_subscriptions_list_by_customer_at_billing_account(self, resource_group): response = self.client.billing_subscriptions.list_by_customer_at_billing_account( billing_account_name="str", customer_name="str", @@ -268,7 +268,7 @@ def test_list_by_customer_at_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_enrollment_account(self, resource_group): + def test_billing_subscriptions_list_by_enrollment_account(self, resource_group): response = self.client.billing_subscriptions.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations_async.py index 4a4e19375128..b60676f0d47c 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_billing_subscriptions_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_profile(self, resource_group): + async def test_billing_subscriptions_get_by_billing_profile(self, resource_group): response = await self.client.billing_subscriptions.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ async def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_billing_subscriptions_list_by_billing_profile(self, resource_group): response = self.client.billing_subscriptions.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer(self, resource_group): + async def test_billing_subscriptions_list_by_customer(self, resource_group): response = self.client.billing_subscriptions.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -59,7 +59,7 @@ async def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice_section(self, resource_group): + async def test_billing_subscriptions_list_by_invoice_section(self, resource_group): response = self.client.billing_subscriptions.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -72,7 +72,7 @@ async def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_cancel(self, resource_group): + async def test_billing_subscriptions_begin_cancel(self, resource_group): response = await ( await self.client.billing_subscriptions.begin_cancel( billing_account_name="str", @@ -87,7 +87,7 @@ async def test_begin_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_merge(self, resource_group): + async def test_billing_subscriptions_begin_merge(self, resource_group): response = await ( await self.client.billing_subscriptions.begin_merge( billing_account_name="str", @@ -102,7 +102,7 @@ async def test_begin_merge(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_move(self, resource_group): + async def test_billing_subscriptions_begin_move(self, resource_group): response = await ( await self.client.billing_subscriptions.begin_move( billing_account_name="str", @@ -117,7 +117,7 @@ async def test_begin_move(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_split(self, resource_group): + async def test_billing_subscriptions_begin_split(self, resource_group): response = await ( await self.client.billing_subscriptions.begin_split( billing_account_name="str", @@ -138,7 +138,7 @@ async def test_begin_split(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate_move_eligibility(self, resource_group): + async def test_billing_subscriptions_validate_move_eligibility(self, resource_group): response = await self.client.billing_subscriptions.validate_move_eligibility( billing_account_name="str", billing_subscription_name="str", @@ -151,7 +151,7 @@ async def test_validate_move_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_billing_subscriptions_begin_delete(self, resource_group): response = await ( await self.client.billing_subscriptions.begin_delete( billing_account_name="str", @@ -165,7 +165,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_billing_subscriptions_get(self, resource_group): response = await self.client.billing_subscriptions.get( billing_account_name="str", billing_subscription_name="str", @@ -177,7 +177,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update(self, resource_group): + async def test_billing_subscriptions_begin_update(self, resource_group): response = await ( await self.client.billing_subscriptions.begin_update( billing_account_name="str", @@ -258,7 +258,7 @@ async def test_begin_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_billing_subscriptions_list_by_billing_account(self, resource_group): response = self.client.billing_subscriptions.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -269,7 +269,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer_at_billing_account(self, resource_group): + async def test_billing_subscriptions_list_by_customer_at_billing_account(self, resource_group): response = self.client.billing_subscriptions.list_by_customer_at_billing_account( billing_account_name="str", customer_name="str", @@ -281,7 +281,7 @@ async def test_list_by_customer_at_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_enrollment_account(self, resource_group): + async def test_billing_subscriptions_list_by_enrollment_account(self, resource_group): response = self.client.billing_subscriptions.list_by_enrollment_account( billing_account_name="str", enrollment_account_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations.py index c5c3eecfbd5a..3ecabe4038af 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_customers_get(self, resource_group): response = self.client.customers.get( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_customers_list_by_billing_profile(self, resource_group): response = self.client.customers.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -45,7 +45,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_customers_get_by_billing_account(self, resource_group): response = self.client.customers.get_by_billing_account( billing_account_name="str", customer_name="str", @@ -57,7 +57,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_customers_list_by_billing_account(self, resource_group): response = self.client.customers.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations_async.py index 8347d58c43fb..01d36570cf02 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_customers_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_customers_get(self, resource_group): response = await self.client.customers.get( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_customers_list_by_billing_profile(self, resource_group): response = self.client.customers.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_customers_get_by_billing_account(self, resource_group): response = await self.client.customers.get_by_billing_account( billing_account_name="str", customer_name="str", @@ -58,7 +58,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_customers_list_by_billing_account(self, resource_group): response = self.client.customers.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations.py index 4811eba46811..9d31d28e7ac3 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_departments_get(self, resource_group): response = self.client.departments.get( billing_account_name="str", department_name="str", @@ -32,7 +32,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_departments_list_by_billing_account(self, resource_group): response = self.client.departments.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations_async.py index 1eca690c3e69..038a4e4a079b 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_departments_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_departments_get(self, resource_group): response = await self.client.departments.get( billing_account_name="str", department_name="str", @@ -33,7 +33,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_departments_list_by_billing_account(self, resource_group): response = self.client.departments.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations.py index 5b0bca524218..637c5c8bbb6f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_department(self, resource_group): + def test_enrollment_accounts_get_by_department(self, resource_group): response = self.client.enrollment_accounts.get_by_department( billing_account_name="str", department_name="str", @@ -33,7 +33,7 @@ def test_get_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_department(self, resource_group): + def test_enrollment_accounts_list_by_department(self, resource_group): response = self.client.enrollment_accounts.list_by_department( billing_account_name="str", department_name="str", @@ -45,7 +45,7 @@ def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_enrollment_accounts_get(self, resource_group): response = self.client.enrollment_accounts.get( billing_account_name="str", enrollment_account_name="str", @@ -57,7 +57,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_enrollment_accounts_list_by_billing_account(self, resource_group): response = self.client.enrollment_accounts.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations_async.py index ad850cbcfab4..17c8560871c5 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_enrollment_accounts_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_department(self, resource_group): + async def test_enrollment_accounts_get_by_department(self, resource_group): response = await self.client.enrollment_accounts.get_by_department( billing_account_name="str", department_name="str", @@ -34,7 +34,7 @@ async def test_get_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_department(self, resource_group): + async def test_enrollment_accounts_list_by_department(self, resource_group): response = self.client.enrollment_accounts.list_by_department( billing_account_name="str", department_name="str", @@ -46,7 +46,7 @@ async def test_list_by_department(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_enrollment_accounts_get(self, resource_group): response = await self.client.enrollment_accounts.get( billing_account_name="str", enrollment_account_name="str", @@ -58,7 +58,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_enrollment_accounts_list_by_billing_account(self, resource_group): response = self.client.enrollment_accounts.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations.py index 5a2b2ad14a60..49e855bb84d1 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate_delete_eligibility(self, resource_group): + def test_invoice_sections_validate_delete_eligibility(self, resource_group): response = self.client.invoice_sections.validate_delete_eligibility( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ def test_validate_delete_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_delete(self, resource_group): + def test_invoice_sections_begin_delete(self, resource_group): response = self.client.invoice_sections.begin_delete( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_invoice_sections_get(self, resource_group): response = self.client.invoice_sections.get( billing_account_name="str", billing_profile_name="str", @@ -59,7 +59,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update(self, resource_group): + def test_invoice_sections_begin_create_or_update(self, resource_group): response = self.client.invoice_sections.begin_create_or_update( billing_account_name="str", billing_profile_name="str", @@ -95,7 +95,7 @@ def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_invoice_sections_list_by_billing_profile(self, resource_group): response = self.client.invoice_sections.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations_async.py index e5c1fe1e112c..eb3ffb9b1499 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoice_sections_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate_delete_eligibility(self, resource_group): + async def test_invoice_sections_validate_delete_eligibility(self, resource_group): response = await self.client.invoice_sections.validate_delete_eligibility( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ async def test_validate_delete_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_delete(self, resource_group): + async def test_invoice_sections_begin_delete(self, resource_group): response = await ( await self.client.invoice_sections.begin_delete( billing_account_name="str", @@ -49,7 +49,7 @@ async def test_begin_delete(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_invoice_sections_get(self, resource_group): response = await self.client.invoice_sections.get( billing_account_name="str", billing_profile_name="str", @@ -62,7 +62,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update(self, resource_group): + async def test_invoice_sections_begin_create_or_update(self, resource_group): response = await ( await self.client.invoice_sections.begin_create_or_update( billing_account_name="str", @@ -100,7 +100,7 @@ async def test_begin_create_or_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_invoice_sections_list_by_billing_profile(self, resource_group): response = self.client.invoice_sections.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations.py index ef5816bd643f..1629e580c5b6 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_invoices_list_by_billing_profile(self, resource_group): response = self.client.invoices.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -32,7 +32,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_download_documents_by_billing_account(self, resource_group): + def test_invoices_begin_download_documents_by_billing_account(self, resource_group): response = self.client.invoices.begin_download_documents_by_billing_account( billing_account_name="str", parameters=[{"documentName": "str", "invoiceName": "str"}], @@ -44,7 +44,7 @@ def test_begin_download_documents_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_amend(self, resource_group): + def test_invoices_begin_amend(self, resource_group): response = self.client.invoices.begin_amend( billing_account_name="str", invoice_name="str", @@ -56,7 +56,7 @@ def test_begin_amend(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_download_by_billing_account(self, resource_group): + def test_invoices_begin_download_by_billing_account(self, resource_group): response = self.client.invoices.begin_download_by_billing_account( billing_account_name="str", invoice_name="str", @@ -68,7 +68,7 @@ def test_begin_download_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_download_summary_by_billing_account(self, resource_group): + def test_invoices_begin_download_summary_by_billing_account(self, resource_group): response = self.client.invoices.begin_download_summary_by_billing_account( billing_account_name="str", invoice_name="str", @@ -80,7 +80,7 @@ def test_begin_download_summary_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_invoices_get_by_billing_account(self, resource_group): response = self.client.invoices.get_by_billing_account( billing_account_name="str", invoice_name="str", @@ -92,7 +92,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_invoices_list_by_billing_account(self, resource_group): response = self.client.invoices.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -103,7 +103,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_download_documents_by_billing_subscription(self, resource_group): + def test_invoices_begin_download_documents_by_billing_subscription(self, resource_group): response = self.client.invoices.begin_download_documents_by_billing_subscription( parameters=[{"documentName": "str", "invoiceName": "str"}], api_version="2024-04-01", @@ -114,7 +114,7 @@ def test_begin_download_documents_by_billing_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_download_by_billing_subscription(self, resource_group): + def test_invoices_begin_download_by_billing_subscription(self, resource_group): response = self.client.invoices.begin_download_by_billing_subscription( invoice_name="str", api_version="2024-04-01", @@ -125,7 +125,7 @@ def test_begin_download_by_billing_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_subscription(self, resource_group): + def test_invoices_get_by_billing_subscription(self, resource_group): response = self.client.invoices.get_by_billing_subscription( invoice_name="str", api_version="2024-04-01", @@ -136,7 +136,7 @@ def test_get_by_billing_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_subscription(self, resource_group): + def test_invoices_list_by_billing_subscription(self, resource_group): response = self.client.invoices.list_by_billing_subscription( api_version="2024-04-01", ) @@ -146,7 +146,7 @@ def test_list_by_billing_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_invoices_get(self, resource_group): response = self.client.invoices.get( invoice_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations_async.py index 4fd7b66662da..6cc72f2664bf 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_invoices_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_invoices_list_by_billing_profile(self, resource_group): response = self.client.invoices.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_download_documents_by_billing_account(self, resource_group): + async def test_invoices_begin_download_documents_by_billing_account(self, resource_group): response = await ( await self.client.invoices.begin_download_documents_by_billing_account( billing_account_name="str", @@ -47,7 +47,7 @@ async def test_begin_download_documents_by_billing_account(self, resource_group) @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_amend(self, resource_group): + async def test_invoices_begin_amend(self, resource_group): response = await ( await self.client.invoices.begin_amend( billing_account_name="str", @@ -61,7 +61,7 @@ async def test_begin_amend(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_download_by_billing_account(self, resource_group): + async def test_invoices_begin_download_by_billing_account(self, resource_group): response = await ( await self.client.invoices.begin_download_by_billing_account( billing_account_name="str", @@ -75,7 +75,7 @@ async def test_begin_download_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_download_summary_by_billing_account(self, resource_group): + async def test_invoices_begin_download_summary_by_billing_account(self, resource_group): response = await ( await self.client.invoices.begin_download_summary_by_billing_account( billing_account_name="str", @@ -89,7 +89,7 @@ async def test_begin_download_summary_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_invoices_get_by_billing_account(self, resource_group): response = await self.client.invoices.get_by_billing_account( billing_account_name="str", invoice_name="str", @@ -101,7 +101,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_invoices_list_by_billing_account(self, resource_group): response = self.client.invoices.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -112,7 +112,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_download_documents_by_billing_subscription(self, resource_group): + async def test_invoices_begin_download_documents_by_billing_subscription(self, resource_group): response = await ( await self.client.invoices.begin_download_documents_by_billing_subscription( parameters=[{"documentName": "str", "invoiceName": "str"}], @@ -125,7 +125,7 @@ async def test_begin_download_documents_by_billing_subscription(self, resource_g @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_download_by_billing_subscription(self, resource_group): + async def test_invoices_begin_download_by_billing_subscription(self, resource_group): response = await ( await self.client.invoices.begin_download_by_billing_subscription( invoice_name="str", @@ -138,7 +138,7 @@ async def test_begin_download_by_billing_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_subscription(self, resource_group): + async def test_invoices_get_by_billing_subscription(self, resource_group): response = await self.client.invoices.get_by_billing_subscription( invoice_name="str", api_version="2024-04-01", @@ -149,7 +149,7 @@ async def test_get_by_billing_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_subscription(self, resource_group): + async def test_invoices_list_by_billing_subscription(self, resource_group): response = self.client.invoices.list_by_billing_subscription( api_version="2024-04-01", ) @@ -159,7 +159,7 @@ async def test_list_by_billing_subscription(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_invoices_get(self, resource_group): response = await self.client.invoices.get( invoice_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations.py index c5cedb9989cf..4c1c5f3405dc 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_operations_list(self, resource_group): response = self.client.operations.list( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations_async.py index 5620a2ec1245..032d43dc87fb 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_operations_list(self, resource_group): response = self.client.operations.list( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations.py index 44fdf0939d5a..4676739d8d92 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_partner_transfers_get(self, resource_group): response = self.client.partner_transfers.get( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_initiate(self, resource_group): + def test_partner_transfers_initiate(self, resource_group): response = self.client.partner_transfers.initiate( billing_account_name="str", billing_profile_name="str", @@ -49,7 +49,7 @@ def test_initiate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_cancel(self, resource_group): + def test_partner_transfers_cancel(self, resource_group): response = self.client.partner_transfers.cancel( billing_account_name="str", billing_profile_name="str", @@ -63,7 +63,7 @@ def test_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_partner_transfers_list(self, resource_group): response = self.client.partner_transfers.list( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations_async.py index 10330b9511b9..365870627942 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_partner_transfers_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_partner_transfers_get(self, resource_group): response = await self.client.partner_transfers.get( billing_account_name="str", billing_profile_name="str", @@ -35,7 +35,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_initiate(self, resource_group): + async def test_partner_transfers_initiate(self, resource_group): response = await self.client.partner_transfers.initiate( billing_account_name="str", billing_profile_name="str", @@ -50,7 +50,7 @@ async def test_initiate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_cancel(self, resource_group): + async def test_partner_transfers_cancel(self, resource_group): response = await self.client.partner_transfers.cancel( billing_account_name="str", billing_profile_name="str", @@ -64,7 +64,7 @@ async def test_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_partner_transfers_list(self, resource_group): response = self.client.partner_transfers.list( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations.py index c62066146e20..5e6d4e0ebd0e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_payment_methods_list_by_billing_profile(self, resource_group): response = self.client.payment_methods.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -32,7 +32,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_profile(self, resource_group): + def test_payment_methods_get_by_billing_profile(self, resource_group): response = self.client.payment_methods.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -45,7 +45,7 @@ def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_payment_methods_list_by_billing_account(self, resource_group): response = self.client.payment_methods.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -56,7 +56,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_payment_methods_get_by_billing_account(self, resource_group): response = self.client.payment_methods.get_by_billing_account( billing_account_name="str", payment_method_name="str", @@ -68,7 +68,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_user(self, resource_group): + def test_payment_methods_list_by_user(self, resource_group): response = self.client.payment_methods.list_by_user( api_version="2024-04-01", ) @@ -78,7 +78,7 @@ def test_list_by_user(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_delete_by_user(self, resource_group): + def test_payment_methods_delete_by_user(self, resource_group): response = self.client.payment_methods.delete_by_user( payment_method_name="str", api_version="2024-04-01", @@ -89,7 +89,7 @@ def test_delete_by_user(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_user(self, resource_group): + def test_payment_methods_get_by_user(self, resource_group): response = self.client.payment_methods.get_by_user( payment_method_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations_async.py index e2c39b8a6c21..102878c34a3a 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_payment_methods_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_payment_methods_list_by_billing_profile(self, resource_group): response = self.client.payment_methods.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_profile(self, resource_group): + async def test_payment_methods_get_by_billing_profile(self, resource_group): response = await self.client.payment_methods.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ async def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_payment_methods_list_by_billing_account(self, resource_group): response = self.client.payment_methods.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -57,7 +57,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_payment_methods_get_by_billing_account(self, resource_group): response = await self.client.payment_methods.get_by_billing_account( billing_account_name="str", payment_method_name="str", @@ -69,7 +69,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_user(self, resource_group): + async def test_payment_methods_list_by_user(self, resource_group): response = self.client.payment_methods.list_by_user( api_version="2024-04-01", ) @@ -79,7 +79,7 @@ async def test_list_by_user(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_delete_by_user(self, resource_group): + async def test_payment_methods_delete_by_user(self, resource_group): response = await self.client.payment_methods.delete_by_user( payment_method_name="str", api_version="2024-04-01", @@ -90,7 +90,7 @@ async def test_delete_by_user(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_user(self, resource_group): + async def test_payment_methods_get_by_user(self, resource_group): response = await self.client.payment_methods.get_by_user( payment_method_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations.py index 3c953572ad9e..f35ceafb72f9 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_customer(self, resource_group): + def test_policies_get_by_customer(self, resource_group): response = self.client.policies.get_by_customer( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ def test_get_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update_by_customer(self, resource_group): + def test_policies_begin_create_or_update_by_customer(self, resource_group): response = self.client.policies.begin_create_or_update_by_customer( billing_account_name="str", billing_profile_name="str", @@ -66,7 +66,7 @@ def test_begin_create_or_update_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_profile(self, resource_group): + def test_policies_get_by_billing_profile(self, resource_group): response = self.client.policies.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -78,7 +78,7 @@ def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update_by_billing_profile(self, resource_group): + def test_policies_begin_create_or_update_by_billing_profile(self, resource_group): response = self.client.policies.begin_create_or_update_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -118,7 +118,7 @@ def test_begin_create_or_update_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_customer_at_billing_account(self, resource_group): + def test_policies_get_by_customer_at_billing_account(self, resource_group): response = self.client.policies.get_by_customer_at_billing_account( billing_account_name="str", customer_name="str", @@ -130,7 +130,7 @@ def test_get_by_customer_at_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update_by_customer_at_billing_account(self, resource_group): + def test_policies_begin_create_or_update_by_customer_at_billing_account(self, resource_group): response = self.client.policies.begin_create_or_update_by_customer_at_billing_account( billing_account_name="str", customer_name="str", @@ -161,7 +161,7 @@ def test_begin_create_or_update_by_customer_at_billing_account(self, resource_gr @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_policies_get_by_billing_account(self, resource_group): response = self.client.policies.get_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -172,7 +172,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_create_or_update_by_billing_account(self, resource_group): + def test_policies_begin_create_or_update_by_billing_account(self, resource_group): response = self.client.policies.begin_create_or_update_by_billing_account( billing_account_name="str", parameters={ @@ -209,7 +209,7 @@ def test_begin_create_or_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_subscription(self, resource_group): + def test_policies_get_by_subscription(self, resource_group): response = self.client.policies.get_by_subscription( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations_async.py index ffd95719302c..de4336493e29 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_policies_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_customer(self, resource_group): + async def test_policies_get_by_customer(self, resource_group): response = await self.client.policies.get_by_customer( billing_account_name="str", billing_profile_name="str", @@ -35,7 +35,7 @@ async def test_get_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update_by_customer(self, resource_group): + async def test_policies_begin_create_or_update_by_customer(self, resource_group): response = await ( await self.client.policies.begin_create_or_update_by_customer( billing_account_name="str", @@ -69,7 +69,7 @@ async def test_begin_create_or_update_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_profile(self, resource_group): + async def test_policies_get_by_billing_profile(self, resource_group): response = await self.client.policies.get_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -81,7 +81,7 @@ async def test_get_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update_by_billing_profile(self, resource_group): + async def test_policies_begin_create_or_update_by_billing_profile(self, resource_group): response = await ( await self.client.policies.begin_create_or_update_by_billing_profile( billing_account_name="str", @@ -123,7 +123,7 @@ async def test_begin_create_or_update_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_customer_at_billing_account(self, resource_group): + async def test_policies_get_by_customer_at_billing_account(self, resource_group): response = await self.client.policies.get_by_customer_at_billing_account( billing_account_name="str", customer_name="str", @@ -135,7 +135,7 @@ async def test_get_by_customer_at_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update_by_customer_at_billing_account(self, resource_group): + async def test_policies_begin_create_or_update_by_customer_at_billing_account(self, resource_group): response = await ( await self.client.policies.begin_create_or_update_by_customer_at_billing_account( billing_account_name="str", @@ -168,7 +168,7 @@ async def test_begin_create_or_update_by_customer_at_billing_account(self, resou @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_policies_get_by_billing_account(self, resource_group): response = await self.client.policies.get_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -179,7 +179,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_create_or_update_by_billing_account(self, resource_group): + async def test_policies_begin_create_or_update_by_billing_account(self, resource_group): response = await ( await self.client.policies.begin_create_or_update_by_billing_account( billing_account_name="str", @@ -218,7 +218,7 @@ async def test_begin_create_or_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_subscription(self, resource_group): + async def test_policies_get_by_subscription(self, resource_group): response = await self.client.policies.get_by_subscription( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations.py index 8d1cad280775..f1fd59bac048 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice_section(self, resource_group): + def test_products_list_by_invoice_section(self, resource_group): response = self.client.products.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -33,7 +33,7 @@ def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_products_list_by_billing_profile(self, resource_group): response = self.client.products.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -45,7 +45,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer(self, resource_group): + def test_products_list_by_customer(self, resource_group): response = self.client.products.list_by_customer( billing_account_name="str", customer_name="str", @@ -57,7 +57,7 @@ def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_move(self, resource_group): + def test_products_begin_move(self, resource_group): response = self.client.products.begin_move( billing_account_name="str", product_name="str", @@ -70,7 +70,7 @@ def test_begin_move(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate_move_eligibility(self, resource_group): + def test_products_validate_move_eligibility(self, resource_group): response = self.client.products.validate_move_eligibility( billing_account_name="str", product_name="str", @@ -83,7 +83,7 @@ def test_validate_move_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_products_get(self, resource_group): response = self.client.products.get( billing_account_name="str", product_name="str", @@ -95,7 +95,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_update(self, resource_group): + def test_products_update(self, resource_group): response = self.client.products.update( billing_account_name="str", product_name="str", @@ -145,7 +145,7 @@ def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_products_list_by_billing_account(self, resource_group): response = self.client.products.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations_async.py index 8092cdfa122c..48babcea83ea 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_products_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice_section(self, resource_group): + async def test_products_list_by_invoice_section(self, resource_group): response = self.client.products.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ async def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_products_list_by_billing_profile(self, resource_group): response = self.client.products.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -46,7 +46,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer(self, resource_group): + async def test_products_list_by_customer(self, resource_group): response = self.client.products.list_by_customer( billing_account_name="str", customer_name="str", @@ -58,7 +58,7 @@ async def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_move(self, resource_group): + async def test_products_begin_move(self, resource_group): response = await ( await self.client.products.begin_move( billing_account_name="str", @@ -73,7 +73,7 @@ async def test_begin_move(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate_move_eligibility(self, resource_group): + async def test_products_validate_move_eligibility(self, resource_group): response = await self.client.products.validate_move_eligibility( billing_account_name="str", product_name="str", @@ -86,7 +86,7 @@ async def test_validate_move_eligibility(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_products_get(self, resource_group): response = await self.client.products.get( billing_account_name="str", product_name="str", @@ -98,7 +98,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_update(self, resource_group): + async def test_products_update(self, resource_group): response = await self.client.products.update( billing_account_name="str", product_name="str", @@ -148,7 +148,7 @@ async def test_update(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_products_list_by_billing_account(self, resource_group): response = self.client.products.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations.py index aeeefd0fe741..dea7abf30740 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_accept(self, resource_group): + def test_recipient_transfers_accept(self, resource_group): response = self.client.recipient_transfers.accept( transfer_name="str", parameters={"productDetails": [{"productId": "str", "productType": "str"}]}, @@ -32,7 +32,7 @@ def test_accept(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate(self, resource_group): + def test_recipient_transfers_validate(self, resource_group): response = self.client.recipient_transfers.validate( transfer_name="str", parameters={"productDetails": [{"productId": "str", "productType": "str"}]}, @@ -44,7 +44,7 @@ def test_validate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_decline(self, resource_group): + def test_recipient_transfers_decline(self, resource_group): response = self.client.recipient_transfers.decline( transfer_name="str", api_version="2024-04-01", @@ -55,7 +55,7 @@ def test_decline(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_recipient_transfers_get(self, resource_group): response = self.client.recipient_transfers.get( transfer_name="str", api_version="2024-04-01", @@ -66,7 +66,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_recipient_transfers_list(self, resource_group): response = self.client.recipient_transfers.list( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations_async.py index fdc9aba80781..efc795bc6ac7 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_recipient_transfers_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_accept(self, resource_group): + async def test_recipient_transfers_accept(self, resource_group): response = await self.client.recipient_transfers.accept( transfer_name="str", parameters={"productDetails": [{"productId": "str", "productType": "str"}]}, @@ -33,7 +33,7 @@ async def test_accept(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate(self, resource_group): + async def test_recipient_transfers_validate(self, resource_group): response = await self.client.recipient_transfers.validate( transfer_name="str", parameters={"productDetails": [{"productId": "str", "productType": "str"}]}, @@ -45,7 +45,7 @@ async def test_validate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_decline(self, resource_group): + async def test_recipient_transfers_decline(self, resource_group): response = await self.client.recipient_transfers.decline( transfer_name="str", api_version="2024-04-01", @@ -56,7 +56,7 @@ async def test_decline(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_recipient_transfers_get(self, resource_group): response = await self.client.recipient_transfers.get( transfer_name="str", api_version="2024-04-01", @@ -67,7 +67,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_recipient_transfers_list(self, resource_group): response = self.client.recipient_transfers.list( api_version="2024-04-01", ) diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations.py index 40f8b960fee7..14600480794e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_reservation_orders_get_by_billing_account(self, resource_group): response = self.client.reservation_orders.get_by_billing_account( billing_account_name="str", reservation_order_id="str", @@ -32,7 +32,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_reservation_orders_list_by_billing_account(self, resource_group): response = self.client.reservation_orders.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations_async.py index bdbc7f3ae7e6..728e5f2e8c77 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservation_orders_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_reservation_orders_get_by_billing_account(self, resource_group): response = await self.client.reservation_orders.get_by_billing_account( billing_account_name="str", reservation_order_id="str", @@ -33,7 +33,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_reservation_orders_list_by_billing_account(self, resource_group): response = self.client.reservation_orders.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations.py index 2051747f1de8..f6be97a0e101 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_reservations_list_by_billing_account(self, resource_group): response = self.client.reservations.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -31,7 +31,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_reservations_list_by_billing_profile(self, resource_group): response = self.client.reservations.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -43,7 +43,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_reservation_order(self, resource_group): + def test_reservations_get_by_reservation_order(self, resource_group): response = self.client.reservations.get_by_reservation_order( billing_account_name="str", reservation_order_id="str", @@ -56,7 +56,7 @@ def test_get_by_reservation_order(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_by_billing_account(self, resource_group): + def test_reservations_begin_update_by_billing_account(self, resource_group): response = self.client.reservations.begin_update_by_billing_account( billing_account_name="str", reservation_order_id="str", @@ -107,7 +107,7 @@ def test_begin_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_reservation_order(self, resource_group): + def test_reservations_list_by_reservation_order(self, resource_group): response = self.client.reservations.list_by_reservation_order( billing_account_name="str", reservation_order_id="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations_async.py index 90639f313958..9a5d0bebc044 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_reservations_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_reservations_list_by_billing_account(self, resource_group): response = self.client.reservations.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -32,7 +32,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_reservations_list_by_billing_profile(self, resource_group): response = self.client.reservations.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -44,7 +44,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_reservation_order(self, resource_group): + async def test_reservations_get_by_reservation_order(self, resource_group): response = await self.client.reservations.get_by_reservation_order( billing_account_name="str", reservation_order_id="str", @@ -57,7 +57,7 @@ async def test_get_by_reservation_order(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_by_billing_account(self, resource_group): + async def test_reservations_begin_update_by_billing_account(self, resource_group): response = await ( await self.client.reservations.begin_update_by_billing_account( billing_account_name="str", @@ -110,7 +110,7 @@ async def test_begin_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_reservation_order(self, resource_group): + async def test_reservations_list_by_reservation_order(self, resource_group): response = self.client.reservations.list_by_reservation_order( billing_account_name="str", reservation_order_id="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations.py index ce9d8c94d243..718a38ecc02e 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_savings_plan_orders_get_by_billing_account(self, resource_group): response = self.client.savings_plan_orders.get_by_billing_account( billing_account_name="str", savings_plan_order_id="str", @@ -32,7 +32,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_savings_plan_orders_list_by_billing_account(self, resource_group): response = self.client.savings_plan_orders.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations_async.py index 558c9d2d8b7d..65d14e4f049f 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plan_orders_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_savings_plan_orders_get_by_billing_account(self, resource_group): response = await self.client.savings_plan_orders.get_by_billing_account( billing_account_name="str", savings_plan_order_id="str", @@ -33,7 +33,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_savings_plan_orders_list_by_billing_account(self, resource_group): response = self.client.savings_plan_orders.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations.py index 885ea3925037..abab30e8d601 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_savings_plan_order(self, resource_group): + def test_savings_plans_list_by_savings_plan_order(self, resource_group): response = self.client.savings_plans.list_by_savings_plan_order( billing_account_name="str", savings_plan_order_id="str", @@ -32,7 +32,7 @@ def test_list_by_savings_plan_order(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_account(self, resource_group): + def test_savings_plans_list_by_billing_account(self, resource_group): response = self.client.savings_plans.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -43,7 +43,7 @@ def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_by_billing_account(self, resource_group): + def test_savings_plans_get_by_billing_account(self, resource_group): response = self.client.savings_plans.get_by_billing_account( billing_account_name="str", savings_plan_order_id="str", @@ -56,7 +56,7 @@ def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_update_by_billing_account(self, resource_group): + def test_savings_plans_begin_update_by_billing_account(self, resource_group): response = self.client.savings_plans.begin_update_by_billing_account( billing_account_name="str", savings_plan_order_id="str", @@ -104,7 +104,7 @@ def test_begin_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_validate_update_by_billing_account(self, resource_group): + def test_savings_plans_validate_update_by_billing_account(self, resource_group): response = self.client.savings_plans.validate_update_by_billing_account( billing_account_name="str", savings_plan_order_id="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations_async.py index f0f529f4817e..f5f25cddd7a2 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_savings_plans_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_savings_plan_order(self, resource_group): + async def test_savings_plans_list_by_savings_plan_order(self, resource_group): response = self.client.savings_plans.list_by_savings_plan_order( billing_account_name="str", savings_plan_order_id="str", @@ -33,7 +33,7 @@ async def test_list_by_savings_plan_order(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_account(self, resource_group): + async def test_savings_plans_list_by_billing_account(self, resource_group): response = self.client.savings_plans.list_by_billing_account( billing_account_name="str", api_version="2024-04-01", @@ -44,7 +44,7 @@ async def test_list_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_by_billing_account(self, resource_group): + async def test_savings_plans_get_by_billing_account(self, resource_group): response = await self.client.savings_plans.get_by_billing_account( billing_account_name="str", savings_plan_order_id="str", @@ -57,7 +57,7 @@ async def test_get_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_update_by_billing_account(self, resource_group): + async def test_savings_plans_begin_update_by_billing_account(self, resource_group): response = await ( await self.client.savings_plans.begin_update_by_billing_account( billing_account_name="str", @@ -107,7 +107,7 @@ async def test_begin_update_by_billing_account(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_validate_update_by_billing_account(self, resource_group): + async def test_savings_plans_validate_update_by_billing_account(self, resource_group): response = await self.client.savings_plans.validate_update_by_billing_account( billing_account_name="str", savings_plan_order_id="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations.py index 4d775af78eb6..f9daf1850186 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_customer(self, resource_group): + def test_transactions_list_by_customer(self, resource_group): response = self.client.transactions.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -36,7 +36,7 @@ def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice_section(self, resource_group): + def test_transactions_list_by_invoice_section(self, resource_group): response = self.client.transactions.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -52,7 +52,7 @@ def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_billing_profile(self, resource_group): + def test_transactions_list_by_billing_profile(self, resource_group): response = self.client.transactions.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -67,7 +67,7 @@ def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list_by_invoice(self, resource_group): + def test_transactions_list_by_invoice(self, resource_group): response = self.client.transactions.list_by_invoice( billing_account_name="str", invoice_name="str", @@ -79,7 +79,7 @@ def test_list_by_invoice(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_begin_transactions_download_by_invoice(self, resource_group): + def test_transactions_begin_transactions_download_by_invoice(self, resource_group): response = self.client.transactions.begin_transactions_download_by_invoice( billing_account_name="str", invoice_name="str", @@ -91,7 +91,7 @@ def test_begin_transactions_download_by_invoice(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get_transaction_summary_by_invoice(self, resource_group): + def test_transactions_get_transaction_summary_by_invoice(self, resource_group): response = self.client.transactions.get_transaction_summary_by_invoice( billing_account_name="str", invoice_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations_async.py index bed203e4169e..b3d212b50394 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transactions_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_customer(self, resource_group): + async def test_transactions_list_by_customer(self, resource_group): response = self.client.transactions.list_by_customer( billing_account_name="str", billing_profile_name="str", @@ -37,7 +37,7 @@ async def test_list_by_customer(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice_section(self, resource_group): + async def test_transactions_list_by_invoice_section(self, resource_group): response = self.client.transactions.list_by_invoice_section( billing_account_name="str", billing_profile_name="str", @@ -53,7 +53,7 @@ async def test_list_by_invoice_section(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_billing_profile(self, resource_group): + async def test_transactions_list_by_billing_profile(self, resource_group): response = self.client.transactions.list_by_billing_profile( billing_account_name="str", billing_profile_name="str", @@ -68,7 +68,7 @@ async def test_list_by_billing_profile(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list_by_invoice(self, resource_group): + async def test_transactions_list_by_invoice(self, resource_group): response = self.client.transactions.list_by_invoice( billing_account_name="str", invoice_name="str", @@ -80,7 +80,7 @@ async def test_list_by_invoice(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_begin_transactions_download_by_invoice(self, resource_group): + async def test_transactions_begin_transactions_download_by_invoice(self, resource_group): response = await ( await self.client.transactions.begin_transactions_download_by_invoice( billing_account_name="str", @@ -94,7 +94,7 @@ async def test_begin_transactions_download_by_invoice(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get_transaction_summary_by_invoice(self, resource_group): + async def test_transactions_get_transaction_summary_by_invoice(self, resource_group): response = await self.client.transactions.get_transaction_summary_by_invoice( billing_account_name="str", invoice_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations.py index eb30fd968a1c..56448a783ee7 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations.py @@ -20,7 +20,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_get(self, resource_group): + def test_transfers_get(self, resource_group): response = self.client.transfers.get( billing_account_name="str", billing_profile_name="str", @@ -34,7 +34,7 @@ def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_initiate(self, resource_group): + def test_transfers_initiate(self, resource_group): response = self.client.transfers.initiate( billing_account_name="str", billing_profile_name="str", @@ -49,7 +49,7 @@ def test_initiate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_cancel(self, resource_group): + def test_transfers_cancel(self, resource_group): response = self.client.transfers.cancel( billing_account_name="str", billing_profile_name="str", @@ -63,7 +63,7 @@ def test_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy - def test_list(self, resource_group): + def test_transfers_list(self, resource_group): response = self.client.transfers.list( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations_async.py b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations_async.py index bec2b12b1941..7d3643c0b5b9 100644 --- a/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations_async.py +++ b/sdk/billing/azure-mgmt-billing/generated_tests/test_billing_management_transfers_operations_async.py @@ -21,7 +21,7 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_get(self, resource_group): + async def test_transfers_get(self, resource_group): response = await self.client.transfers.get( billing_account_name="str", billing_profile_name="str", @@ -35,7 +35,7 @@ async def test_get(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_initiate(self, resource_group): + async def test_transfers_initiate(self, resource_group): response = await self.client.transfers.initiate( billing_account_name="str", billing_profile_name="str", @@ -50,7 +50,7 @@ async def test_initiate(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_cancel(self, resource_group): + async def test_transfers_cancel(self, resource_group): response = await self.client.transfers.cancel( billing_account_name="str", billing_profile_name="str", @@ -64,7 +64,7 @@ async def test_cancel(self, resource_group): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async - async def test_list(self, resource_group): + async def test_transfers_list(self, resource_group): response = self.client.transfers.list( billing_account_name="str", billing_profile_name="str", diff --git a/sdk/billing/azure-mgmt-billing/setup.py b/sdk/billing/azure-mgmt-billing/setup.py index 97d9a82134ff..5b0839536e44 100644 --- a/sdk/billing/azure-mgmt-billing/setup.py +++ b/sdk/billing/azure-mgmt-billing/setup.py @@ -53,7 +53,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -77,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], - python_requires=">=3.8", + python_requires=">=3.9", )