From 5bc9d41667a95421cd560a53fecb26b503668492 Mon Sep 17 00:00:00 2001 From: PythonSdkPipelines Date: Mon, 16 Jan 2023 04:08:42 +0000 Subject: [PATCH 1/5] code and test --- .../azure-mgmt-loadtesting/CHANGELOG.md | 4 + .../azure-mgmt-loadtesting/_meta.json | 6 +- .../azure/mgmt/loadtesting/_serialization.py | 87 ++++++++++++------ .../azure/mgmt/loadtesting/_vendor.py | 5 +- .../azure/mgmt/loadtesting/_version.py | 2 +- .../mgmt/loadtesting/models/_models_py3.py | 89 +++++++++++-------- 6 files changed, 120 insertions(+), 73 deletions(-) diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md index cf57c4cdad71..bdb78ccc068b 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 0.0.0 (it should be stable) (2023-01-16) + + + ## 1.0.0b1 (2023-01-04) * Initial Release diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/_meta.json b/sdk/loadtestservice/azure-mgmt-loadtesting/_meta.json index e36ea5f74d95..c28c68143e6e 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/_meta.json +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/_meta.json @@ -1,11 +1,11 @@ { - "commit": "65f5099082a02703fbca8c9863940ea83cdf0bb7", + "commit": "269c77bb83979703db9df46784effa70d9eed1e1", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.2.16", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/loadtestservice/resource-manager/readme.md --generate-sample=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.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/loadtestservice/resource-manager/readme.md --generate-sample=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.2.16 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/loadtestservice/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_serialization.py b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_serialization.py index 2c170e28dbca..f17c068e833e 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_serialization.py +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_serialization.py @@ -38,7 +38,22 @@ import re import sys import codecs -from typing import Optional, Union, AnyStr, IO, Mapping +from typing import ( + Dict, + Any, + cast, + Optional, + Union, + AnyStr, + IO, + Mapping, + Callable, + TypeVar, + MutableMapping, + Type, + List, + Mapping, +) try: from urllib import quote # type: ignore @@ -48,12 +63,14 @@ import isodate # type: ignore -from typing import Dict, Any, cast - from azure.core.exceptions import DeserializationError, SerializationError, raise_with_traceback +from azure.core.serialization import NULL as AzureCoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") +ModelType = TypeVar("ModelType", bound="Model") +JSON = MutableMapping[str, Any] + class RawDeserializer: @@ -277,8 +294,8 @@ class Model(object): _attribute_map: Dict[str, Dict[str, Any]] = {} _validation: Dict[str, Dict[str, Any]] = {} - def __init__(self, **kwargs): - self.additional_properties = {} + def __init__(self, **kwargs: Any) -> None: + self.additional_properties: Dict[str, Any] = {} for k in kwargs: 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__) @@ -287,25 +304,25 @@ def __init__(self, **kwargs): else: setattr(self, k, kwargs[k]) - def __eq__(self, other): + def __eq__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" if isinstance(other, self.__class__): return self.__dict__ == other.__dict__ return False - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: """Compare objects by comparing all attributes.""" return not self.__eq__(other) - def __str__(self): + def __str__(self) -> str: return str(self.__dict__) @classmethod - def enable_additional_properties_sending(cls): + def enable_additional_properties_sending(cls) -> None: cls._attribute_map["additional_properties"] = {"key": "", "type": "{object}"} @classmethod - def is_xml_model(cls): + def is_xml_model(cls) -> bool: try: cls._xml_map # type: ignore except AttributeError: @@ -322,7 +339,7 @@ def _create_xml_node(cls): return _create_xml_node(xml_map.get("name", cls.__name__), xml_map.get("prefix", None), xml_map.get("ns", None)) - def serialize(self, keep_readonly=False, **kwargs): + def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: """Return the JSON that would be sent to azure from this model. This is an alias to `as_dict(full_restapi_key_transformer, keep_readonly=False)`. @@ -336,8 +353,13 @@ def serialize(self, keep_readonly=False, **kwargs): serializer = Serializer(self._infer_class_models()) return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) - def as_dict(self, keep_readonly=True, key_transformer=attribute_transformer, **kwargs): - """Return a dict that can be JSONify using json.dump. + def as_dict( + self, + keep_readonly: bool = True, + key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + **kwargs: Any + ) -> JSON: + """Return a dict that can be serialized using json.dump. Advanced usage might optionally use a callback as parameter: @@ -384,7 +406,7 @@ def _infer_class_models(cls): return client_models @classmethod - def deserialize(cls, data, content_type=None): + def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = None) -> ModelType: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. @@ -396,7 +418,12 @@ def deserialize(cls, data, content_type=None): return deserializer(cls.__name__, data, content_type=content_type) @classmethod - def from_dict(cls, data, key_extractors=None, content_type=None): + def from_dict( + cls: Type[ModelType], + data: Any, + key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + content_type: Optional[str] = None, + ) -> ModelType: """Parse a dict using given key extractor return a model. By default consider key @@ -409,8 +436,8 @@ def from_dict(cls, data, key_extractors=None, content_type=None): :raises: DeserializationError if something went wrong """ deserializer = Deserializer(cls._infer_class_models()) - deserializer.key_extractors = ( - [ + deserializer.key_extractors = ( # type: ignore + [ # type: ignore attribute_key_case_insensitive_extractor, rest_key_case_insensitive_extractor, last_rest_key_case_insensitive_extractor, @@ -518,7 +545,7 @@ class Serializer(object): "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -534,7 +561,7 @@ def __init__(self, classes=None): "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -626,8 +653,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): serialized.append(local_node) # type: ignore else: # JSON for k in reversed(keys): # type: ignore - unflattened = {k: new_attr} - new_attr = unflattened + new_attr = {k: new_attr} _new_attr = new_attr _serialized = serialized @@ -656,8 +682,8 @@ def body(self, data, data_type, **kwargs): """ # Just in case this is a dict - internal_data_type = data_type.strip("[]{}") - internal_data_type = self.dependencies.get(internal_data_type, None) + internal_data_type_str = data_type.strip("[]{}") + internal_data_type = self.dependencies.get(internal_data_type_str, None) try: is_xml_model_serialization = kwargs["is_xml"] except KeyError: @@ -777,6 +803,8 @@ def serialize_data(self, data, data_type, **kwargs): raise ValueError("No value for given attribute") try: + if data is AzureCoreNull: + return None if data_type in self.basic_types.values(): return self.serialize_basic(data, data_type, **kwargs) @@ -1161,7 +1189,8 @@ def rest_key_extractor(attr, attr_desc, data): working_data = data while "." in key: - dict_keys = _FLATTEN.split(key) + # Need the cast, as for some reasons "split" is typed as list[str | Any] + dict_keys = cast(List[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1332,7 +1361,7 @@ class Deserializer(object): 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}]?") - def __init__(self, classes=None): + def __init__(self, classes: Optional[Mapping[str, Type[ModelType]]] = None): self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1352,7 +1381,7 @@ def __init__(self, classes=None): "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies = dict(classes) if classes else {} + self.dependencies: Dict[str, Type[ModelType]] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much @@ -1471,7 +1500,7 @@ def _classify_target(self, target, data): Once classification has been determined, initialize object. :param str target: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. """ if target is None: return None, None @@ -1486,7 +1515,7 @@ def _classify_target(self, target, data): target = target._classify(data, self.dependencies) except AttributeError: pass # Target is not a Model, no classify - return target, target.__class__.__name__ + return target, target.__class__.__name__ # type: ignore def failsafe_deserialize(self, target_obj, data, content_type=None): """Ignores any errors encountered in deserialization, @@ -1496,7 +1525,7 @@ def failsafe_deserialize(self, target_obj, data, content_type=None): a deserialization error. :param str target_obj: The target object type to deserialize to. - :param str/dict data: The response data to deseralize. + :param str/dict data: The response data to deserialize. :param str content_type: Swagger "produces" if available. """ try: diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_vendor.py b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_vendor.py index 9aad73fc743e..bd0df84f5319 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_vendor.py +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_vendor.py @@ -5,6 +5,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from typing import List, cast + from azure.core.pipeline.transport import HttpRequest @@ -22,6 +24,7 @@ def _format_url_section(template, **kwargs): try: return template.format(**kwargs) except KeyError as key: - formatted_components = template.split("/") + # Need the cast, as for some reasons "split" is typed as list[str | Any] + formatted_components = cast(List[str], template.split("/")) components = [c for c in formatted_components if "{}".format(key.args[0]) not in c] template = "/".join(components) diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py index e5754a47ce68..9f1dc6e309ba 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "0.0.0 (it should be stable)" diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_models_py3.py b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_models_py3.py index c43b4ebf3f6f..75f88378695e 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_models_py3.py +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/models/_models_py3.py @@ -8,7 +8,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, TYPE_CHECKING, Union +from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union from .. import _serialization @@ -49,7 +49,7 @@ class Resource(_serialization.Model): "system_data": {"key": "systemData", "type": "SystemData"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -98,7 +98,9 @@ class CheckQuotaAvailabilityResponse(Resource): "availability_status": {"key": "properties.availabilityStatus", "type": "str"}, } - def __init__(self, *, is_available: Optional[bool] = None, availability_status: Optional[str] = None, **kwargs): + def __init__( + self, *, is_available: Optional[bool] = None, availability_status: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword is_available: True/False indicating whether the quota request be granted based on availability. @@ -134,8 +136,8 @@ def __init__( *, identity: Optional["_models.EncryptionPropertiesIdentity"] = None, key_url: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword identity: All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. @@ -151,7 +153,8 @@ def __init__( class EncryptionPropertiesIdentity(_serialization.Model): - """All identity configuration for Customer-managed key settings defining which identity should be used to auth to Key Vault. + """All identity configuration for Customer-managed key settings defining which identity should be + used to auth to Key Vault. :ivar type: Managed identity type to use for accessing encryption key Url. Known values are: "SystemAssigned" and "UserAssigned". @@ -168,8 +171,8 @@ class EncryptionPropertiesIdentity(_serialization.Model): } def __init__( - self, *, type: Optional[Union[str, "_models.Type"]] = None, resource_id: Optional[str] = None, **kwargs - ): + self, *, type: Optional[Union[str, "_models.Type"]] = None, resource_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword type: Managed identity type to use for accessing encryption key Url. Known values are: "SystemAssigned" and "UserAssigned". @@ -211,7 +214,7 @@ class EndpointDependency(_serialization.Model): "endpoint_details": {"key": "endpointDetails", "type": "[EndpointDetail]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.domain_name = None @@ -236,7 +239,7 @@ class EndpointDetail(_serialization.Model): "port": {"key": "port", "type": "int"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.port = None @@ -263,7 +266,7 @@ class ErrorAdditionalInfo(_serialization.Model): "info": {"key": "info", "type": "object"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.type = None @@ -303,7 +306,7 @@ class ErrorDetail(_serialization.Model): "additional_info": {"key": "additionalInfo", "type": "[ErrorAdditionalInfo]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.code = None @@ -314,7 +317,8 @@ def __init__(self, **kwargs): class ErrorResponse(_serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + """Common error response for all Azure Resource Manager APIs to return error details for failed + operations. (This also follows the OData error response format.). :ivar error: The error object. :vartype error: ~azure.mgmt.loadtesting.models.ErrorDetail @@ -324,7 +328,7 @@ class ErrorResponse(_serialization.Model): "error": {"key": "error", "type": "ErrorDetail"}, } - def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs): + def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. :paramtype error: ~azure.mgmt.loadtesting.models.ErrorDetail @@ -334,7 +338,8 @@ def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs): class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + """The resource model definition for an Azure Resource Manager tracked top level resource which + has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. @@ -374,7 +379,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -454,8 +459,8 @@ def __init__( identity: Optional["_models.ManagedServiceIdentity"] = None, description: Optional[str] = None, encryption: Optional["_models.EncryptionProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -491,8 +496,12 @@ class LoadTestResourcePageList(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.LoadTestResource"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.LoadTestResource"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: List of resources in current page. :paramtype value: list[~azure.mgmt.loadtesting.models.LoadTestResource] @@ -535,8 +544,8 @@ def __init__( identity: Optional["_models.ManagedServiceIdentity"] = None, description: Optional[str] = None, encryption: Optional["_models.EncryptionProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -597,8 +606,8 @@ def __init__( *, type: Union[str, "_models.ManagedServiceIdentityType"], user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and @@ -655,7 +664,7 @@ class Operation(_serialization.Model): "action_type": {"key": "actionType", "type": "str"}, } - def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs): + def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: """ :keyword display: Localized display information for this particular operation. :paramtype display: ~azure.mgmt.loadtesting.models.OperationDisplay @@ -701,7 +710,7 @@ class OperationDisplay(_serialization.Model): "description": {"key": "description", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.provider = None @@ -711,7 +720,8 @@ def __init__(self, **kwargs): class OperationListResult(_serialization.Model): - """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link + to get the next set of results. Variables are only populated by the server, and will be ignored when sending a request. @@ -731,7 +741,7 @@ class OperationListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -739,7 +749,8 @@ def __init__(self, **kwargs): class OutboundEnvironmentEndpoint(_serialization.Model): - """A collection of related endpoints from the same service for which the Batch service requires outbound access. + """A collection of related endpoints from the same service for which the Batch service requires + outbound access. Variables are only populated by the server, and will be ignored when sending a request. @@ -760,7 +771,7 @@ class OutboundEnvironmentEndpoint(_serialization.Model): "endpoints": {"key": "endpoints", "type": "[EndpointDependency]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.category = None @@ -788,7 +799,7 @@ class OutboundEnvironmentEndpointCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, next_link: Optional[str] = None, **kwargs): + def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: """ :keyword next_link: The continuation token. :paramtype next_link: str @@ -852,8 +863,8 @@ def __init__( current_quota: Optional[int] = None, new_quota: Optional[int] = None, dimensions: Optional["_models.QuotaBucketRequestPropertiesDimensions"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword current_usage: Current quota usage of the quota bucket. :paramtype current_usage: int @@ -890,7 +901,7 @@ class QuotaBucketRequestPropertiesDimensions(_serialization.Model): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, subscription_id: Optional[str] = None, location: Optional[str] = None, **kwargs): + def __init__(self, *, subscription_id: Optional[str] = None, location: Optional[str] = None, **kwargs: Any) -> None: """ :keyword subscription_id: Subscription Id dimension for new quota request of the quota bucket. :paramtype subscription_id: str @@ -947,7 +958,7 @@ class QuotaResource(Resource): "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, } - def __init__(self, *, limit: Optional[int] = None, usage: Optional[int] = None, **kwargs): + def __init__(self, *, limit: Optional[int] = None, usage: Optional[int] = None, **kwargs: Any) -> None: """ :keyword limit: Current quota limit of the quota bucket. :paramtype limit: int @@ -981,7 +992,7 @@ class QuotaResourceList(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.value = None @@ -1025,8 +1036,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -1073,7 +1084,7 @@ class UserAssignedIdentity(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None From 179ddb9ff6a5fbf3b9f3212bcc5f95f744dc192c Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 16 Jan 2023 13:37:47 +0800 Subject: [PATCH 2/5] Update CHANGELOG.md --- sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md index bdb78ccc068b..eaf21f76ad5a 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md @@ -1,8 +1,10 @@ # Release History -## 0.0.0 (it should be stable) (2023-01-16) +## 1.0.0 (2023-01-16) +### Features Added + - Support `azure.core.serialization.NULL` in model serialization ## 1.0.0b1 (2023-01-04) From 4142466678dd0cb7a655262c9a4639676eb2b9bc Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 16 Jan 2023 13:38:33 +0800 Subject: [PATCH 3/5] Update _version.py --- .../azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py index 9f1dc6e309ba..c47f66669f1b 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/azure/mgmt/loadtesting/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.0.0 (it should be stable)" +VERSION = "1.0.0" From 29c219de40772fa7758aaa5bea481624d6c7bcf6 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Mon, 30 Jan 2023 10:20:58 +0800 Subject: [PATCH 4/5] Update CHANGELOG.md --- sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md index eaf21f76ad5a..bf0bf76b876c 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0 (2023-01-16) +## 1.0.0 (2023-01-30) ### Features Added From 9cc0cd6c23e89e4be56c13740e451a7338e30ca2 Mon Sep 17 00:00:00 2001 From: zhenbiao wei <424401670@qq.com> Date: Wed, 1 Feb 2023 10:02:15 +0800 Subject: [PATCH 5/5] Update CHANGELOG.md --- sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md index bf0bf76b876c..fe3bfe39a483 100644 --- a/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md +++ b/sdk/loadtestservice/azure-mgmt-loadtesting/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0 (2023-01-30) +## 1.0.0 (2023-02-01) ### Features Added