From 26ded10055ed4699446932aab220720ac18c903c Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 13 Jun 2023 09:34:38 +0000 Subject: [PATCH] CodeGen from PR 23991 in Azure/azure-rest-api-specs Merge 44c261cb15934d8b0c79b93f291d132bf7af91f8 into 360555e7321f2771ecc05cd3f56179a8af7882dd --- .../_meta.json | 6 +- .../_configuration.py | 10 +- .../_serialization.py | 93 +- .../_site_recovery_management_client.py | 6 +- .../recoveryservicessiterecovery/_vendor.py | 5 +- .../recoveryservicessiterecovery/_version.py | 2 +- .../aio/_configuration.py | 10 +- .../aio/_site_recovery_management_client.py | 6 +- .../_migration_recovery_points_operations.py | 19 +- .../aio/operations/_operations.py | 12 +- .../operations/_recovery_points_operations.py | 19 +- .../_replication_alert_settings_operations.py | 33 +- .../_replication_appliances_operations.py | 12 +- ...lication_eligibility_results_operations.py | 19 +- .../_replication_events_operations.py | 19 +- .../_replication_fabrics_operations.py | 112 +- .../_replication_jobs_operations.py | 74 +- ...replication_logical_networks_operations.py | 19 +- ..._replication_migration_items_operations.py | 167 +- ...replication_network_mappings_operations.py | 70 +- .../_replication_networks_operations.py | 26 +- .../_replication_policies_operations.py | 61 +- ...eplication_protectable_items_operations.py | 19 +- ..._replication_protected_items_operations.py | 317 ++- ...rotection_container_mappings_operations.py | 86 +- ...cation_protection_containers_operations.py | 85 +- ...plication_protection_intents_operations.py | 32 +- .../_replication_recovery_plans_operations.py | 162 +- ..._recovery_services_providers_operations.py | 76 +- ...rage_classification_mappings_operations.py | 54 +- ...tion_storage_classifications_operations.py | 26 +- .../_replication_vault_health_operations.py | 23 +- .../_replication_vault_setting_operations.py | 36 +- .../_replicationv_centers_operations.py | 72 +- ..._supported_operating_systems_operations.py | 12 +- .../_target_compute_sizes_operations.py | 12 +- .../models/__init__.py | 6 + .../models/_models_py3.py | 2026 ++++++++++------- .../_site_recovery_management_client_enums.py | 8 + .../_migration_recovery_points_operations.py | 23 +- .../operations/_operations.py | 14 +- .../operations/_recovery_points_operations.py | 23 +- .../_replication_alert_settings_operations.py | 39 +- .../_replication_appliances_operations.py | 14 +- ...lication_eligibility_results_operations.py | 23 +- .../_replication_events_operations.py | 23 +- .../_replication_fabrics_operations.py | 130 +- .../_replication_jobs_operations.py | 86 +- ...replication_logical_networks_operations.py | 23 +- ..._replication_migration_items_operations.py | 191 +- ...replication_network_mappings_operations.py | 82 +- .../_replication_networks_operations.py | 32 +- .../_replication_policies_operations.py | 71 +- ...eplication_protectable_items_operations.py | 23 +- ..._replication_protected_items_operations.py | 361 ++- ...rotection_container_mappings_operations.py | 100 +- ...cation_protection_containers_operations.py | 99 +- ...plication_protection_intents_operations.py | 38 +- .../_replication_recovery_plans_operations.py | 186 +- ..._recovery_services_providers_operations.py | 90 +- ...rage_classification_mappings_operations.py | 64 +- ...tion_storage_classifications_operations.py | 32 +- .../_replication_vault_health_operations.py | 27 +- .../_replication_vault_setting_operations.py | 42 +- .../_replicationv_centers_operations.py | 84 +- ..._supported_operating_systems_operations.py | 14 +- .../_target_compute_sizes_operations.py | 14 +- .../migration_recovery_points_get.py | 2 +- ...nts_list_by_replication_migration_items.py | 2 +- .../generated_samples/operations_list.py | 2 +- .../generated_samples/recovery_points_get.py | 2 +- ...nts_list_by_replication_protected_items.py | 2 +- .../replication_alert_settings_create.py | 2 +- .../replication_alert_settings_get.py | 2 +- .../replication_alert_settings_list.py | 2 +- .../replication_appliances_list.py | 2 +- .../replication_eligibility_results_get.py | 2 +- .../replication_eligibility_results_list.py | 2 +- .../replication_events_get.py | 2 +- .../replication_events_list.py | 2 +- .../replication_fabrics_check_consistency.py | 2 +- .../replication_fabrics_create.py | 2 +- .../replication_fabrics_delete.py | 5 +- .../replication_fabrics_get.py | 2 +- .../replication_fabrics_list.py | 2 +- .../replication_fabrics_migrate_to_aad.py | 5 +- .../replication_fabrics_purge.py | 5 +- ...replication_fabrics_reassociate_gateway.py | 2 +- .../replication_fabrics_renew_certificate.py | 2 +- .../replication_jobs_cancel.py | 2 +- .../replication_jobs_export.py | 2 +- .../generated_samples/replication_jobs_get.py | 2 +- .../replication_jobs_list.py | 2 +- .../replication_jobs_restart.py | 2 +- .../replication_jobs_resume.py | 2 +- .../replication_logical_networks_get.py | 2 +- ...al_networks_list_by_replication_fabrics.py | 2 +- .../replication_migration_items_create.py | 2 +- .../replication_migration_items_delete.py | 5 +- .../replication_migration_items_get.py | 2 +- .../replication_migration_items_list.py | 2 +- ...st_by_replication_protection_containers.py | 2 +- .../replication_migration_items_migrate.py | 2 +- ...ation_migration_items_pause_replication.py | 2 +- ...tion_migration_items_resume_replication.py | 2 +- .../replication_migration_items_resync.py | 2 +- ...eplication_migration_items_test_migrate.py | 2 +- ...on_migration_items_test_migrate_cleanup.py | 2 +- .../replication_migration_items_update.py | 2 +- .../replication_network_mappings_create.py | 2 +- .../replication_network_mappings_delete.py | 5 +- .../replication_network_mappings_get.py | 2 +- .../replication_network_mappings_list.py | 2 +- ...k_mappings_list_by_replication_networks.py | 2 +- .../replication_network_mappings_update.py | 2 +- .../replication_networks_get.py | 2 +- .../replication_networks_list.py | 2 +- ...on_networks_list_by_replication_fabrics.py | 2 +- .../replication_policies_create.py | 2 +- .../replication_policies_delete.py | 5 +- .../replication_policies_get.py | 2 +- .../replication_policies_list.py | 2 +- .../replication_policies_update.py | 2 +- .../replication_protectable_items_get.py | 2 +- ...st_by_replication_protection_containers.py | 2 +- .../replication_protected_items_add_disks.py | 2 +- ...on_protected_items_apply_recovery_point.py | 2 +- .../replication_protected_items_create.py | 2 +- .../replication_protected_items_delete.py | 5 +- ...ication_protected_items_failover_cancel.py | 2 +- ...ication_protected_items_failover_commit.py | 2 +- .../replication_protected_items_get.py | 2 +- .../replication_protected_items_list.py | 2 +- ...st_by_replication_protection_containers.py | 2 +- ...cation_protected_items_planned_failover.py | 2 +- .../replication_protected_items_purge.py | 5 +- ...eplication_protected_items_remove_disks.py | 2 +- ...tion_protected_items_repair_replication.py | 2 +- .../replication_protected_items_reprotect.py | 2 +- ...n_protected_items_resolve_health_errors.py | 2 +- ...ication_protected_items_switch_provider.py | 2 +- ...plication_protected_items_test_failover.py | 2 +- ...n_protected_items_test_failover_cleanup.py | 2 +- ...tion_protected_items_unplanned_failover.py | 2 +- .../replication_protected_items_update.py | 2 +- ...cation_protected_items_update_appliance.py | 2 +- ...protected_items_update_mobility_service.py | 2 +- ...on_protection_container_mappings_create.py | 2 +- ...on_protection_container_mappings_delete.py | 5 +- ...ation_protection_container_mappings_get.py | 2 +- ...tion_protection_container_mappings_list.py | 2 +- ...st_by_replication_protection_containers.py | 2 +- ...ion_protection_container_mappings_purge.py | 5 +- ...on_protection_container_mappings_update.py | 2 +- ...eplication_protection_containers_create.py | 2 +- ...eplication_protection_containers_delete.py | 5 +- ...on_containers_discover_protectable_item.py | 2 +- .../replication_protection_containers_get.py | 2 +- .../replication_protection_containers_list.py | 2 +- ..._containers_list_by_replication_fabrics.py | 2 +- ...protection_containers_switch_protection.py | 4 +- .../replication_protection_intents_create.py | 2 +- .../replication_protection_intents_get.py | 2 +- .../replication_protection_intents_list.py | 2 +- .../replication_recovery_plans_create.py | 2 +- .../replication_recovery_plans_delete.py | 5 +- ...lication_recovery_plans_failover_cancel.py | 2 +- ...lication_recovery_plans_failover_commit.py | 2 +- .../replication_recovery_plans_get.py | 2 +- .../replication_recovery_plans_list.py | 2 +- ...ication_recovery_plans_planned_failover.py | 2 +- .../replication_recovery_plans_reprotect.py | 2 +- ...eplication_recovery_plans_test_failover.py | 2 +- ...on_recovery_plans_test_failover_cleanup.py | 2 +- ...ation_recovery_plans_unplanned_failover.py | 2 +- .../replication_recovery_plans_update.py | 2 +- ...tion_recovery_services_providers_create.py | 2 +- ...tion_recovery_services_providers_delete.py | 5 +- ...ication_recovery_services_providers_get.py | 2 +- ...cation_recovery_services_providers_list.py | 2 +- ...s_providers_list_by_replication_fabrics.py | 2 +- ...ation_recovery_services_providers_purge.py | 5 +- ...ery_services_providers_refresh_provider.py | 2 +- ..._storage_classification_mappings_create.py | 2 +- ..._storage_classification_mappings_delete.py | 5 +- ...ion_storage_classification_mappings_get.py | 2 +- ...on_storage_classification_mappings_list.py | 2 +- ..._by_replication_storage_classifications.py | 2 +- ...replication_storage_classifications_get.py | 2 +- ...eplication_storage_classifications_list.py | 2 +- ...sifications_list_by_replication_fabrics.py | 2 +- .../replication_vault_health_get.py | 2 +- .../replication_vault_health_refresh.py | 2 +- .../replication_vault_setting_create.py | 2 +- .../replication_vault_setting_get.py | 2 +- .../replication_vault_setting_list.py | 2 +- .../replicationv_centers_create.py | 52 - .../replicationv_centers_delete.py | 5 +- .../replicationv_centers_get.py | 2 +- .../replicationv_centers_list.py | 2 +- ...onv_centers_list_by_replication_fabrics.py | 2 +- .../replicationv_centers_update.py | 44 - .../supported_operating_systems_get.py | 2 +- ...zes_list_by_replication_protected_items.py | 2 +- 204 files changed, 2886 insertions(+), 3330 deletions(-) delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_create.py delete mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_update.py diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/_meta.json b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/_meta.json index 713bb11657f46..15b3e961ec37d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/_meta.json +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/_meta.json @@ -1,11 +1,11 @@ { - "commit": "1114a5b1f0831d8b3de07db7248c8a4f38c5bbb7", + "commit": "7bde1a2886ca3356666fa18caf57ecf0c97ba75f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.6.0", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/recoveryservicessiterecovery/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/recoveryservicessiterecovery/resource-manager/readme.md --generate-sample=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.6.0 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/recoveryservicessiterecovery/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_configuration.py index bf79c2e312fb7..23ae6a0f001e6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_configuration.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class SiteRecoveryManagementClientConfiguration(Configuration): # pylint: disab :type resource_group_name: str :param resource_name: The name of the recovery services vault. Required. :type resource_name: str - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -54,7 +48,7 @@ def __init__( **kwargs: Any ) -> None: super(SiteRecoveryManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01") + api_version: str = kwargs.pop("api_version", "2023-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_serialization.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_serialization.py index 2c170e28dbca2..842ae727fbbce 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_serialization.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_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 @@ -602,7 +629,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -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 @@ -1242,7 +1271,7 @@ def _extract_name_from_internal_type(internal_type): xml_name = internal_type_xml_map.get("name", internal_type.__name__) xml_ns = internal_type_xml_map.get("ns", None) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1266,7 +1295,7 @@ def xml_key_extractor(attr, attr_desc, data): # Integrate namespace if necessary xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): @@ -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/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_site_recovery_management_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_site_recovery_management_client.py index 1aadee06da965..fdb6bc8a1441f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_site_recovery_management_client.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_site_recovery_management_client.py @@ -152,7 +152,7 @@ class SiteRecoveryManagementClient: # pylint: disable=client-accepts-api-versio :type resource_name: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -175,7 +175,7 @@ def __init__( resource_name=resource_name, **kwargs ) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -291,5 +291,5 @@ def __enter__(self) -> "SiteRecoveryManagementClient": self._client.__enter__() return self - def __exit__(self, *exc_details) -> None: + def __exit__(self, *exc_details: Any) -> None: self._client.__exit__(*exc_details) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_vendor.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_vendor.py index 9aad73fc743e7..bd0df84f5319f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_vendor.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_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/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_version.py index c47f66669f1bf..e5754a47ce68f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_version.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py index 210f5e61530b8..402e10e73ad3c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class SiteRecoveryManagementClientConfiguration(Configuration): # pylint: disab :type resource_group_name: str :param resource_name: The name of the recovery services vault. Required. :type resource_name: str - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -54,7 +48,7 @@ def __init__( **kwargs: Any ) -> None: super(SiteRecoveryManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01") + api_version: str = kwargs.pop("api_version", "2023-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_site_recovery_management_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_site_recovery_management_client.py index 77f816c362668..68613d268916b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_site_recovery_management_client.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/_site_recovery_management_client.py @@ -152,7 +152,7 @@ class SiteRecoveryManagementClient: # pylint: disable=client-accepts-api-versio :type resource_name: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this + :keyword api_version: Api Version. Default value is "2023-04-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no @@ -175,7 +175,7 @@ def __init__( resource_name=resource_name, **kwargs ) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) @@ -291,5 +291,5 @@ async def __aenter__(self) -> "SiteRecoveryManagementClient": await self._client.__aenter__() return self - async def __aexit__(self, *exc_details) -> None: + async def __aexit__(self, *exc_details: Any) -> None: await self._client.__aexit__(*exc_details) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_migration_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_migration_recovery_points_operations.py index 4c939a4a0ca05..787b3ba6ca2f7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_migration_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_migration_recovery_points_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -34,10 +33,6 @@ build_list_by_replication_migration_items_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,9 +80,7 @@ def list_by_replication_migration_items( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationRecoveryPointCollection] = kwargs.pop("cls", None) error_map = { @@ -144,8 +137,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -198,9 +192,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationRecoveryPoint] = kwargs.pop("cls", None) request = build_get_request( @@ -219,8 +211,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_operations.py index b0bf09daa5b94..492ed419622a3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -72,9 +67,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.OperationsDiscovery"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationsDiscoveryCollection] = kwargs.pop("cls", None) error_map = { @@ -127,8 +120,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_recovery_points_operations.py index 2ed0ddac0a19c..78781223a3b61 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_recovery_points_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -34,10 +33,6 @@ build_list_by_replication_protected_items_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +79,7 @@ def list_by_replication_protected_items( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPointCollection] = kwargs.pop("cls", None) error_map = { @@ -143,8 +136,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -197,9 +191,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPoint] = kwargs.pop("cls", None) request = build_get_request( @@ -218,8 +210,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_alert_settings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_alert_settings_operations.py index 4b903201838b0..6e86c74c92022 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_alert_settings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_alert_settings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -35,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,9 +73,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Alert"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AlertCollection] = kwargs.pop("cls", None) error_map = { @@ -133,8 +127,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -174,9 +169,7 @@ async def get(self, alert_setting_name: str, **kwargs: Any) -> _models.Alert: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Alert] = kwargs.pop("cls", None) request = build_get_request( @@ -192,8 +185,9 @@ async def get(self, alert_setting_name: str, **kwargs: Any) -> _models.Alert: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -270,8 +264,8 @@ async def create( :param alert_setting_name: The name of the email notification(alert) configuration. Required. :type alert_setting_name: str - :param request: The input to configure the email notification(alert). Is either a model type or - a IO type. Required. + :param request: The input to configure the email notification(alert). Is either a + ConfigureAlertRequest type or a IO type. Required. :type request: ~azure.mgmt.recoveryservicessiterecovery.models.ConfigureAlertRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -292,16 +286,14 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Alert] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(request, (IO, bytes)): + if isinstance(request, (IOBase, bytes)): _content = request else: _json = self._serialize.body(request, "ConfigureAlertRequest") @@ -322,8 +314,9 @@ async def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_appliances_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_appliances_operations.py index 45c4c60eb5304..33a345932acbb 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_appliances_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_appliances_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._replication_appliances_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,9 +70,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ApplianceCollection] = kwargs.pop("cls", None) error_map = { @@ -132,8 +125,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_eligibility_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_eligibility_results_operations.py index 4a3104851cfec..e9de1209de2c4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_eligibility_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_eligibility_results_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._replication_eligibility_results_operations import build_get_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +74,7 @@ async def list(self, virtual_machine_name: str, **kwargs: Any) -> _models.Replic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationEligibilityResultsCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -96,8 +89,9 @@ async def list(self, virtual_machine_name: str, **kwargs: Any) -> _models.Replic request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -141,9 +135,7 @@ async def get(self, virtual_machine_name: str, **kwargs: Any) -> _models.Replica _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationEligibilityResults] = kwargs.pop("cls", None) request = build_get_request( @@ -158,8 +150,9 @@ async def get(self, virtual_machine_name: str, **kwargs: Any) -> _models.Replica request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_events_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_events_operations.py index 416d6d2e22c07..6a86c1b632dac 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_events_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_events_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._replication_events_operations import build_get_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -75,9 +70,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EventCollection] = kwargs.pop("cls", None) error_map = { @@ -132,8 +125,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -173,9 +167,7 @@ async def get(self, event_name: str, **kwargs: Any) -> _models.Event: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Event] = kwargs.pop("cls", None) request = build_get_request( @@ -191,8 +183,9 @@ async def get(self, event_name: str, **kwargs: Any) -> _models.Event: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_fabrics_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_fabrics_operations.py index 931de2d9ef9c6..5ff8997ce2d35 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_fabrics_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_fabrics_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -43,10 +43,6 @@ build_renew_certificate_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -85,9 +81,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Fabric"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.FabricCollection] = kwargs.pop("cls", None) error_map = { @@ -141,8 +135,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -184,9 +179,7 @@ async def get(self, fabric_name: str, filter: Optional[str] = None, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) request = build_get_request( @@ -203,8 +196,9 @@ async def get(self, fabric_name: str, filter: Optional[str] = None, **kwargs: An request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -238,16 +232,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "FabricCreationInput") @@ -268,8 +260,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -366,7 +359,8 @@ async def begin_create( :param fabric_name: Name of the ASR fabric. Required. :type fabric_name: str - :param input: Fabric creation input. Is either a model type or a IO type. Required. + :param input: Fabric creation input. Is either a FabricCreationInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.FabricCreationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -388,9 +382,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -448,9 +440,7 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -466,8 +456,9 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -506,9 +497,7 @@ async def begin_purge(self, fabric_name: str, **kwargs: Any) -> AsyncLROPoller[N _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -559,9 +548,7 @@ async def _check_consistency_initial(self, fabric_name: str, **kwargs: Any) -> O _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) request = build_check_consistency_request( @@ -577,8 +564,9 @@ async def _check_consistency_initial(self, fabric_name: str, **kwargs: Any) -> O request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -625,9 +613,7 @@ async def begin_check_consistency(self, fabric_name: str, **kwargs: Any) -> Asyn _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -682,9 +668,7 @@ async def _migrate_to_aad_initial( # pylint: disable=inconsistent-return-statem _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_migrate_to_aad_request( @@ -700,8 +684,9 @@ async def _migrate_to_aad_initial( # pylint: disable=inconsistent-return-statem request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -740,9 +725,7 @@ async def begin_migrate_to_aad(self, fabric_name: str, **kwargs: Any) -> AsyncLR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -798,16 +781,14 @@ async def _reassociate_gateway_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(failover_process_server_request, (IO, bytes)): + if isinstance(failover_process_server_request, (IOBase, bytes)): _content = failover_process_server_request else: _json = self._serialize.body(failover_process_server_request, "FailoverProcessServerRequest") @@ -828,8 +809,9 @@ async def _reassociate_gateway_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -938,7 +920,7 @@ async def begin_reassociate_gateway( :param fabric_name: The name of the fabric containing the process server. Required. :type fabric_name: str :param failover_process_server_request: The input to the failover process server operation. Is - either a model type or a IO type. Required. + either a FailoverProcessServerRequest type or a IO type. Required. :type failover_process_server_request: ~azure.mgmt.recoveryservicessiterecovery.models.FailoverProcessServerRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -961,9 +943,7 @@ async def begin_reassociate_gateway( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1021,9 +1001,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -1039,8 +1017,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1079,9 +1058,7 @@ async def begin_delete(self, fabric_name: str, **kwargs: Any) -> AsyncLROPoller[ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1134,16 +1111,14 @@ async def _renew_certificate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(renew_certificate, (IO, bytes)): + if isinstance(renew_certificate, (IOBase, bytes)): _content = renew_certificate else: _json = self._serialize.body(renew_certificate, "RenewCertificateInput") @@ -1164,8 +1139,9 @@ async def _renew_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1262,8 +1238,8 @@ async def begin_renew_certificate( :param fabric_name: fabric name to renew certs for. Required. :type fabric_name: str - :param renew_certificate: Renew certificate input. Is either a model type or a IO type. - Required. + :param renew_certificate: Renew certificate input. Is either a RenewCertificateInput type or a + IO type. Required. :type renew_certificate: ~azure.mgmt.recoveryservicessiterecovery.models.RenewCertificateInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1286,9 +1262,7 @@ async def begin_renew_certificate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py index 0cc1bb4a8a566..b0488882e7817 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +40,6 @@ build_resume_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +80,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> AsyncIterable["_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.JobCollection] = kwargs.pop("cls", None) error_map = { @@ -141,8 +135,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -182,9 +177,7 @@ async def get(self, job_name: str, **kwargs: Any) -> _models.Job: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) request = build_get_request( @@ -200,8 +193,9 @@ async def get(self, job_name: str, **kwargs: Any) -> _models.Job: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -233,9 +227,7 @@ async def _cancel_initial(self, job_name: str, **kwargs: Any) -> Optional[_model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) request = build_cancel_request( @@ -251,8 +243,9 @@ async def _cancel_initial(self, job_name: str, **kwargs: Any) -> Optional[_model request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -297,9 +290,7 @@ async def begin_cancel(self, job_name: str, **kwargs: Any) -> AsyncLROPoller[_mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -352,9 +343,7 @@ async def _restart_initial(self, job_name: str, **kwargs: Any) -> Optional[_mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) request = build_restart_request( @@ -370,8 +359,9 @@ async def _restart_initial(self, job_name: str, **kwargs: Any) -> Optional[_mode request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -416,9 +406,7 @@ async def begin_restart(self, job_name: str, **kwargs: Any) -> AsyncLROPoller[_m _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -473,16 +461,14 @@ async def _resume_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(resume_job_params, (IO, bytes)): + if isinstance(resume_job_params, (IOBase, bytes)): _content = resume_job_params else: _json = self._serialize.body(resume_job_params, "ResumeJobParams") @@ -503,8 +489,9 @@ async def _resume_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -597,7 +584,8 @@ async def begin_resume( :param job_name: Job identifier. Required. :type job_name: str - :param resume_job_params: Resume rob comments. Is either a model type or a IO type. Required. + :param resume_job_params: Resume rob comments. Is either a ResumeJobParams type or a IO type. + Required. :type resume_job_params: ~azure.mgmt.recoveryservicessiterecovery.models.ResumeJobParams or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -617,9 +605,7 @@ async def begin_resume( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -677,16 +663,14 @@ async def _export_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(job_query_parameter, (IO, bytes)): + if isinstance(job_query_parameter, (IOBase, bytes)): _content = job_query_parameter else: _json = self._serialize.body(job_query_parameter, "JobQueryParameter") @@ -706,8 +690,9 @@ async def _export_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -789,7 +774,8 @@ async def begin_export( The operation to export the details of the Azure Site Recovery jobs of the vault. - :param job_query_parameter: job query filter. Is either a model type or a IO type. Required. + :param job_query_parameter: job query filter. Is either a JobQueryParameter type or a IO type. + Required. :type job_query_parameter: ~azure.mgmt.recoveryservicessiterecovery.models.JobQueryParameter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -810,9 +796,7 @@ async def begin_export( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_logical_networks_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_logical_networks_operations.py index 05e3610c8b7c3..562a4ef04af2f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_logical_networks_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_logical_networks_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -34,10 +33,6 @@ build_list_by_replication_fabrics_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,9 +73,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> AsyncI _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.LogicalNetworkCollection] = kwargs.pop("cls", None) error_map = { @@ -135,8 +128,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -178,9 +172,7 @@ async def get(self, fabric_name: str, logical_network_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.LogicalNetwork] = kwargs.pop("cls", None) request = build_get_request( @@ -197,8 +189,9 @@ async def get(self, fabric_name: str, logical_network_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_migration_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_migration_items_operations.py index 81d8c7a61f9bd..e1ece84fdf8a2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_migration_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_migration_items_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -46,10 +46,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -106,9 +102,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationItemCollection] = kwargs.pop("cls", None) error_map = { @@ -167,8 +161,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -214,9 +209,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) request = build_get_request( @@ -234,8 +227,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -274,16 +268,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "EnableMigrationInput") @@ -306,8 +298,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -430,7 +423,8 @@ async def begin_create( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param input: Enable migration input. Is either a model type or a IO type. Required. + :param input: Enable migration input. Is either a EnableMigrationInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.EnableMigrationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -452,9 +446,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -519,9 +511,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -540,8 +530,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -593,9 +584,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -656,16 +645,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdateMigrationItemInput") @@ -688,8 +675,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -812,7 +800,8 @@ async def begin_update( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param input: Update migration item input. Is either a model type or a IO type. Required. + :param input: Update migration item input. Is either a UpdateMigrationItemInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateMigrationItemInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -834,9 +823,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -901,16 +888,14 @@ async def _migrate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(migrate_input, (IO, bytes)): + if isinstance(migrate_input, (IOBase, bytes)): _content = migrate_input else: _json = self._serialize.body(migrate_input, "MigrateInput") @@ -933,8 +918,9 @@ async def _migrate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1057,7 +1043,7 @@ async def begin_migrate( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param migrate_input: Migrate input. Is either a model type or a IO type. Required. + :param migrate_input: Migrate input. Is either a MigrateInput type or a IO type. Required. :type migrate_input: ~azure.mgmt.recoveryservicessiterecovery.models.MigrateInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1079,9 +1065,7 @@ async def begin_migrate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1146,16 +1130,14 @@ async def _pause_replication_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(pause_replication_input, (IO, bytes)): + if isinstance(pause_replication_input, (IOBase, bytes)): _content = pause_replication_input else: _json = self._serialize.body(pause_replication_input, "PauseReplicationInput") @@ -1178,8 +1160,9 @@ async def _pause_replication_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1303,8 +1286,8 @@ async def begin_pause_replication( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param pause_replication_input: Pause replication input. Is either a model type or a IO type. - Required. + :param pause_replication_input: Pause replication input. Is either a PauseReplicationInput type + or a IO type. Required. :type pause_replication_input: ~azure.mgmt.recoveryservicessiterecovery.models.PauseReplicationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1327,9 +1310,7 @@ async def begin_pause_replication( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1394,16 +1375,14 @@ async def _resume_replication_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(resume_replication_input, (IO, bytes)): + if isinstance(resume_replication_input, (IOBase, bytes)): _content = resume_replication_input else: _json = self._serialize.body(resume_replication_input, "ResumeReplicationInput") @@ -1426,8 +1405,9 @@ async def _resume_replication_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1551,8 +1531,8 @@ async def begin_resume_replication( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param resume_replication_input: Resume replication input. Is either a model type or a IO type. - Required. + :param resume_replication_input: Resume replication input. Is either a ResumeReplicationInput + type or a IO type. Required. :type resume_replication_input: ~azure.mgmt.recoveryservicessiterecovery.models.ResumeReplicationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1575,9 +1555,7 @@ async def begin_resume_replication( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1642,16 +1620,14 @@ async def _resync_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "ResyncInput") @@ -1674,8 +1650,9 @@ async def _resync_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1798,7 +1775,7 @@ async def begin_resync( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param input: Resync input. Is either a model type or a IO type. Required. + :param input: Resync input. Is either a ResyncInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.ResyncInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1820,9 +1797,7 @@ async def begin_resync( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1887,16 +1862,14 @@ async def _test_migrate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(test_migrate_input, (IO, bytes)): + if isinstance(test_migrate_input, (IOBase, bytes)): _content = test_migrate_input else: _json = self._serialize.body(test_migrate_input, "TestMigrateInput") @@ -1919,8 +1892,9 @@ async def _test_migrate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2043,7 +2017,8 @@ async def begin_test_migrate( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param test_migrate_input: Test migrate input. Is either a model type or a IO type. Required. + :param test_migrate_input: Test migrate input. Is either a TestMigrateInput type or a IO type. + Required. :type test_migrate_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestMigrateInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2066,9 +2041,7 @@ async def begin_test_migrate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2133,16 +2106,14 @@ async def _test_migrate_cleanup_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(test_migrate_cleanup_input, (IO, bytes)): + if isinstance(test_migrate_cleanup_input, (IOBase, bytes)): _content = test_migrate_cleanup_input else: _json = self._serialize.body(test_migrate_cleanup_input, "TestMigrateCleanupInput") @@ -2165,8 +2136,9 @@ async def _test_migrate_cleanup_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2290,8 +2262,8 @@ async def begin_test_migrate_cleanup( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param test_migrate_cleanup_input: Test migrate cleanup input. Is either a model type or a IO - type. Required. + :param test_migrate_cleanup_input: Test migrate cleanup input. Is either a + TestMigrateCleanupInput type or a IO type. Required. :type test_migrate_cleanup_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestMigrateCleanupInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2314,9 +2286,7 @@ async def begin_test_migrate_cleanup( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2389,9 +2359,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationItemCollection] = kwargs.pop("cls", None) error_map = { @@ -2448,8 +2416,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_network_mappings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_network_mappings_operations.py index 2a85f57c4e87a..471670783c5c0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_network_mappings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_network_mappings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +40,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,9 +84,7 @@ def list_by_replication_networks( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -146,8 +140,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -193,9 +188,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkMapping] = kwargs.pop("cls", None) request = build_get_request( @@ -213,8 +206,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -253,16 +247,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.NetworkMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreateNetworkMappingInput") @@ -285,8 +277,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -409,7 +402,8 @@ async def begin_create( :type network_name: str :param network_mapping_name: Network mapping name. Required. :type network_mapping_name: str - :param input: Create network mapping input. Is either a model type or a IO type. Required. + :param input: Create network mapping input. Is either a CreateNetworkMappingInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateNetworkMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -431,9 +425,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkMapping] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -493,9 +485,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -513,8 +503,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -559,9 +550,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -621,16 +610,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.NetworkMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdateNetworkMappingInput") @@ -653,8 +640,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -777,7 +765,8 @@ async def begin_update( :type network_name: str :param network_mapping_name: Network mapping name. Required. :type network_mapping_name: str - :param input: Update network mapping input. Is either a model type or a IO type. Required. + :param input: Update network mapping input. Is either a UpdateNetworkMappingInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateNetworkMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -799,9 +788,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkMapping] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -862,9 +849,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.NetworkMapping"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -918,8 +903,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_networks_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_networks_operations.py index 7af947a98bf83..23b52d425241f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_networks_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_networks_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -35,10 +34,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +74,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> AsyncI _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkCollection] = kwargs.pop("cls", None) error_map = { @@ -136,8 +129,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -179,9 +173,7 @@ async def get(self, fabric_name: str, network_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Network] = kwargs.pop("cls", None) request = build_get_request( @@ -198,8 +190,9 @@ async def get(self, fabric_name: str, network_name: str, **kwargs: Any) -> _mode request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -234,9 +227,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Network"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkCollection] = kwargs.pop("cls", None) error_map = { @@ -290,8 +281,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_policies_operations.py index 7169c07349927..32c40c019ee29 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_policies_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -39,10 +39,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -81,9 +77,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Policy"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) error_map = { @@ -137,8 +131,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -178,9 +173,7 @@ async def get(self, policy_name: str, **kwargs: Any) -> _models.Policy: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Policy] = kwargs.pop("cls", None) request = build_get_request( @@ -196,8 +189,9 @@ async def get(self, policy_name: str, **kwargs: Any) -> _models.Policy: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -231,16 +225,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Policy]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreatePolicyInput") @@ -261,8 +253,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -359,7 +352,7 @@ async def begin_create( :param policy_name: Replication policy name. Required. :type policy_name: str - :param input: Create policy input. Is either a model type or a IO type. Required. + :param input: Create policy input. Is either a CreatePolicyInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreatePolicyInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -381,9 +374,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Policy] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -441,9 +432,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -459,8 +448,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -499,9 +489,7 @@ async def begin_delete(self, policy_name: str, **kwargs: Any) -> AsyncLROPoller[ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -554,16 +542,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Policy]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdatePolicyInput") @@ -584,8 +570,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -682,7 +669,7 @@ async def begin_update( :param policy_name: Policy Id. Required. :type policy_name: str - :param input: Update Policy Input. Is either a model type or a IO type. Required. + :param input: Update Policy Input. Is either a UpdatePolicyInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdatePolicyInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -704,9 +691,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Policy] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protectable_items_operations.py index ff3f3153e5b3e..ecd884c38447a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protectable_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protectable_items_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -34,10 +33,6 @@ build_list_by_replication_protection_containers_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -94,9 +89,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectableItemCollection] = kwargs.pop("cls", None) error_map = { @@ -155,8 +148,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -202,9 +196,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectableItem] = kwargs.pop("cls", None) request = build_get_request( @@ -222,8 +214,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protected_items_operations.py index b64022235b976..1307b08916368 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protected_items_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -56,10 +56,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -105,9 +101,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItemCollection] = kwargs.pop("cls", None) error_map = { @@ -163,8 +157,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -210,9 +205,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) request = build_get_request( @@ -230,8 +223,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -270,16 +264,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "EnableProtectionInput") @@ -302,8 +294,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -426,7 +419,8 @@ async def begin_create( :type protection_container_name: str :param replicated_protected_item_name: A name for the replication protected item. Required. :type replicated_protected_item_name: str - :param input: Enable Protection Input. Is either a model type or a IO type. Required. + :param input: Enable Protection Input. Is either a EnableProtectionInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.EnableProtectionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -448,9 +442,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -510,9 +502,7 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -530,8 +520,9 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -578,9 +569,7 @@ async def begin_purge( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -640,16 +629,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_protection_input, (IO, bytes)): + if isinstance(update_protection_input, (IOBase, bytes)): _content = update_protection_input else: _json = self._serialize.body(update_protection_input, "UpdateReplicationProtectedItemInput") @@ -672,8 +659,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -797,8 +785,8 @@ async def begin_update( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param update_protection_input: Update protection input. Is either a model type or a IO type. - Required. + :param update_protection_input: Update protection input. Is either a + UpdateReplicationProtectedItemInput type or a IO type. Required. :type update_protection_input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -821,9 +809,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -888,16 +874,14 @@ async def _add_disks_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(add_disks_input, (IO, bytes)): + if isinstance(add_disks_input, (IOBase, bytes)): _content = add_disks_input else: _json = self._serialize.body(add_disks_input, "AddDisksInput") @@ -920,8 +904,9 @@ async def _add_disks_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1044,7 +1029,7 @@ async def begin_add_disks( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param add_disks_input: Add disks input. Is either a model type or a IO type. Required. + :param add_disks_input: Add disks input. Is either a AddDisksInput type or a IO type. Required. :type add_disks_input: ~azure.mgmt.recoveryservicessiterecovery.models.AddDisksInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1066,9 +1051,7 @@ async def begin_add_disks( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1133,16 +1116,14 @@ async def _apply_recovery_point_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(apply_recovery_point_input, (IO, bytes)): + if isinstance(apply_recovery_point_input, (IOBase, bytes)): _content = apply_recovery_point_input else: _json = self._serialize.body(apply_recovery_point_input, "ApplyRecoveryPointInput") @@ -1165,8 +1146,9 @@ async def _apply_recovery_point_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1290,8 +1272,8 @@ async def begin_apply_recovery_point( :type protection_container_name: str :param replicated_protected_item_name: The replicated protected item name. Required. :type replicated_protected_item_name: str - :param apply_recovery_point_input: The ApplyRecoveryPointInput. Is either a model type or a IO - type. Required. + :param apply_recovery_point_input: The ApplyRecoveryPointInput. Is either a + ApplyRecoveryPointInput type or a IO type. Required. :type apply_recovery_point_input: ~azure.mgmt.recoveryservicessiterecovery.models.ApplyRecoveryPointInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1314,9 +1296,7 @@ async def begin_apply_recovery_point( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1376,9 +1356,7 @@ async def _failover_cancel_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) request = build_failover_cancel_request( @@ -1396,8 +1374,9 @@ async def _failover_cancel_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1450,9 +1429,7 @@ async def begin_failover_cancel( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1509,9 +1486,7 @@ async def _failover_commit_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) request = build_failover_commit_request( @@ -1529,8 +1504,9 @@ async def _failover_commit_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1583,9 +1559,7 @@ async def begin_failover_commit( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1647,16 +1621,14 @@ async def _planned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(failover_input, (IO, bytes)): + if isinstance(failover_input, (IOBase, bytes)): _content = failover_input else: _json = self._serialize.body(failover_input, "PlannedFailoverInput") @@ -1679,8 +1651,9 @@ async def _planned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1803,7 +1776,8 @@ async def begin_planned_failover( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param failover_input: Planned failover input. Is either a model type or a IO type. Required. + :param failover_input: Planned failover input. Is either a PlannedFailoverInput type or a IO + type. Required. :type failover_input: ~azure.mgmt.recoveryservicessiterecovery.models.PlannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1826,9 +1800,7 @@ async def begin_planned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1893,16 +1865,14 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(disable_protection_input, (IO, bytes)): + if isinstance(disable_protection_input, (IOBase, bytes)): _content = disable_protection_input else: _json = self._serialize.body(disable_protection_input, "DisableProtectionInput") @@ -1925,8 +1895,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2043,8 +2014,8 @@ async def begin_delete( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param disable_protection_input: Disable protection input. Is either a model type or a IO type. - Required. + :param disable_protection_input: Disable protection input. Is either a DisableProtectionInput + type or a IO type. Required. :type disable_protection_input: ~azure.mgmt.recoveryservicessiterecovery.models.DisableProtectionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2065,9 +2036,7 @@ async def begin_delete( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2130,16 +2099,14 @@ async def _remove_disks_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(remove_disks_input, (IO, bytes)): + if isinstance(remove_disks_input, (IOBase, bytes)): _content = remove_disks_input else: _json = self._serialize.body(remove_disks_input, "RemoveDisksInput") @@ -2162,8 +2129,9 @@ async def _remove_disks_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2286,7 +2254,8 @@ async def begin_remove_disks( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param remove_disks_input: Remove disks input. Is either a model type or a IO type. Required. + :param remove_disks_input: Remove disks input. Is either a RemoveDisksInput type or a IO type. + Required. :type remove_disks_input: ~azure.mgmt.recoveryservicessiterecovery.models.RemoveDisksInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2309,9 +2278,7 @@ async def begin_remove_disks( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2371,9 +2338,7 @@ async def _repair_replication_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) request = build_repair_replication_request( @@ -2391,8 +2356,9 @@ async def _repair_replication_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2446,9 +2412,7 @@ async def begin_repair_replication( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2510,16 +2474,14 @@ async def _reprotect_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(reprotect_input, (IO, bytes)): + if isinstance(reprotect_input, (IOBase, bytes)): _content = reprotect_input else: _json = self._serialize.body(reprotect_input, "ReverseReplicationInput") @@ -2542,8 +2504,9 @@ async def _reprotect_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2666,8 +2629,8 @@ async def begin_reprotect( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param reprotect_input: Reverse replication input. Is either a model type or a IO type. - Required. + :param reprotect_input: Reverse replication input. Is either a ReverseReplicationInput type or + a IO type. Required. :type reprotect_input: ~azure.mgmt.recoveryservicessiterecovery.models.ReverseReplicationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2690,9 +2653,7 @@ async def begin_reprotect( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -2757,16 +2718,14 @@ async def _resolve_health_errors_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(resolve_health_input, (IO, bytes)): + if isinstance(resolve_health_input, (IOBase, bytes)): _content = resolve_health_input else: _json = self._serialize.body(resolve_health_input, "ResolveHealthInput") @@ -2789,8 +2748,9 @@ async def _resolve_health_errors_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2913,8 +2873,8 @@ async def begin_resolve_health_errors( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param resolve_health_input: Health issue input object. Is either a model type or a IO type. - Required. + :param resolve_health_input: Health issue input object. Is either a ResolveHealthInput type or + a IO type. Required. :type resolve_health_input: ~azure.mgmt.recoveryservicessiterecovery.models.ResolveHealthInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2937,9 +2897,7 @@ async def begin_resolve_health_errors( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3004,16 +2962,14 @@ async def _switch_provider_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(switch_provider_input, (IO, bytes)): + if isinstance(switch_provider_input, (IOBase, bytes)): _content = switch_provider_input else: _json = self._serialize.body(switch_provider_input, "SwitchProviderInput") @@ -3036,8 +2992,9 @@ async def _switch_provider_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3161,8 +3118,8 @@ async def begin_switch_provider( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param switch_provider_input: Switch provider input. Is either a model type or a IO type. - Required. + :param switch_provider_input: Switch provider input. Is either a SwitchProviderInput type or a + IO type. Required. :type switch_provider_input: ~azure.mgmt.recoveryservicessiterecovery.models.SwitchProviderInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3185,9 +3142,7 @@ async def begin_switch_provider( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3255,16 +3210,14 @@ async def _test_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(testfailover_input, (IO, bytes)): + if isinstance(testfailover_input, (IOBase, bytes)): _content = testfailover_input else: _json = self._serialize.body(testfailover_input, "TestFailoverInput") @@ -3287,8 +3240,9 @@ async def _test_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3411,7 +3365,8 @@ async def begin_test_failover( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param testfailover_input: Test failover input. Is either a model type or a IO type. Required. + :param testfailover_input: Test failover input. Is either a TestFailoverInput type or a IO + type. Required. :type testfailover_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3434,9 +3389,7 @@ async def begin_test_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3501,16 +3454,14 @@ async def _test_failover_cleanup_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(cleanup_input, (IO, bytes)): + if isinstance(cleanup_input, (IOBase, bytes)): _content = cleanup_input else: _json = self._serialize.body(cleanup_input, "TestFailoverCleanupInput") @@ -3533,8 +3484,9 @@ async def _test_failover_cleanup_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3657,8 +3609,8 @@ async def begin_test_failover_cleanup( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param cleanup_input: Test failover cleanup input. Is either a model type or a IO type. - Required. + :param cleanup_input: Test failover cleanup input. Is either a TestFailoverCleanupInput type or + a IO type. Required. :type cleanup_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestFailoverCleanupInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3681,9 +3633,7 @@ async def begin_test_failover_cleanup( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3748,16 +3698,14 @@ async def _unplanned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(failover_input, (IO, bytes)): + if isinstance(failover_input, (IOBase, bytes)): _content = failover_input else: _json = self._serialize.body(failover_input, "UnplannedFailoverInput") @@ -3780,8 +3728,9 @@ async def _unplanned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3904,7 +3853,8 @@ async def begin_unplanned_failover( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param failover_input: Failover input. Is either a model type or a IO type. Required. + :param failover_input: Failover input. Is either a UnplannedFailoverInput type or a IO type. + Required. :type failover_input: ~azure.mgmt.recoveryservicessiterecovery.models.UnplannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3927,9 +3877,7 @@ async def begin_unplanned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -3994,16 +3942,14 @@ async def _update_appliance_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(appliance_update_input, (IO, bytes)): + if isinstance(appliance_update_input, (IOBase, bytes)): _content = appliance_update_input else: _json = self._serialize.body(appliance_update_input, "UpdateApplianceForReplicationProtectedItemInput") @@ -4026,8 +3972,9 @@ async def _update_appliance_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -4151,8 +4098,8 @@ async def begin_update_appliance( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param appliance_update_input: Appliance update protection input. Is either a model type or a - IO type. Required. + :param appliance_update_input: Appliance update protection input. Is either a + UpdateApplianceForReplicationProtectedItemInput type or a IO type. Required. :type appliance_update_input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput or IO @@ -4176,9 +4123,7 @@ async def begin_update_appliance( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4243,16 +4188,14 @@ async def _update_mobility_service_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_mobility_service_request, (IO, bytes)): + if isinstance(update_mobility_service_request, (IOBase, bytes)): _content = update_mobility_service_request else: _json = self._serialize.body(update_mobility_service_request, "UpdateMobilityServiceRequest") @@ -4275,8 +4218,9 @@ async def _update_mobility_service_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -4416,7 +4360,7 @@ async def begin_update_mobility_service( be updated. Required. :type replicated_protected_item_name: str :param update_mobility_service_request: Request to update the mobility service on the protected - item. Is either a model type or a IO type. Required. + item. Is either a UpdateMobilityServiceRequest type or a IO type. Required. :type update_mobility_service_request: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -4439,9 +4383,7 @@ async def begin_update_mobility_service( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -4512,9 +4454,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItemCollection] = kwargs.pop("cls", None) error_map = { @@ -4570,8 +4510,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_container_mappings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_container_mappings_operations.py index 93a27393f6b8a..0601f85b608f8 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_container_mappings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_container_mappings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -41,10 +41,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -90,9 +86,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -148,8 +142,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -195,9 +190,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerMapping] = kwargs.pop("cls", None) request = build_get_request( @@ -215,8 +208,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -255,16 +249,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainerMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(creation_input, (IO, bytes)): + if isinstance(creation_input, (IOBase, bytes)): _content = creation_input else: _json = self._serialize.body(creation_input, "CreateProtectionContainerMappingInput") @@ -287,8 +279,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -412,7 +405,8 @@ async def begin_create( :type protection_container_name: str :param mapping_name: Protection container mapping name. Required. :type mapping_name: str - :param creation_input: Mapping creation input. Is either a model type or a IO type. Required. + :param creation_input: Mapping creation input. Is either a + CreateProtectionContainerMappingInput type or a IO type. Required. :type creation_input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -435,9 +429,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainerMapping] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -497,9 +489,7 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -517,8 +507,9 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -563,9 +554,7 @@ async def begin_purge( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -625,16 +614,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainerMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_input, (IO, bytes)): + if isinstance(update_input, (IOBase, bytes)): _content = update_input else: _json = self._serialize.body(update_input, "UpdateProtectionContainerMappingInput") @@ -657,8 +644,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -782,7 +770,8 @@ async def begin_update( :type protection_container_name: str :param mapping_name: Protection container mapping name. Required. :type mapping_name: str - :param update_input: Mapping update input. Is either a model type or a IO type. Required. + :param update_input: Mapping update input. Is either a UpdateProtectionContainerMappingInput + type or a IO type. Required. :type update_input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -805,9 +794,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainerMapping] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -872,16 +859,14 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(removal_input, (IO, bytes)): + if isinstance(removal_input, (IOBase, bytes)): _content = removal_input else: _json = self._serialize.body(removal_input, "RemoveProtectionContainerMappingInput") @@ -904,8 +889,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1019,7 +1005,8 @@ async def begin_delete( :type protection_container_name: str :param mapping_name: Protection container mapping name. Required. :type mapping_name: str - :param removal_input: Removal input. Is either a model type or a IO type. Required. + :param removal_input: Removal input. Is either a RemoveProtectionContainerMappingInput type or + a IO type. Required. :type removal_input: ~azure.mgmt.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1040,9 +1027,7 @@ async def begin_delete( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1102,9 +1087,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ProtectionContainerMappi _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -1158,8 +1141,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_containers_operations.py index 2c3b7a1c0deb8..497c962a8b090 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_containers_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -41,10 +41,6 @@ build_switch_protection_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -87,9 +83,7 @@ def list_by_replication_fabrics( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerCollection] = kwargs.pop("cls", None) error_map = { @@ -144,8 +138,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -187,9 +182,7 @@ async def get(self, fabric_name: str, protection_container_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) request = build_get_request( @@ -206,8 +199,9 @@ async def get(self, fabric_name: str, protection_container_name: str, **kwargs: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -245,16 +239,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainer]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(creation_input, (IO, bytes)): + if isinstance(creation_input, (IOBase, bytes)): _content = creation_input else: _json = self._serialize.body(creation_input, "CreateProtectionContainerInput") @@ -276,8 +268,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -392,7 +385,8 @@ async def begin_create( :type fabric_name: str :param protection_container_name: Unique protection container ARM name. Required. :type protection_container_name: str - :param creation_input: Creation input. Is either a model type or a IO type. Required. + :param creation_input: Creation input. Is either a CreateProtectionContainerInput type or a IO + type. Required. :type creation_input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateProtectionContainerInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -415,9 +409,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -480,16 +472,14 @@ async def _discover_protectable_item_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainer]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(discover_protectable_item_request, (IO, bytes)): + if isinstance(discover_protectable_item_request, (IOBase, bytes)): _content = discover_protectable_item_request else: _json = self._serialize.body(discover_protectable_item_request, "DiscoverProtectableItemRequest") @@ -511,8 +501,9 @@ async def _discover_protectable_item_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -630,7 +621,7 @@ async def begin_discover_protectable_item( :param protection_container_name: The name of the protection container. Required. :type protection_container_name: str :param discover_protectable_item_request: The request object to add a protectable item. Is - either a model type or a IO type. Required. + either a DiscoverProtectableItemRequest type or a IO type. Required. :type discover_protectable_item_request: ~azure.mgmt.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -653,9 +644,7 @@ async def begin_discover_protectable_item( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -714,9 +703,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -733,8 +720,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -777,9 +765,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -837,16 +823,14 @@ async def _switch_protection_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainer]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(switch_input, (IO, bytes)): + if isinstance(switch_input, (IOBase, bytes)): _content = switch_input else: _json = self._serialize.body(switch_input, "SwitchProtectionInput") @@ -868,8 +852,9 @@ async def _switch_protection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -986,7 +971,8 @@ async def begin_switch_protection( :type fabric_name: str :param protection_container_name: Protection container name. Required. :type protection_container_name: str - :param switch_input: Switch protection input. Is either a model type or a IO type. Required. + :param switch_input: Switch protection input. Is either a SwitchProtectionInput type or a IO + type. Required. :type switch_input: ~azure.mgmt.recoveryservicessiterecovery.models.SwitchProtectionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1008,9 +994,7 @@ async def begin_switch_protection( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1070,9 +1054,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.ProtectionContainer"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerCollection] = kwargs.pop("cls", None) error_map = { @@ -1126,8 +1108,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_intents_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_intents_operations.py index 51316dd10a4cc..72c0e19b4ab65 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_intents_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_protection_intents_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -35,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +80,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectionIntentCollection] = kwargs.pop("cls", None) error_map = { @@ -142,8 +136,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -183,9 +178,7 @@ async def get(self, intent_object_name: str, **kwargs: Any) -> _models.Replicati _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectionIntent] = kwargs.pop("cls", None) request = build_get_request( @@ -201,8 +194,9 @@ async def get(self, intent_object_name: str, **kwargs: Any) -> _models.Replicati request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -279,7 +273,8 @@ async def create( :param intent_object_name: A name for the replication protection item. Required. :type intent_object_name: str - :param input: Create Protection Intent Input. Is either a model type or a IO type. Required. + :param input: Create Protection Intent Input. Is either a CreateProtectionIntentInput type or a + IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateProtectionIntentInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -300,16 +295,14 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectionIntent] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreateProtectionIntentInput") @@ -330,8 +323,9 @@ async def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_plans_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_plans_operations.py index 83f9d0aec4fcd..c8071b2550116 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_plans_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_plans_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -46,10 +46,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,9 +84,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.RecoveryPlan"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlanCollection] = kwargs.pop("cls", None) error_map = { @@ -144,8 +138,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -185,9 +180,7 @@ async def get(self, recovery_plan_name: str, **kwargs: Any) -> _models.RecoveryP _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) request = build_get_request( @@ -203,8 +196,9 @@ async def get(self, recovery_plan_name: str, **kwargs: Any) -> _models.RecoveryP request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -238,16 +232,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreateRecoveryPlanInput") @@ -268,8 +260,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -366,7 +359,8 @@ async def begin_create( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery Plan creation input. Is either a model type or a IO type. Required. + :param input: Recovery Plan creation input. Is either a CreateRecoveryPlanInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateRecoveryPlanInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -388,9 +382,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -448,9 +440,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -466,8 +456,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -506,9 +497,7 @@ async def begin_delete(self, recovery_plan_name: str, **kwargs: Any) -> AsyncLRO _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -561,16 +550,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdateRecoveryPlanInput") @@ -591,8 +578,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -689,7 +677,8 @@ async def begin_update( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Update recovery plan input. Is either a model type or a IO type. Required. + :param input: Update recovery plan input. Is either a UpdateRecoveryPlanInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateRecoveryPlanInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -711,9 +700,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -769,9 +756,7 @@ async def _failover_cancel_initial(self, recovery_plan_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) request = build_failover_cancel_request( @@ -787,8 +772,9 @@ async def _failover_cancel_initial(self, recovery_plan_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -837,9 +823,7 @@ async def begin_failover_cancel( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -892,9 +876,7 @@ async def _failover_commit_initial(self, recovery_plan_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) request = build_failover_commit_request( @@ -910,8 +892,9 @@ async def _failover_commit_initial(self, recovery_plan_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -960,9 +943,7 @@ async def begin_failover_commit( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1017,16 +998,14 @@ async def _planned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanPlannedFailoverInput") @@ -1047,8 +1026,9 @@ async def _planned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1145,7 +1125,8 @@ async def begin_planned_failover( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Failover input. Is either a model type or a IO type. Required. + :param input: Failover input. Is either a RecoveryPlanPlannedFailoverInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1168,9 +1149,7 @@ async def begin_planned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1226,9 +1205,7 @@ async def _reprotect_initial(self, recovery_plan_name: str, **kwargs: Any) -> Op _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) request = build_reprotect_request( @@ -1244,8 +1221,9 @@ async def _reprotect_initial(self, recovery_plan_name: str, **kwargs: Any) -> Op request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1292,9 +1270,7 @@ async def begin_reprotect(self, recovery_plan_name: str, **kwargs: Any) -> Async _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1349,16 +1325,14 @@ async def _test_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanTestFailoverInput") @@ -1379,8 +1353,9 @@ async def _test_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1477,7 +1452,8 @@ async def begin_test_failover( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery plan test failover input. Is either a model type or a IO type. Required. + :param input: Recovery plan test failover input. Is either a RecoveryPlanTestFailoverInput type + or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1500,9 +1476,7 @@ async def begin_test_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1560,16 +1534,14 @@ async def _test_failover_cleanup_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanTestFailoverCleanupInput") @@ -1590,8 +1562,9 @@ async def _test_failover_cleanup_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1689,8 +1662,8 @@ async def begin_test_failover_cleanup( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery plan test failover cleanup input. Is either a model type or a IO type. - Required. + :param input: Recovery plan test failover cleanup input. Is either a + RecoveryPlanTestFailoverCleanupInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1713,9 +1686,7 @@ async def begin_test_failover_cleanup( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1773,16 +1744,14 @@ async def _unplanned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanUnplannedFailoverInput") @@ -1803,8 +1772,9 @@ async def _unplanned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1901,8 +1871,8 @@ async def begin_unplanned_failover( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery plan unplanned failover input. Is either a model type or a IO type. - Required. + :param input: Recovery plan unplanned failover input. Is either a + RecoveryPlanUnplannedFailoverInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1925,9 +1895,7 @@ async def begin_unplanned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_services_providers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_services_providers_operations.py index 55ef1bbd4aeee..29cdd60e26abc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_services_providers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_recovery_services_providers_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -41,10 +41,6 @@ build_refresh_provider_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,9 +84,7 @@ def list_by_replication_fabrics( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProviderCollection] = kwargs.pop("cls", None) error_map = { @@ -145,8 +139,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -188,9 +183,7 @@ async def get(self, fabric_name: str, provider_name: str, **kwargs: Any) -> _mod _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProvider] = kwargs.pop("cls", None) request = build_get_request( @@ -207,8 +200,9 @@ async def get(self, fabric_name: str, provider_name: str, **kwargs: Any) -> _mod request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -246,16 +240,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryServicesProvider]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(add_provider_input, (IO, bytes)): + if isinstance(add_provider_input, (IOBase, bytes)): _content = add_provider_input else: _json = self._serialize.body(add_provider_input, "AddRecoveryServicesProviderInput") @@ -277,8 +269,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -393,7 +386,8 @@ async def begin_create( :type fabric_name: str :param provider_name: Recovery services provider name. Required. :type provider_name: str - :param add_provider_input: Add provider input. Is either a model type or a IO type. Required. + :param add_provider_input: Add provider input. Is either a AddRecoveryServicesProviderInput + type or a IO type. Required. :type add_provider_input: ~azure.mgmt.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -416,9 +410,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryServicesProvider] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -477,9 +469,7 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -496,8 +486,9 @@ async def _purge_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -538,9 +529,7 @@ async def begin_purge(self, fabric_name: str, provider_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -594,9 +583,7 @@ async def _refresh_provider_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryServicesProvider]] = kwargs.pop("cls", None) request = build_refresh_provider_request( @@ -613,8 +600,9 @@ async def _refresh_provider_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -665,9 +653,7 @@ async def begin_refresh_provider( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProvider] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -723,9 +709,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -742,8 +726,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -787,9 +772,7 @@ async def begin_delete(self, fabric_name: str, provider_name: str, **kwargs: Any _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -845,9 +828,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.RecoveryServicesProvider _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProviderCollection] = kwargs.pop("cls", None) error_map = { @@ -901,8 +882,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classification_mappings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classification_mappings_operations.py index 3da9f50fb541d..47f1d3029f2b7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classification_mappings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classification_mappings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -39,10 +39,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -88,9 +84,7 @@ def list_by_replication_storage_classifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -146,8 +140,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -197,9 +192,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationMapping] = kwargs.pop("cls", None) request = build_get_request( @@ -217,8 +210,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -257,16 +251,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.StorageClassificationMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(pairing_input, (IO, bytes)): + if isinstance(pairing_input, (IOBase, bytes)): _content = pairing_input else: _json = self._serialize.body(pairing_input, "StorageClassificationMappingInput") @@ -289,8 +281,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -414,7 +407,8 @@ async def begin_create( :type storage_classification_name: str :param storage_classification_mapping_name: Storage classification mapping name. Required. :type storage_classification_mapping_name: str - :param pairing_input: Pairing input. Is either a model type or a IO type. Required. + :param pairing_input: Pairing input. Is either a StorageClassificationMappingInput type or a IO + type. Required. :type pairing_input: ~azure.mgmt.recoveryservicessiterecovery.models.StorageClassificationMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -437,9 +431,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StorageClassificationMapping] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -503,9 +495,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -523,8 +513,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -573,9 +564,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -632,9 +621,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.StorageClassificationMap _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -688,8 +675,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classifications_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classifications_operations.py index 3ab2f04912d22..58f8b302fcbbe 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classifications_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_storage_classifications_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -35,10 +34,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -82,9 +77,7 @@ def list_by_replication_fabrics( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationCollection] = kwargs.pop("cls", None) error_map = { @@ -139,8 +132,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -184,9 +178,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassification] = kwargs.pop("cls", None) request = build_get_request( @@ -203,8 +195,9 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -240,9 +233,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.StorageClassification"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationCollection] = kwargs.pop("cls", None) error_map = { @@ -296,8 +287,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_health_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_health_operations.py index b3ddfe9f4ad5a..07784c46208bd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_health_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_health_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar, Union, cast from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._replication_vault_health_operations import build_get_request, build_refresh_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +74,7 @@ async def get(self, **kwargs: Any) -> _models.VaultHealthDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultHealthDetails] = kwargs.pop("cls", None) request = build_get_request( @@ -96,8 +89,9 @@ async def get(self, **kwargs: Any) -> _models.VaultHealthDetails: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -129,9 +123,7 @@ async def _refresh_initial(self, **kwargs: Any) -> Optional[_models.VaultHealthD _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.VaultHealthDetails]] = kwargs.pop("cls", None) request = build_refresh_request( @@ -146,8 +138,9 @@ async def _refresh_initial(self, **kwargs: Any) -> Optional[_models.VaultHealthD request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -192,9 +185,7 @@ async def begin_refresh(self, **kwargs: Any) -> AsyncLROPoller[_models.VaultHeal _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultHealthDetails] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_setting_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_setting_operations.py index 7f46e83028211..1cec7d94b8375 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_setting_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_vault_setting_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -37,10 +37,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +75,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VaultSetting"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultSettingCollection] = kwargs.pop("cls", None) error_map = { @@ -135,8 +129,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -176,9 +171,7 @@ async def get(self, vault_setting_name: str, **kwargs: Any) -> _models.VaultSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultSetting] = kwargs.pop("cls", None) request = build_get_request( @@ -194,8 +187,9 @@ async def get(self, vault_setting_name: str, **kwargs: Any) -> _models.VaultSett request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -229,16 +223,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VaultSetting] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "VaultSettingCreationInput") @@ -259,8 +251,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -358,7 +351,8 @@ async def begin_create( :param vault_setting_name: Vault setting name. Required. :type vault_setting_name: str - :param input: Vault setting creation input. Is either a model type or a IO type. Required. + :param input: Vault setting creation input. Is either a VaultSettingCreationInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.VaultSettingCreationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -380,9 +374,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VaultSetting] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replicationv_centers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replicationv_centers_operations.py index ae10ef7bf5c71..588effefd2d64 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replicationv_centers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replicationv_centers_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +40,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -84,9 +80,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> AsyncI _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VCenterCollection] = kwargs.pop("cls", None) error_map = { @@ -141,8 +135,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -184,9 +179,7 @@ async def get(self, fabric_name: str, vcenter_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VCenter] = kwargs.pop("cls", None) request = build_get_request( @@ -203,8 +196,9 @@ async def get(self, fabric_name: str, vcenter_name: str, **kwargs: Any) -> _mode request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -242,16 +236,14 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.VCenter]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(add_v_center_request, (IO, bytes)): + if isinstance(add_v_center_request, (IOBase, bytes)): _content = add_v_center_request else: _json = self._serialize.body(add_v_center_request, "AddVCenterRequest") @@ -273,8 +265,9 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -388,8 +381,8 @@ async def begin_create( :type fabric_name: str :param vcenter_name: vcenter name. Required. :type vcenter_name: str - :param add_v_center_request: The input to the add vCenter operation. Is either a model type or - a IO type. Required. + :param add_v_center_request: The input to the add vCenter operation. Is either a + AddVCenterRequest type or a IO type. Required. :type add_v_center_request: ~azure.mgmt.recoveryservicessiterecovery.models.AddVCenterRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -412,9 +405,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VCenter] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -473,9 +464,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -492,8 +481,9 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -534,9 +524,7 @@ async def begin_delete(self, fabric_name: str, vcenter_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -594,16 +582,14 @@ async def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.VCenter]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_v_center_request, (IO, bytes)): + if isinstance(update_v_center_request, (IOBase, bytes)): _content = update_v_center_request else: _json = self._serialize.body(update_v_center_request, "UpdateVCenterRequest") @@ -625,8 +611,9 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -741,8 +728,8 @@ async def begin_update( :type fabric_name: str :param vcenter_name: vcenter name. Required. :type vcenter_name: str - :param update_v_center_request: The input to the update vCenter operation. Is either a model - type or a IO type. Required. + :param update_v_center_request: The input to the update vCenter operation. Is either a + UpdateVCenterRequest type or a IO type. Required. :type update_v_center_request: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateVCenterRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -765,9 +752,7 @@ async def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VCenter] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -827,9 +812,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.VCenter"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VCenterCollection] = kwargs.pop("cls", None) error_map = { @@ -883,8 +866,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_supported_operating_systems_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_supported_operating_systems_operations.py index dca32538b07fb..4f37e134e22e4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_supported_operating_systems_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_supported_operating_systems_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._supported_operating_systems_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -79,9 +74,7 @@ async def get(self, instance_type: Optional[str] = None, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SupportedOperatingSystems] = kwargs.pop("cls", None) request = build_get_request( @@ -97,8 +90,9 @@ async def get(self, instance_type: Optional[str] = None, **kwargs: Any) -> _mode request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_target_compute_sizes_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_target_compute_sizes_operations.py index e2bad5a8278dc..3552bef86c073 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_target_compute_sizes_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_target_compute_sizes_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._target_compute_sizes_operations import build_list_by_replication_protected_items_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -80,9 +75,7 @@ def list_by_replication_protected_items( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TargetComputeSizeCollection] = kwargs.pop("cls", None) error_map = { @@ -139,8 +132,9 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/__init__.py index 43159719e379b..cbee6de416a98 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/__init__.py @@ -19,6 +19,7 @@ from ._models_py3 import A2AEnableProtectionInput from ._models_py3 import A2AEventDetails from ._models_py3 import A2AExtendedLocationDetails +from ._models_py3 import A2AFabricSpecificLocationDetails from ._models_py3 import A2APolicyCreationInput from ._models_py3 import A2APolicyDetails from ._models_py3 import A2AProtectedDiskDetails @@ -494,6 +495,7 @@ from ._models_py3 import VMwareCbtProtectionContainerMappingDetails from ._models_py3 import VMwareCbtResumeReplicationInput from ._models_py3 import VMwareCbtResyncInput +from ._models_py3 import VMwareCbtSecurityProfileProperties from ._models_py3 import VMwareCbtTestMigrateInput from ._models_py3 import VMwareCbtUpdateDiskInput from ._models_py3 import VMwareCbtUpdateMigrationItemInput @@ -562,6 +564,7 @@ from ._site_recovery_management_client_enums import ReplicationProtectedItemOperation from ._site_recovery_management_client_enums import ResyncState from ._site_recovery_management_client_enums import RpInMageRecoveryPointType +from ._site_recovery_management_client_enums import SecurityType from ._site_recovery_management_client_enums import SetMultiVmSyncStatus from ._site_recovery_management_client_enums import Severity from ._site_recovery_management_client_enums import SourceSiteOperations @@ -587,6 +590,7 @@ "A2AEnableProtectionInput", "A2AEventDetails", "A2AExtendedLocationDetails", + "A2AFabricSpecificLocationDetails", "A2APolicyCreationInput", "A2APolicyDetails", "A2AProtectedDiskDetails", @@ -1062,6 +1066,7 @@ "VMwareCbtProtectionContainerMappingDetails", "VMwareCbtResumeReplicationInput", "VMwareCbtResyncInput", + "VMwareCbtSecurityProfileProperties", "VMwareCbtTestMigrateInput", "VMwareCbtUpdateDiskInput", "VMwareCbtUpdateMigrationItemInput", @@ -1129,6 +1134,7 @@ "ReplicationProtectedItemOperation", "ResyncState", "RpInMageRecoveryPointType", + "SecurityType", "SetMultiVmSyncStatus", "Severity", "SourceSiteOperations", diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_models_py3.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_models_py3.py index 5c7d67ddd9e06..314cc3de7034b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_models_py3.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_models_py3.py @@ -46,7 +46,7 @@ class AddDisksProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "A2AAddDisksInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -81,8 +81,8 @@ def __init__( *, vm_disks: Optional[List["_models.A2AVmDiskInputDetails"]] = None, vm_managed_disks: Optional[List["_models.A2AVmManagedDiskInputDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vm_disks: The list of vm disk details. :paramtype vm_disks: @@ -129,7 +129,7 @@ class ApplyRecoveryPointProviderSpecificInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -152,7 +152,7 @@ class A2AApplyRecoveryPointInput(ApplyRecoveryPointProviderSpecificInput): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "A2A" @@ -187,7 +187,7 @@ class ReplicationProviderSpecificContainerCreationInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -210,7 +210,7 @@ class A2AContainerCreationInput(ReplicationProviderSpecificContainerCreationInpu "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "A2A" @@ -238,7 +238,7 @@ class ReplicationProviderSpecificContainerMappingInput(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "A2AContainerMappingInput", "VMwareCbt": "VMwareCbtContainerMappingInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -282,8 +282,8 @@ def __init__( automation_account_authentication_type: Optional[ Union[str, "_models.AutomationAccountAuthenticationType"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_auto_update_status: A value indicating whether the auto update is enabled. Known values are: "Disabled" and "Enabled". @@ -325,7 +325,7 @@ class CreateProtectionIntentProviderSpecificDetails(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "A2ACreateProtectionIntentInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -489,8 +489,8 @@ def __init__( Union[str, "_models.AutomationAccountAuthenticationType"] ] = None, automation_account_arm_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_object_id: The fabric specific object Id of the virtual machine. Required. :paramtype fabric_object_id: str @@ -602,7 +602,7 @@ class A2ACrossClusterMigrationApplyRecoveryPointInput(ApplyRecoveryPointProvider "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "A2ACrossClusterMigration" @@ -625,7 +625,7 @@ class A2ACrossClusterMigrationContainerCreationInput(ReplicationProviderSpecific "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "A2ACrossClusterMigration" @@ -664,7 +664,7 @@ class EnableProtectionProviderSpecificInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -694,8 +694,8 @@ class A2ACrossClusterMigrationEnableProtectionInput(EnableProtectionProviderSpec } def __init__( - self, *, fabric_object_id: Optional[str] = None, recovery_container_id: Optional[str] = None, **kwargs - ): + self, *, fabric_object_id: Optional[str] = None, recovery_container_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword fabric_object_id: The fabric specific object Id of the virtual machine. :paramtype fabric_object_id: str @@ -745,7 +745,7 @@ class PolicyProviderSpecificInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -768,7 +768,7 @@ class A2ACrossClusterMigrationPolicyCreationInput(PolicyProviderSpecificInput): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "A2ACrossClusterMigration" @@ -813,7 +813,7 @@ class ReplicationProviderSpecificSettings(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -866,8 +866,8 @@ def __init__( vm_protection_state: Optional[str] = None, vm_protection_state_description: Optional[str] = None, lifecycle_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_object_id: The fabric specific object Id of the virtual machine. :paramtype fabric_object_id: str @@ -991,8 +991,8 @@ def __init__( recovery_subnet_name: Optional[str] = None, recovery_virtual_machine_scale_set_id: Optional[str] = None, recovery_capacity_reservation_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_object_id: The fabric specific object Id of the virtual machine. Required. :paramtype fabric_object_id: str @@ -1093,7 +1093,7 @@ class EventProviderSpecificDetails(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -1143,8 +1143,8 @@ def __init__( fabric_location: Optional[str] = None, remote_fabric_name: Optional[str] = None, remote_fabric_location: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword protected_item_name: The protected item arm name. :paramtype protected_item_name: str @@ -1190,8 +1190,8 @@ def __init__( *, primary_extended_location: Optional["_models.ExtendedLocation"] = None, recovery_extended_location: Optional["_models.ExtendedLocation"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_extended_location: The primary ExtendedLocation. :paramtype primary_extended_location: @@ -1205,6 +1205,116 @@ def __init__( self.recovery_extended_location = recovery_extended_location +class A2AFabricSpecificLocationDetails(_serialization.Model): # pylint: disable=too-many-instance-attributes + """ExtendedLocation details data. + + :ivar initial_primary_zone: The initial source zone info. + :vartype initial_primary_zone: str + :ivar initial_recovery_zone: The initial target zone info. + :vartype initial_recovery_zone: str + :ivar initial_primary_extended_location: The initial primary ExtendedLocation. + :vartype initial_primary_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :ivar initial_recovery_extended_location: The initial recovery ExtendedLocation. + :vartype initial_recovery_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :ivar initial_primary_fabric_location: Initial primary fabric location info. + :vartype initial_primary_fabric_location: str + :ivar initial_recovery_fabric_location: The initial recovery fabric location info. + :vartype initial_recovery_fabric_location: str + :ivar primary_zone: Source zone info. + :vartype primary_zone: str + :ivar recovery_zone: The target zone info. + :vartype recovery_zone: str + :ivar primary_extended_location: The primary ExtendedLocation. + :vartype primary_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :ivar recovery_extended_location: The recovery ExtendedLocation. + :vartype recovery_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :ivar primary_fabric_location: Primary fabric location info. + :vartype primary_fabric_location: str + :ivar recovery_fabric_location: The recovery fabric location info. + :vartype recovery_fabric_location: str + """ + + _attribute_map = { + "initial_primary_zone": {"key": "initialPrimaryZone", "type": "str"}, + "initial_recovery_zone": {"key": "initialRecoveryZone", "type": "str"}, + "initial_primary_extended_location": {"key": "initialPrimaryExtendedLocation", "type": "ExtendedLocation"}, + "initial_recovery_extended_location": {"key": "initialRecoveryExtendedLocation", "type": "ExtendedLocation"}, + "initial_primary_fabric_location": {"key": "initialPrimaryFabricLocation", "type": "str"}, + "initial_recovery_fabric_location": {"key": "initialRecoveryFabricLocation", "type": "str"}, + "primary_zone": {"key": "primaryZone", "type": "str"}, + "recovery_zone": {"key": "recoveryZone", "type": "str"}, + "primary_extended_location": {"key": "primaryExtendedLocation", "type": "ExtendedLocation"}, + "recovery_extended_location": {"key": "recoveryExtendedLocation", "type": "ExtendedLocation"}, + "primary_fabric_location": {"key": "primaryFabricLocation", "type": "str"}, + "recovery_fabric_location": {"key": "recoveryFabricLocation", "type": "str"}, + } + + def __init__( + self, + *, + initial_primary_zone: Optional[str] = None, + initial_recovery_zone: Optional[str] = None, + initial_primary_extended_location: Optional["_models.ExtendedLocation"] = None, + initial_recovery_extended_location: Optional["_models.ExtendedLocation"] = None, + initial_primary_fabric_location: Optional[str] = None, + initial_recovery_fabric_location: Optional[str] = None, + primary_zone: Optional[str] = None, + recovery_zone: Optional[str] = None, + primary_extended_location: Optional["_models.ExtendedLocation"] = None, + recovery_extended_location: Optional["_models.ExtendedLocation"] = None, + primary_fabric_location: Optional[str] = None, + recovery_fabric_location: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword initial_primary_zone: The initial source zone info. + :paramtype initial_primary_zone: str + :keyword initial_recovery_zone: The initial target zone info. + :paramtype initial_recovery_zone: str + :keyword initial_primary_extended_location: The initial primary ExtendedLocation. + :paramtype initial_primary_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :keyword initial_recovery_extended_location: The initial recovery ExtendedLocation. + :paramtype initial_recovery_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :keyword initial_primary_fabric_location: Initial primary fabric location info. + :paramtype initial_primary_fabric_location: str + :keyword initial_recovery_fabric_location: The initial recovery fabric location info. + :paramtype initial_recovery_fabric_location: str + :keyword primary_zone: Source zone info. + :paramtype primary_zone: str + :keyword recovery_zone: The target zone info. + :paramtype recovery_zone: str + :keyword primary_extended_location: The primary ExtendedLocation. + :paramtype primary_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :keyword recovery_extended_location: The recovery ExtendedLocation. + :paramtype recovery_extended_location: + ~azure.mgmt.recoveryservicessiterecovery.models.ExtendedLocation + :keyword primary_fabric_location: Primary fabric location info. + :paramtype primary_fabric_location: str + :keyword recovery_fabric_location: The recovery fabric location info. + :paramtype recovery_fabric_location: str + """ + super().__init__(**kwargs) + self.initial_primary_zone = initial_primary_zone + self.initial_recovery_zone = initial_recovery_zone + self.initial_primary_extended_location = initial_primary_extended_location + self.initial_recovery_extended_location = initial_recovery_extended_location + self.initial_primary_fabric_location = initial_primary_fabric_location + self.initial_recovery_fabric_location = initial_recovery_fabric_location + self.primary_zone = primary_zone + self.recovery_zone = recovery_zone + self.primary_extended_location = primary_extended_location + self.recovery_extended_location = recovery_extended_location + self.primary_fabric_location = primary_fabric_location + self.recovery_fabric_location = recovery_fabric_location + + class A2APolicyCreationInput(PolicyProviderSpecificInput): """A2A Policy creation input. @@ -1246,8 +1356,8 @@ def __init__( recovery_point_history: Optional[int] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_history: The duration in minutes until which the recovery points need to be stored. @@ -1310,7 +1420,7 @@ class PolicyProviderSpecificDetails(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -1358,8 +1468,8 @@ def __init__( app_consistent_frequency_in_minutes: Optional[int] = None, multi_vm_sync_status: Optional[str] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_threshold_in_minutes: The recovery point threshold in minutes. :paramtype recovery_point_threshold_in_minutes: int @@ -1492,8 +1602,8 @@ def __init__( kek_key_vault_arm_id: Optional[str] = None, failover_disk_name: Optional[str] = None, tfo_disk_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_uri: The disk uri. :paramtype disk_uri: str @@ -1702,8 +1812,8 @@ def __init__( # pylint: disable=too-many-locals kek_key_vault_arm_id: Optional[str] = None, failover_disk_name: Optional[str] = None, tfo_disk_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The managed disk Arm id. :paramtype disk_id: str @@ -1827,7 +1937,7 @@ class ProtectionContainerMappingProviderSpecificDetails(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -1879,8 +1989,8 @@ def __init__( ] = None, schedule_name: Optional[str] = None, job_schedule_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_auto_update_status: A value indicating whether the auto update is enabled. Known values are: "Disabled" and "Enabled". @@ -1943,8 +2053,8 @@ def __init__( disk_uri: str, recovery_azure_storage_account_custom_input: Optional["_models.StorageAccountCustomDetails"] = None, primary_staging_storage_account_custom_input: Optional["_models.StorageAccountCustomDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_uri: The disk Uri. Required. :paramtype disk_uri: str @@ -2019,8 +2129,8 @@ def __init__( recovery_target_disk_account_type: Optional[str] = None, recovery_disk_encryption_set_id: Optional[str] = None, disk_encryption_info: Optional["_models.DiskEncryptionInfo"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. Required. :paramtype disk_id: str @@ -2082,7 +2192,7 @@ class ProviderSpecificRecoveryPointDetails(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -2118,8 +2228,8 @@ def __init__( *, recovery_point_sync_type: Optional[Union[str, "_models.RecoveryPointSyncType"]] = None, disks: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_sync_type: A value indicating whether the recovery point is multi VM consistent. Known values are: "MultiVmSyncRecoveryPoint" and "PerVmRecoveryPoint". @@ -2156,7 +2266,7 @@ class RemoveDisksProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "A2ARemoveDisksInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -2186,8 +2296,12 @@ class A2ARemoveDisksInput(RemoveDisksProviderSpecificInput): } def __init__( - self, *, vm_disks_uris: Optional[List[str]] = None, vm_managed_disks_ids: Optional[List[str]] = None, **kwargs - ): + self, + *, + vm_disks_uris: Optional[List[str]] = None, + vm_managed_disks_ids: Optional[List[str]] = None, + **kwargs: Any + ) -> None: """ :keyword vm_disks_uris: The list of vm disk vhd URIs. :paramtype vm_disks_uris: list[str] @@ -2460,8 +2574,8 @@ def __init__( # pylint: disable=too-many-locals auto_protection_of_data_disk: Optional[Union[str, "_models.AutoProtectionOfDataDisk"]] = None, recovery_virtual_machine_scale_set_id: Optional[str] = None, recovery_capacity_reservation_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_object_id: The fabric specific object Id of the virtual machine. :paramtype fabric_object_id: str @@ -2656,7 +2770,7 @@ class ReplicationProtectionIntentProviderSpecificSettings(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "A2AReplicationIntentDetails"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -2801,8 +2915,8 @@ def __init__( automation_account_authentication_type: Optional[ Union[str, "_models.AutomationAccountAuthenticationType"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_object_id: The fabric specific object Id of the virtual machine. :paramtype fabric_object_id: str @@ -2924,7 +3038,7 @@ class ReverseReplicationProviderSpecificInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -2974,8 +3088,8 @@ def __init__( recovery_cloud_service_id: Optional[str] = None, recovery_availability_set_id: Optional[str] = None, policy_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_container_id: The recovery container Id. :paramtype recovery_container_id: str @@ -3023,7 +3137,7 @@ class SwitchProtectionProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "A2ASwitchProtectionInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -3103,8 +3217,8 @@ def __init__( recovery_virtual_machine_scale_set_id: Optional[str] = None, recovery_capacity_reservation_group_id: Optional[str] = None, disk_encryption_info: Optional["_models.DiskEncryptionInfo"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_container_id: The recovery container Id. :paramtype recovery_container_id: str @@ -3184,7 +3298,7 @@ class TestFailoverProviderSpecificInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -3216,8 +3330,12 @@ class A2ATestFailoverInput(TestFailoverProviderSpecificInput): } def __init__( - self, *, recovery_point_id: Optional[str] = None, cloud_service_creation_option: Optional[str] = None, **kwargs - ): + self, + *, + recovery_point_id: Optional[str] = None, + cloud_service_creation_option: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword recovery_point_id: The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null should be passed. @@ -3264,7 +3382,7 @@ class UnplannedFailoverProviderSpecificInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -3296,8 +3414,12 @@ class A2AUnplannedFailoverInput(UnplannedFailoverProviderSpecificInput): } def __init__( - self, *, recovery_point_id: Optional[str] = None, cloud_service_creation_option: Optional[str] = None, **kwargs - ): + self, + *, + recovery_point_id: Optional[str] = None, + cloud_service_creation_option: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword recovery_point_id: The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. @@ -3333,8 +3455,8 @@ def __init__( *, disk_lun_id: Optional[int] = None, disk_auto_protection_status: Optional[Union[str, "_models.AutoProtectionOfDataDisk"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_lun_id: The source lun Id for the data disk. :paramtype disk_lun_id: int @@ -3372,7 +3494,7 @@ class ReplicationProviderSpecificUpdateContainerMappingInput(_serialization.Mode "instance_type": {"A2A": "A2AUpdateContainerMappingInput", "InMageRcm": "InMageRcmUpdateContainerMappingInput"} } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -3416,8 +3538,8 @@ def __init__( automation_account_authentication_type: Optional[ Union[str, "_models.AutomationAccountAuthenticationType"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_auto_update_status: A value indicating whether the auto update is enabled. Known values are: "Disabled" and "Enabled". @@ -3467,7 +3589,7 @@ class UpdateReplicationProtectedItemProviderInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -3531,8 +3653,8 @@ def __init__( recovery_proximity_placement_group_id: Optional[str] = None, recovery_virtual_machine_scale_set_id: Optional[str] = None, recovery_capacity_reservation_group_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_cloud_service_id: The target cloud service ARM Id (for V1). :paramtype recovery_cloud_service_id: str @@ -3600,8 +3722,8 @@ def __init__( disk_uri: str, recovery_azure_storage_account_id: str, primary_staging_azure_storage_account_id: str, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_uri: The disk Uri. Required. :paramtype disk_uri: str @@ -3669,8 +3791,8 @@ def __init__( recovery_target_disk_account_type: Optional[str] = None, recovery_disk_encryption_set_id: Optional[str] = None, disk_encryption_info: Optional["_models.DiskEncryptionInfo"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. Required. :paramtype disk_id: str @@ -3738,8 +3860,8 @@ def __init__( disk_encryption_info: Optional["_models.DiskEncryptionInfo"] = None, failover_disk_name: Optional[str] = None, tfo_disk_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. :paramtype disk_id: str @@ -3778,7 +3900,7 @@ class A2AZoneDetails(_serialization.Model): "target": {"key": "target", "type": "str"}, } - def __init__(self, *, source: Optional[str] = None, target: Optional[str] = None, **kwargs): + def __init__(self, *, source: Optional[str] = None, target: Optional[str] = None, **kwargs: Any) -> None: """ :keyword source: Source zone info. :paramtype source: str @@ -3801,7 +3923,7 @@ class AddDisksInput(_serialization.Model): "properties": {"key": "properties", "type": "AddDisksInputProperties"}, } - def __init__(self, *, properties: Optional["_models.AddDisksInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.AddDisksInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Add disks input properties. :paramtype properties: ~azure.mgmt.recoveryservicessiterecovery.models.AddDisksInputProperties @@ -3830,7 +3952,7 @@ class AddDisksInputProperties(_serialization.Model): "provider_specific_details": {"key": "providerSpecificDetails", "type": "AddDisksProviderSpecificInput"}, } - def __init__(self, *, provider_specific_details: "_models.AddDisksProviderSpecificInput", **kwargs): + def __init__(self, *, provider_specific_details: "_models.AddDisksProviderSpecificInput", **kwargs: Any) -> None: """ :keyword provider_specific_details: The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be @@ -3860,7 +3982,7 @@ class AddRecoveryServicesProviderInput(_serialization.Model): "properties": {"key": "properties", "type": "AddRecoveryServicesProviderInputProperties"}, } - def __init__(self, *, properties: "_models.AddRecoveryServicesProviderInputProperties", **kwargs): + def __init__(self, *, properties: "_models.AddRecoveryServicesProviderInputProperties", **kwargs: Any) -> None: """ :keyword properties: The properties of an add provider request. Required. :paramtype properties: @@ -3922,8 +4044,8 @@ def __init__( machine_id: Optional[str] = None, bios_id: Optional[str] = None, data_plane_authentication_identity_input: Optional["_models.IdentityProviderInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword machine_name: The name of the machine where the provider is getting added. Required. :paramtype machine_name: str @@ -3965,7 +4087,7 @@ class AddVCenterRequest(_serialization.Model): "properties": {"key": "properties", "type": "AddVCenterRequestProperties"}, } - def __init__(self, *, properties: Optional["_models.AddVCenterRequestProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.AddVCenterRequestProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: The properties of an add vCenter request. :paramtype properties: @@ -4006,8 +4128,8 @@ def __init__( process_server_id: Optional[str] = None, port: Optional[str] = None, run_as_account_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The friendly name of the vCenter. :paramtype friendly_name: str @@ -4061,7 +4183,7 @@ class AgentDetails(_serialization.Model): "disks": {"key": "disks", "type": "[AgentDiskDetails]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.agent_id = None @@ -4104,7 +4226,7 @@ class AgentDiskDetails(_serialization.Model): "lun_id": {"key": "lunId", "type": "int"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.disk_id = None @@ -4142,7 +4264,7 @@ class Resource(_serialization.Model): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: Optional[str] = None, **kwargs): + def __init__(self, *, location: Optional[str] = None, **kwargs: Any) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -4186,8 +4308,8 @@ class Alert(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.AlertProperties"] = None, **kwargs - ): + self, *, location: Optional[str] = None, properties: Optional["_models.AlertProperties"] = None, **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -4212,7 +4334,9 @@ class AlertCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Alert"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Alert"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of alerts. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.Alert] @@ -4247,8 +4371,8 @@ def __init__( send_to_owners: Optional[str] = None, custom_email_addresses: Optional[List[str]] = None, locale: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword send_to_owners: A value indicating whether to send email to subscription administrator. @@ -4279,8 +4403,12 @@ class ApplianceCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.ReplicationAppliance"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.ReplicationAppliance"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: The appliance details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.ReplicationAppliance] @@ -4303,7 +4431,7 @@ class ApplianceQueryParameter(_serialization.Model): "provider_type": {"key": "providerType", "type": "str"}, } - def __init__(self, *, provider_type: Optional[str] = None, **kwargs): + def __init__(self, *, provider_type: Optional[str] = None, **kwargs: Any) -> None: """ :keyword provider_type: The providerType to be used for fetching appliance details. :paramtype provider_type: str @@ -4334,7 +4462,7 @@ class ApplianceSpecificDetails(_serialization.Model): _subtype_map = {"instance_type": {"InMageRcm": "InMageRcmApplianceSpecificDetails"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -4358,7 +4486,7 @@ class ApplyRecoveryPointInput(_serialization.Model): "properties": {"key": "properties", "type": "ApplyRecoveryPointInputProperties"}, } - def __init__(self, *, properties: "_models.ApplyRecoveryPointInputProperties", **kwargs): + def __init__(self, *, properties: "_models.ApplyRecoveryPointInputProperties", **kwargs: Any) -> None: """ :keyword properties: The input properties to apply recovery point. Required. :paramtype properties: @@ -4397,8 +4525,8 @@ def __init__( *, provider_specific_details: "_models.ApplyRecoveryPointProviderSpecificInput", recovery_point_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_id: The recovery point Id. :paramtype recovery_point_id: str @@ -4448,7 +4576,7 @@ class JobDetails(_serialization.Model): } } - def __init__(self, *, affected_object_details: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, affected_object_details: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword affected_object_details: The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. @@ -4481,7 +4609,7 @@ class AsrJobDetails(JobDetails): "affected_object_details": {"key": "affectedObjectDetails", "type": "{str}"}, } - def __init__(self, *, affected_object_details: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, affected_object_details: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword affected_object_details: The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. @@ -4554,8 +4682,8 @@ def __init__( custom_details: Optional["_models.TaskTypeDetails"] = None, group_task_custom_details: Optional["_models.GroupTaskDetails"] = None, errors: Optional[List["_models.JobErrorDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword task_id: The Id. :paramtype task_id: str @@ -4633,7 +4761,7 @@ class TaskTypeDetails(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -4695,8 +4823,8 @@ def __init__( job_id: Optional[str] = None, job_output: Optional[str] = None, is_primary_side_script: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The recovery plan task name. :paramtype name: str @@ -4758,7 +4886,7 @@ class FabricSpecificCreationInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -4784,7 +4912,7 @@ class AzureFabricCreationInput(FabricSpecificCreationInput): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, location: Optional[str] = None, **kwargs): + def __init__(self, *, location: Optional[str] = None, **kwargs: Any) -> None: """ :keyword location: The Location. :paramtype location: str @@ -4826,7 +4954,7 @@ class FabricSpecificDetails(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -4848,6 +4976,9 @@ class AzureFabricSpecificDetails(FabricSpecificDetails): :ivar extended_locations: The ExtendedLocations. :vartype extended_locations: list[~azure.mgmt.recoveryservicessiterecovery.models.A2AExtendedLocationDetails] + :ivar location_details: The location details. + :vartype location_details: + list[~azure.mgmt.recoveryservicessiterecovery.models.A2AFabricSpecificLocationDetails] """ _validation = { @@ -4860,6 +4991,7 @@ class AzureFabricSpecificDetails(FabricSpecificDetails): "container_ids": {"key": "containerIds", "type": "[str]"}, "zones": {"key": "zones", "type": "[A2AZoneDetails]"}, "extended_locations": {"key": "extendedLocations", "type": "[A2AExtendedLocationDetails]"}, + "location_details": {"key": "locationDetails", "type": "[A2AFabricSpecificLocationDetails]"}, } def __init__( @@ -4869,8 +5001,9 @@ def __init__( container_ids: Optional[List[str]] = None, zones: Optional[List["_models.A2AZoneDetails"]] = None, extended_locations: Optional[List["_models.A2AExtendedLocationDetails"]] = None, - **kwargs - ): + location_details: Optional[List["_models.A2AFabricSpecificLocationDetails"]] = None, + **kwargs: Any + ) -> None: """ :keyword location: The Location for the Azure fabric. :paramtype location: str @@ -4881,6 +5014,9 @@ def __init__( :keyword extended_locations: The ExtendedLocations. :paramtype extended_locations: list[~azure.mgmt.recoveryservicessiterecovery.models.A2AExtendedLocationDetails] + :keyword location_details: The location details. + :paramtype location_details: + list[~azure.mgmt.recoveryservicessiterecovery.models.A2AFabricSpecificLocationDetails] """ super().__init__(**kwargs) self.instance_type: str = "Azure" @@ -4888,6 +5024,7 @@ def __init__( self.container_ids = container_ids self.zones = zones self.extended_locations = extended_locations + self.location_details = location_details class FabricSpecificCreateNetworkMappingInput(_serialization.Model): @@ -4919,7 +5056,7 @@ class FabricSpecificCreateNetworkMappingInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -4946,7 +5083,7 @@ class AzureToAzureCreateNetworkMappingInput(FabricSpecificCreateNetworkMappingIn "primary_network_id": {"key": "primaryNetworkId", "type": "str"}, } - def __init__(self, *, primary_network_id: str, **kwargs): + def __init__(self, *, primary_network_id: str, **kwargs: Any) -> None: """ :keyword primary_network_id: The primary azure vnet Id. Required. :paramtype primary_network_id: str @@ -4985,7 +5122,7 @@ class NetworkMappingFabricSpecificSettings(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -5015,8 +5152,12 @@ class AzureToAzureNetworkMappingSettings(NetworkMappingFabricSpecificSettings): } def __init__( - self, *, primary_fabric_location: Optional[str] = None, recovery_fabric_location: Optional[str] = None, **kwargs - ): + self, + *, + primary_fabric_location: Optional[str] = None, + recovery_fabric_location: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword primary_fabric_location: The primary fabric location. :paramtype primary_fabric_location: str @@ -5058,7 +5199,7 @@ class FabricSpecificUpdateNetworkMappingInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -5084,7 +5225,7 @@ class AzureToAzureUpdateNetworkMappingInput(FabricSpecificUpdateNetworkMappingIn "primary_network_id": {"key": "primaryNetworkId", "type": "str"}, } - def __init__(self, *, primary_network_id: Optional[str] = None, **kwargs): + def __init__(self, *, primary_network_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword primary_network_id: The primary azure vnet Id. :paramtype primary_network_id: str @@ -5113,8 +5254,8 @@ def __init__( *, tags: Optional[Dict[str, str]] = None, input_endpoints: Optional[List["_models.InputEndpoint"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: The Azure VM tags. :paramtype tags: dict[str, str] @@ -5177,8 +5318,8 @@ def __init__( lun_id: Optional[str] = None, disk_encryption_set_id: Optional[str] = None, custom_target_disk_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vhd_type: VHD type. :paramtype vhd_type: str @@ -5228,7 +5369,7 @@ class ComputeSizeErrorDetails(_serialization.Model): "severity": {"key": "severity", "type": "str"}, } - def __init__(self, *, message: Optional[str] = None, severity: Optional[str] = None, **kwargs): + def __init__(self, *, message: Optional[str] = None, severity: Optional[str] = None, **kwargs: Any) -> None: """ :keyword message: The error message. :paramtype message: str @@ -5268,7 +5409,7 @@ class ConfigurationSettings(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -5286,7 +5427,9 @@ class ConfigureAlertRequest(_serialization.Model): "properties": {"key": "properties", "type": "ConfigureAlertRequestProperties"}, } - def __init__(self, *, properties: Optional["_models.ConfigureAlertRequestProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.ConfigureAlertRequestProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: The properties of a configure alert request. :paramtype properties: @@ -5319,8 +5462,8 @@ def __init__( send_to_owners: Optional[str] = None, custom_email_addresses: Optional[List[str]] = None, locale: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword send_to_owners: A value indicating whether to send email to subscription administrator. @@ -5357,7 +5500,7 @@ class ConsistencyCheckTaskDetails(TaskTypeDetails): "vm_details": {"key": "vmDetails", "type": "[InconsistentVmDetails]"}, } - def __init__(self, *, vm_details: Optional[List["_models.InconsistentVmDetails"]] = None, **kwargs): + def __init__(self, *, vm_details: Optional[List["_models.InconsistentVmDetails"]] = None, **kwargs: Any) -> None: """ :keyword vm_details: The list of inconsistent Vm details. :paramtype vm_details: @@ -5386,7 +5529,7 @@ class CreateNetworkMappingInput(_serialization.Model): "properties": {"key": "properties", "type": "CreateNetworkMappingInputProperties"}, } - def __init__(self, *, properties: "_models.CreateNetworkMappingInputProperties", **kwargs): + def __init__(self, *, properties: "_models.CreateNetworkMappingInputProperties", **kwargs: Any) -> None: """ :keyword properties: Input properties for creating network mapping. Required. :paramtype properties: @@ -5426,8 +5569,8 @@ def __init__( recovery_network_id: str, recovery_fabric_name: Optional[str] = None, fabric_specific_details: Optional["_models.FabricSpecificCreateNetworkMappingInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_fabric_name: Recovery fabric Name. :paramtype recovery_fabric_name: str @@ -5455,7 +5598,7 @@ class CreatePolicyInput(_serialization.Model): "properties": {"key": "properties", "type": "CreatePolicyInputProperties"}, } - def __init__(self, *, properties: Optional["_models.CreatePolicyInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.CreatePolicyInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Policy creation properties. :paramtype properties: @@ -5477,7 +5620,9 @@ class CreatePolicyInputProperties(_serialization.Model): "provider_specific_input": {"key": "providerSpecificInput", "type": "PolicyProviderSpecificInput"}, } - def __init__(self, *, provider_specific_input: Optional["_models.PolicyProviderSpecificInput"] = None, **kwargs): + def __init__( + self, *, provider_specific_input: Optional["_models.PolicyProviderSpecificInput"] = None, **kwargs: Any + ) -> None: """ :keyword provider_specific_input: The ReplicationProviderSettings. :paramtype provider_specific_input: @@ -5499,7 +5644,9 @@ class CreateProtectionContainerInput(_serialization.Model): "properties": {"key": "properties", "type": "CreateProtectionContainerInputProperties"}, } - def __init__(self, *, properties: Optional["_models.CreateProtectionContainerInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.CreateProtectionContainerInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Create protection container input properties. :paramtype properties: @@ -5528,8 +5675,8 @@ def __init__( self, *, provider_specific_input: Optional[List["_models.ReplicationProviderSpecificContainerCreationInput"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider_specific_input: Provider specific inputs for container creation. :paramtype provider_specific_input: @@ -5552,8 +5699,8 @@ class CreateProtectionContainerMappingInput(_serialization.Model): } def __init__( - self, *, properties: Optional["_models.CreateProtectionContainerMappingInputProperties"] = None, **kwargs - ): + self, *, properties: Optional["_models.CreateProtectionContainerMappingInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Configure protection input properties. :paramtype properties: @@ -5590,8 +5737,8 @@ def __init__( target_protection_container_id: Optional[str] = None, policy_id: Optional[str] = None, provider_specific_input: Optional["_models.ReplicationProviderSpecificContainerMappingInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword target_protection_container_id: The target unique protection container name. :paramtype target_protection_container_id: str @@ -5619,7 +5766,9 @@ class CreateProtectionIntentInput(_serialization.Model): "properties": {"key": "properties", "type": "CreateProtectionIntentProperties"}, } - def __init__(self, *, properties: Optional["_models.CreateProtectionIntentProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.CreateProtectionIntentProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Create protection intent input properties. :paramtype properties: @@ -5649,8 +5798,8 @@ def __init__( self, *, provider_specific_details: Optional["_models.CreateProtectionIntentProviderSpecificDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider_specific_details: The ReplicationProviderInput. For A2A provider, it will be A2ACreateProtectionIntentInput object. @@ -5679,7 +5828,7 @@ class CreateRecoveryPlanInput(_serialization.Model): "properties": {"key": "properties", "type": "CreateRecoveryPlanInputProperties"}, } - def __init__(self, *, properties: "_models.CreateRecoveryPlanInputProperties", **kwargs): + def __init__(self, *, properties: "_models.CreateRecoveryPlanInputProperties", **kwargs: Any) -> None: """ :keyword properties: Recovery plan creation properties. Required. :paramtype properties: @@ -5731,8 +5880,8 @@ def __init__( groups: List["_models.RecoveryPlanGroup"], failover_deployment_model: Optional[Union[str, "_models.FailoverDeploymentModel"]] = None, provider_specific_input: Optional[List["_models.RecoveryPlanProviderSpecificInput"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_fabric_id: The primary fabric Id. Required. :paramtype primary_fabric_id: str @@ -5785,7 +5934,7 @@ class CriticalJobHistoryDetails(_serialization.Model): "job_status": {"key": "jobStatus", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.job_name = None @@ -5819,7 +5968,7 @@ class CurrentJobDetails(_serialization.Model): "start_time": {"key": "startTime", "type": "iso-8601"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.job_name = None @@ -5850,8 +5999,8 @@ def __init__( scenario_name: Optional[str] = None, job_id: Optional[str] = None, start_time: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scenario_name: Scenario name. :paramtype scenario_name: str @@ -5897,8 +6046,8 @@ def __init__( capacity: Optional[str] = None, free_space: Optional[str] = None, type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword symbolic_name: The symbolic name of data store. :paramtype symbolic_name: str @@ -5937,7 +6086,7 @@ class DisableProtectionInput(_serialization.Model): "properties": {"key": "properties", "type": "DisableProtectionInputProperties"}, } - def __init__(self, *, properties: "_models.DisableProtectionInputProperties", **kwargs): + def __init__(self, *, properties: "_models.DisableProtectionInputProperties", **kwargs: Any) -> None: """ :keyword properties: Disable protection input properties. Required. :paramtype properties: @@ -5972,8 +6121,8 @@ def __init__( *, disable_protection_reason: Optional[Union[str, "_models.DisableProtectionReason"]] = None, replication_provider_input: Optional["_models.DisableProtectionProviderSpecificInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disable_protection_reason: Disable protection reason. It can have values NotSpecified/MigrationComplete. Known values are: "NotSpecified" and "MigrationComplete". @@ -6010,7 +6159,7 @@ class DisableProtectionProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"InMage": "InMageDisableProtectionProviderSpecificInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -6028,7 +6177,9 @@ class DiscoverProtectableItemRequest(_serialization.Model): "properties": {"key": "properties", "type": "DiscoverProtectableItemRequestProperties"}, } - def __init__(self, *, properties: Optional["_models.DiscoverProtectableItemRequestProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.DiscoverProtectableItemRequestProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: The properties of a discover protectable item request. :paramtype properties: @@ -6061,8 +6212,8 @@ def __init__( friendly_name: Optional[str] = None, ip_address: Optional[str] = None, os_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The friendly name of the physical machine. :paramtype friendly_name: str @@ -6104,8 +6255,8 @@ def __init__( vhd_type: Optional[str] = None, vhd_id: Optional[str] = None, vhd_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword max_size_mb: The hard disk max size in MB. :paramtype max_size_mb: int @@ -6144,8 +6295,8 @@ def __init__( *, disk_encryption_key_info: Optional["_models.DiskEncryptionKeyInfo"] = None, key_encryption_key_info: Optional["_models.KeyEncryptionKeyInfo"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_encryption_key_info: The recovery KeyVault reference for secret. :paramtype disk_encryption_key_info: @@ -6174,8 +6325,8 @@ class DiskEncryptionKeyInfo(_serialization.Model): } def __init__( - self, *, secret_identifier: Optional[str] = None, key_vault_resource_arm_id: Optional[str] = None, **kwargs - ): + self, *, secret_identifier: Optional[str] = None, key_vault_resource_arm_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword secret_identifier: The secret url / identifier. :paramtype secret_identifier: str @@ -6201,7 +6352,7 @@ class DiskVolumeDetails(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, label: Optional[str] = None, name: Optional[str] = None, **kwargs): + def __init__(self, *, label: Optional[str] = None, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword label: The volume label. :paramtype label: str @@ -6214,7 +6365,9 @@ def __init__(self, *, label: Optional[str] = None, name: Optional[str] = None, * class Display(_serialization.Model): - """Contains the localized display information for this particular operation / action. These value will be used by several clients for (1) custom role definitions for RBAC; (2) complex query filters for the event service; and (3) audit history / records for management operations. + """Contains the localized display information for this particular operation / action. These value + will be used by several clients for (1) custom role definitions for RBAC; (2) complex query + filters for the event service; and (3) audit history / records for management operations. :ivar provider: The provider. The localized friendly form of the resource provider name - it is expected to also include the publisher/company responsible. It should use Title Casing and @@ -6256,8 +6409,8 @@ def __init__( resource: Optional[str] = None, operation: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider: The provider. The localized friendly form of the resource provider name - it is expected to also include the publisher/company responsible. It should use Title Casing and @@ -6342,7 +6495,7 @@ class DraDetails(_serialization.Model): "reverse_protected_item_count": {"key": "reverseProtectedItemCount", "type": "int"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -6374,7 +6527,7 @@ class EnableMigrationInput(_serialization.Model): "properties": {"key": "properties", "type": "EnableMigrationInputProperties"}, } - def __init__(self, *, properties: "_models.EnableMigrationInputProperties", **kwargs): + def __init__(self, *, properties: "_models.EnableMigrationInputProperties", **kwargs: Any) -> None: """ :keyword properties: Enable migration input properties. Required. :paramtype properties: @@ -6407,8 +6560,12 @@ class EnableMigrationInputProperties(_serialization.Model): } def __init__( - self, *, policy_id: str, provider_specific_details: "_models.EnableMigrationProviderSpecificInput", **kwargs - ): + self, + *, + policy_id: str, + provider_specific_details: "_models.EnableMigrationProviderSpecificInput", + **kwargs: Any + ) -> None: """ :keyword policy_id: The policy Id. Required. :paramtype policy_id: str @@ -6443,7 +6600,7 @@ class EnableMigrationProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"VMwareCbt": "VMwareCbtEnableMigrationInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -6461,7 +6618,9 @@ class EnableProtectionInput(_serialization.Model): "properties": {"key": "properties", "type": "EnableProtectionInputProperties"}, } - def __init__(self, *, properties: Optional["_models.EnableProtectionInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.EnableProtectionInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Enable protection input properties. :paramtype properties: @@ -6500,8 +6659,8 @@ def __init__( policy_id: Optional[str] = None, protectable_item_id: Optional[str] = None, provider_specific_details: Optional["_models.EnableProtectionProviderSpecificInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword policy_id: The Policy Id. :paramtype policy_id: str @@ -6542,8 +6701,8 @@ def __init__( kek_state: Optional[str] = None, kek_cert_thumbprint: Optional[str] = None, kek_cert_expiry_date: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword kek_state: The key encryption key state for the Vmm. :paramtype kek_state: str @@ -6590,8 +6749,8 @@ class Event(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.EventProperties"] = None, **kwargs - ): + self, *, location: Optional[str] = None, properties: Optional["_models.EventProperties"] = None, **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -6616,7 +6775,9 @@ class EventCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Event"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Event"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of events. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.Event] @@ -6688,8 +6849,8 @@ def __init__( provider_specific_details: Optional["_models.EventProviderSpecificDetails"] = None, event_specific_details: Optional["_models.EventSpecificDetails"] = None, health_errors: Optional[List["_models.HealthError"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword event_code: The Id of the monitoring event. :paramtype event_code: str @@ -6777,8 +6938,8 @@ def __init__( affected_object_correlation_id: Optional[str] = None, start_time: Optional[datetime.datetime] = None, end_time: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword event_code: The source id of the events to be queried. :paramtype event_code: str @@ -6832,7 +6993,7 @@ class EventSpecificDetails(_serialization.Model): _subtype_map = {"instance_type": {"JobStatus": "JobStatusEventDetails"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -6860,7 +7021,7 @@ class ProtectionProfileCustomDetails(_serialization.Model): _subtype_map = {"resource_type": {"Existing": "ExistingProtectionProfile", "New": "NewProtectionProfile"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.resource_type: Optional[str] = None @@ -6888,7 +7049,7 @@ class ExistingProtectionProfile(ProtectionProfileCustomDetails): "protection_profile_id": {"key": "protectionProfileId", "type": "str"}, } - def __init__(self, *, protection_profile_id: str, **kwargs): + def __init__(self, *, protection_profile_id: str, **kwargs: Any) -> None: """ :keyword protection_profile_id: The protection profile Arm Id. Throw error, if resource does not exists. Required. @@ -6921,7 +7082,7 @@ class RecoveryAvailabilitySetCustomDetails(_serialization.Model): _subtype_map = {"resource_type": {"Existing": "ExistingRecoveryAvailabilitySet"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.resource_type: Optional[str] = None @@ -6948,7 +7109,7 @@ class ExistingRecoveryAvailabilitySet(RecoveryAvailabilitySetCustomDetails): "recovery_availability_set_id": {"key": "recoveryAvailabilitySetId", "type": "str"}, } - def __init__(self, *, recovery_availability_set_id: Optional[str] = None, **kwargs): + def __init__(self, *, recovery_availability_set_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword recovery_availability_set_id: The recovery availability set Id. Will throw error, if resource does not exist. @@ -6981,7 +7142,7 @@ class RecoveryProximityPlacementGroupCustomDetails(_serialization.Model): _subtype_map = {"resource_type": {"Existing": "ExistingRecoveryProximityPlacementGroup"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.resource_type: Optional[str] = None @@ -7008,7 +7169,7 @@ class ExistingRecoveryProximityPlacementGroup(RecoveryProximityPlacementGroupCus "recovery_proximity_placement_group_id": {"key": "recoveryProximityPlacementGroupId", "type": "str"}, } - def __init__(self, *, recovery_proximity_placement_group_id: Optional[str] = None, **kwargs): + def __init__(self, *, recovery_proximity_placement_group_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword recovery_proximity_placement_group_id: The recovery proximity placement group Id. Will throw error, if resource does not exist. @@ -7041,7 +7202,7 @@ class RecoveryResourceGroupCustomDetails(_serialization.Model): _subtype_map = {"resource_type": {"Existing": "ExistingRecoveryResourceGroup"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.resource_type: Optional[str] = None @@ -7067,7 +7228,7 @@ class ExistingRecoveryResourceGroup(RecoveryResourceGroupCustomDetails): "recovery_resource_group_id": {"key": "recoveryResourceGroupId", "type": "str"}, } - def __init__(self, *, recovery_resource_group_id: Optional[str] = None, **kwargs): + def __init__(self, *, recovery_resource_group_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword recovery_resource_group_id: The recovery resource group Id. Valid for V2 scenarios. :paramtype recovery_resource_group_id: str @@ -7099,7 +7260,7 @@ class RecoveryVirtualNetworkCustomDetails(_serialization.Model): _subtype_map = {"resource_type": {"Existing": "ExistingRecoveryVirtualNetwork", "New": "NewRecoveryVirtualNetwork"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.resource_type: Optional[str] = None @@ -7130,7 +7291,9 @@ class ExistingRecoveryVirtualNetwork(RecoveryVirtualNetworkCustomDetails): "recovery_subnet_name": {"key": "recoverySubnetName", "type": "str"}, } - def __init__(self, *, recovery_virtual_network_id: str, recovery_subnet_name: Optional[str] = None, **kwargs): + def __init__( + self, *, recovery_virtual_network_id: str, recovery_subnet_name: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword recovery_virtual_network_id: The recovery virtual network Id. Will throw error, if resource does not exist. Required. @@ -7166,7 +7329,7 @@ class StorageAccountCustomDetails(_serialization.Model): _subtype_map = {"resource_type": {"Existing": "ExistingStorageAccount"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.resource_type: Optional[str] = None @@ -7194,7 +7357,7 @@ class ExistingStorageAccount(StorageAccountCustomDetails): "azure_storage_account_id": {"key": "azureStorageAccountId", "type": "str"}, } - def __init__(self, *, azure_storage_account_id: str, **kwargs): + def __init__(self, *, azure_storage_account_id: str, **kwargs: Any) -> None: """ :keyword azure_storage_account_id: The storage account Arm Id. Throw error, if resource does not exists. Required. @@ -7239,8 +7402,8 @@ def __init__( affected_object_details: Optional[Dict[str, str]] = None, blob_uri: Optional[str] = None, sas_token: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword affected_object_details: The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. @@ -7277,7 +7440,7 @@ class ExtendedLocation(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, name: str, type: Union[str, "_models.ExtendedLocationType"], **kwargs): + def __init__(self, *, name: str, type: Union[str, "_models.ExtendedLocationType"], **kwargs: Any) -> None: """ :keyword name: The name of the extended location. Required. :paramtype name: str @@ -7321,8 +7484,8 @@ class Fabric(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.FabricProperties"] = None, **kwargs - ): + self, *, location: Optional[str] = None, properties: Optional["_models.FabricProperties"] = None, **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -7347,7 +7510,9 @@ class FabricCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Fabric"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Fabric"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The fabric details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.Fabric] @@ -7371,7 +7536,7 @@ class FabricCreationInput(_serialization.Model): "properties": {"key": "properties", "type": "FabricCreationInputProperties"}, } - def __init__(self, *, properties: Optional["_models.FabricCreationInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.FabricCreationInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Fabric creation input. :paramtype properties: @@ -7393,7 +7558,9 @@ class FabricCreationInputProperties(_serialization.Model): "custom_details": {"key": "customDetails", "type": "FabricSpecificCreationInput"}, } - def __init__(self, *, custom_details: Optional["_models.FabricSpecificCreationInput"] = None, **kwargs): + def __init__( + self, *, custom_details: Optional["_models.FabricSpecificCreationInput"] = None, **kwargs: Any + ) -> None: """ :keyword custom_details: Fabric provider specific creation input. :paramtype custom_details: @@ -7448,8 +7615,8 @@ def __init__( custom_details: Optional["_models.FabricSpecificDetails"] = None, health_error_details: Optional[List["_models.HealthError"]] = None, health: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: Friendly name of the fabric. :paramtype friendly_name: str @@ -7489,6 +7656,11 @@ class FabricQueryParameter(_serialization.Model): :ivar zone_to_zone_mappings: A value indicating whether the zone to zone mappings are to be returned. :vartype zone_to_zone_mappings: str + :ivar extended_location_mappings: A value indicating whether the Extended Location mappings are + to be returned. + :vartype extended_location_mappings: str + :ivar location_details: A value indicating whether the location details are to be returned. + :vartype location_details: str :ivar fetch_agent_details: A value indicating whether the agent details are to be fetched. :vartype fetch_agent_details: str :ivar bios_id: The BIOS Id to be used for fetching agent details. @@ -7503,6 +7675,8 @@ class FabricQueryParameter(_serialization.Model): _attribute_map = { "zone_to_zone_mappings": {"key": "zoneToZoneMappings", "type": "str"}, + "extended_location_mappings": {"key": "extendedLocationMappings", "type": "str"}, + "location_details": {"key": "locationDetails", "type": "str"}, "fetch_agent_details": {"key": "fetchAgentDetails", "type": "str"}, "bios_id": {"key": "biosId", "type": "str"}, "fqdn": {"key": "fqdn", "type": "str"}, @@ -7514,17 +7688,24 @@ def __init__( self, *, zone_to_zone_mappings: Optional[str] = None, + extended_location_mappings: Optional[str] = None, + location_details: Optional[str] = None, fetch_agent_details: Optional[str] = None, bios_id: Optional[str] = None, fqdn: Optional[str] = None, discovery_type: Optional[str] = None, os_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword zone_to_zone_mappings: A value indicating whether the zone to zone mappings are to be returned. :paramtype zone_to_zone_mappings: str + :keyword extended_location_mappings: A value indicating whether the Extended Location mappings + are to be returned. + :paramtype extended_location_mappings: str + :keyword location_details: A value indicating whether the location details are to be returned. + :paramtype location_details: str :keyword fetch_agent_details: A value indicating whether the agent details are to be fetched. :paramtype fetch_agent_details: str :keyword bios_id: The BIOS Id to be used for fetching agent details. @@ -7539,6 +7720,8 @@ def __init__( """ super().__init__(**kwargs) self.zone_to_zone_mappings = zone_to_zone_mappings + self.extended_location_mappings = extended_location_mappings + self.location_details = location_details self.fetch_agent_details = fetch_agent_details self.bios_id = bios_id self.fqdn = fqdn @@ -7547,7 +7730,8 @@ def __init__( class JobTaskDetails(TaskTypeDetails): - """This class represents a task which is actually a workflow so that one can navigate to its individual drill down. + """This class represents a task which is actually a workflow so that one can navigate to its + individual drill down. You probably want to use the sub-classes and not this class directly. Known sub-classes are: FabricReplicationGroupTaskDetails, VirtualMachineTaskDetails @@ -7576,7 +7760,7 @@ class JobTaskDetails(TaskTypeDetails): } } - def __init__(self, *, job_task: Optional["_models.JobEntity"] = None, **kwargs): + def __init__(self, *, job_task: Optional["_models.JobEntity"] = None, **kwargs: Any) -> None: """ :keyword job_task: The job entity. :paramtype job_task: ~azure.mgmt.recoveryservicessiterecovery.models.JobEntity @@ -7618,8 +7802,8 @@ def __init__( job_task: Optional["_models.JobEntity"] = None, skipped_reason: Optional[str] = None, skipped_reason_string: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword job_task: The job entity. :paramtype job_task: ~azure.mgmt.recoveryservicessiterecovery.models.JobEntity @@ -7665,8 +7849,8 @@ def __init__( *, affected_object_details: Optional[Dict[str, str]] = None, protected_item_details: Optional[List["_models.FailoverReplicationProtectedItemDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword affected_object_details: The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. @@ -7692,7 +7876,9 @@ class FailoverProcessServerRequest(_serialization.Model): "properties": {"key": "properties", "type": "FailoverProcessServerRequestProperties"}, } - def __init__(self, *, properties: Optional["_models.FailoverProcessServerRequestProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.FailoverProcessServerRequestProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: The properties of the PS Failover request. :paramtype properties: @@ -7733,8 +7919,8 @@ def __init__( target_process_server_id: Optional[str] = None, vms_to_migrate: Optional[List[str]] = None, update_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword container_name: The container identifier. :paramtype container_name: str @@ -7802,8 +7988,8 @@ def __init__( subnet: Optional[str] = None, recovery_point_id: Optional[str] = None, recovery_point_time: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name. :paramtype name: str @@ -7837,7 +8023,8 @@ def __init__( class GroupTaskDetails(_serialization.Model): - """This class represents the group task details when parent child relationship exists in the drill down. + """This class represents the group task details when parent child relationship exists in the drill + down. You probably want to use the sub-classes and not this class directly. Known sub-classes are: InlineWorkflowTaskDetails, RecoveryPlanGroupTaskDetails @@ -7866,7 +8053,7 @@ class GroupTaskDetails(_serialization.Model): } } - def __init__(self, *, child_tasks: Optional[List["_models.ASRTask"]] = None, **kwargs): + def __init__(self, *, child_tasks: Optional[List["_models.ASRTask"]] = None, **kwargs: Any) -> None: """ :keyword child_tasks: The child tasks. :paramtype child_tasks: list[~azure.mgmt.recoveryservicessiterecovery.models.ASRTask] @@ -7954,8 +8141,8 @@ def __init__( entity_id: Optional[str] = None, error_id: Optional[str] = None, customer_resolvability: Optional[Union[str, "_models.HealthErrorCustomerResolvability"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword inner_health_errors: The inner health errors. HealthError having a list of HealthError as child errors is problematic. InnerHealthError is used because this will prevent an infinite @@ -8058,8 +8245,8 @@ def __init__( affected_resource_type: Optional[str] = None, affected_resource_subtype: Optional[str] = None, affected_resource_correlation_ids: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword summary_code: The code of the health error. :paramtype summary_code: str @@ -8117,7 +8304,7 @@ class HyperVHostDetails(_serialization.Model): "mars_agent_version": {"key": "marsAgentVersion", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -8161,8 +8348,8 @@ def __init__( fabric_name: Optional[str] = None, remote_container_name: Optional[str] = None, remote_fabric_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword container_name: The container friendly name. :paramtype container_name: str @@ -8217,8 +8404,8 @@ def __init__( fabric_name: Optional[str] = None, remote_container_name: Optional[str] = None, remote_fabric_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword container_name: The container friendly name. :paramtype container_name: str @@ -8265,8 +8452,8 @@ def __init__( *, primary_kek_certificate_pfx: Optional[str] = None, secondary_kek_certificate_pfx: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_kek_certificate_pfx: The primary kek certificate pfx. :paramtype primary_kek_certificate_pfx: str @@ -8307,8 +8494,8 @@ def __init__( log_storage_account_id: Optional[str] = None, disk_type: Optional[Union[str, "_models.DiskAccountType"]] = None, disk_encryption_set_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The DiskId. :paramtype disk_id: str @@ -8475,8 +8662,8 @@ def __init__( # pylint: disable=too-many-locals seed_managed_disk_tags: Optional[Dict[str, str]] = None, target_managed_disk_tags: Optional[Dict[str, str]] = None, target_nic_tags: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword hv_host_vm_id: The Hyper-V host VM Id. :paramtype hv_host_vm_id: str @@ -8610,8 +8797,8 @@ def __init__( container_name: Optional[str] = None, fabric_name: Optional[str] = None, remote_container_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword container_name: The container friendly name. :paramtype container_name: str @@ -8656,7 +8843,7 @@ class PlannedFailoverProviderSpecificFailoverInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -8694,8 +8881,8 @@ def __init__( data_sync_option: Optional[str] = None, recovery_vm_creation_option: Optional[str] = None, provider_id_for_alternate_recovery: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword data_sync_option: Data sync option. :paramtype data_sync_option: str @@ -8738,8 +8925,8 @@ def __init__( seed_managed_disk_id: Optional[str] = None, replica_disk_type: Optional[str] = None, disk_encryption_set_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. :paramtype disk_id: str @@ -8790,8 +8977,8 @@ def __init__( primary_kek_certificate_pfx: Optional[str] = None, secondary_kek_certificate_pfx: Optional[str] = None, recovery_point_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_kek_certificate_pfx: Primary kek certificate pfx. :paramtype primary_kek_certificate_pfx: str @@ -8859,8 +9046,8 @@ def __init__( online_replication_start_time: Optional[str] = None, encryption: Optional[str] = None, active_storage_account_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_history_duration_in_hours: The duration (in hours) to which point the recovery history needs to be maintained. @@ -8936,8 +9123,8 @@ def __init__( replication_interval: Optional[int] = None, online_replication_start_time: Optional[str] = None, storage_accounts: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_history_duration: The duration (in hours) to which point the recovery history needs to be maintained. @@ -9127,8 +9314,8 @@ def __init__( # pylint: disable=too-many-locals target_managed_disk_tags: Optional[Dict[str, str]] = None, target_nic_tags: Optional[Dict[str, str]] = None, protected_managed_disks: Optional[List["_models.HyperVReplicaAzureManagedDiskDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword azure_vm_disk_details: Azure VM Disk details. :paramtype azure_vm_disk_details: @@ -9284,8 +9471,8 @@ def __init__( v_hd_id: Optional[str] = None, storage_account_id: Optional[str] = None, log_storage_account_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword hv_host_vm_id: The Hyper-V host Vm Id. :paramtype hv_host_vm_id: str @@ -9343,8 +9530,8 @@ def __init__( primary_kek_certificate_pfx: Optional[str] = None, secondary_kek_certificate_pfx: Optional[str] = None, recovery_point_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_kek_certificate_pfx: Primary kek certificate pfx. :paramtype primary_kek_certificate_pfx: str @@ -9394,8 +9581,8 @@ def __init__( primary_kek_certificate_pfx: Optional[str] = None, secondary_kek_certificate_pfx: Optional[str] = None, recovery_point_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_kek_certificate_pfx: Primary kek certificate pfx. :paramtype primary_kek_certificate_pfx: str @@ -9484,8 +9671,8 @@ def __init__( target_nic_tags: Optional[Dict[str, str]] = None, sql_server_license_type: Optional[Union[str, "_models.SqlServerLicenseType"]] = None, vm_disks: Optional[List["_models.UpdateDiskInput"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_azure_v1_resource_group_id: The recovery Azure resource group Id for classic deployment. @@ -9567,8 +9754,8 @@ def __init__( fabric_name: Optional[str] = None, remote_container_name: Optional[str] = None, remote_fabric_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword container_name: The container friendly name. :paramtype container_name: str @@ -9652,8 +9839,8 @@ def __init__( replication_port: Optional[int] = None, allowed_authentication_type: Optional[int] = None, replica_deletion_option: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_points: A value indicating the number of recovery points. :paramtype recovery_points: int @@ -9741,8 +9928,8 @@ def __init__( vm_protection_state_description: Optional[str] = None, initial_replication_details: Optional["_models.InitialReplicationDetails"] = None, v_m_disk_details: Optional[List["_models.DiskDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword last_replicated_time: The Last replication time. :paramtype last_replicated_time: ~datetime.datetime @@ -9840,8 +10027,8 @@ def __init__( replication_port: Optional[int] = None, allowed_authentication_type: Optional[int] = None, replica_deletion_option: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword replication_frequency_in_seconds: A value indicating the replication interval. :paramtype replication_frequency_in_seconds: int @@ -9952,8 +10139,8 @@ def __init__( replication_port: Optional[int] = None, allowed_authentication_type: Optional[int] = None, replica_deletion: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_points: A value indicating the number of recovery points. :paramtype recovery_points: int @@ -10059,8 +10246,8 @@ def __init__( allowed_authentication_type: Optional[int] = None, replica_deletion: Optional[str] = None, replication_frequency_in_seconds: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_points: A value indicating the number of recovery points. :paramtype recovery_points: int @@ -10152,8 +10339,8 @@ def __init__( vm_protection_state_description: Optional[str] = None, initial_replication_details: Optional["_models.InitialReplicationDetails"] = None, v_m_disk_details: Optional[List["_models.DiskDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword last_replicated_time: The Last replication time. :paramtype last_replicated_time: ~datetime.datetime @@ -10247,8 +10434,8 @@ def __init__( replication_port: Optional[int] = None, allowed_authentication_type: Optional[int] = None, replica_deletion_option: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_points: A value indicating the number of recovery points. :paramtype recovery_points: int @@ -10336,8 +10523,8 @@ def __init__( vm_protection_state_description: Optional[str] = None, initial_replication_details: Optional["_models.InitialReplicationDetails"] = None, v_m_disk_details: Optional[List["_models.DiskDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword last_replicated_time: The Last replication time. :paramtype last_replicated_time: ~datetime.datetime @@ -10386,7 +10573,7 @@ class HyperVSiteDetails(FabricSpecificDetails): "hyper_v_hosts": {"key": "hyperVHosts", "type": "[HyperVHostDetails]"}, } - def __init__(self, *, hyper_v_hosts: Optional[List["_models.HyperVHostDetails"]] = None, **kwargs): + def __init__(self, *, hyper_v_hosts: Optional[List["_models.HyperVHostDetails"]] = None, **kwargs: Any) -> None: """ :keyword hyper_v_hosts: The list of Hyper-V hosts associated with the fabric. :paramtype hyper_v_hosts: @@ -10462,8 +10649,8 @@ def __init__( has_fibre_channel_adapter: Optional[Union[str, "_models.PresenceStatus"]] = None, has_shared_vhd: Optional[Union[str, "_models.PresenceStatus"]] = None, hyper_v_host_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword source_item_id: The source id of the object. :paramtype source_item_id: str @@ -10538,8 +10725,8 @@ def __init__( object_id: Optional[str] = None, audience: Optional[str] = None, aad_authority: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tenant_id: The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. @@ -10603,8 +10790,8 @@ class IdentityProviderInput(_serialization.Model): } def __init__( - self, *, tenant_id: str, application_id: str, object_id: str, audience: str, aad_authority: str, **kwargs - ): + self, *, tenant_id: str, application_id: str, object_id: str, audience: str, aad_authority: str, **kwargs: Any + ) -> None: """ :keyword tenant_id: The tenant Id for the service principal with which the on-premise management/data plane components would communicate with our Azure services. Required. @@ -10631,7 +10818,8 @@ def __init__( class InconsistentVmDetails(_serialization.Model): - """This class stores the monitoring details for consistency check of inconsistent Protected Entity. + """This class stores the monitoring details for consistency check of inconsistent Protected + Entity. :ivar vm_name: The Vm name. :vartype vm_name: str @@ -10657,8 +10845,8 @@ def __init__( cloud_name: Optional[str] = None, details: Optional[List[str]] = None, error_ids: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vm_name: The Vm name. :paramtype vm_name: str @@ -10696,8 +10884,8 @@ def __init__( *, initial_replication_type: Optional[str] = None, initial_replication_progress_percentage: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword initial_replication_type: Initial replication type. :paramtype initial_replication_type: str @@ -10737,8 +10925,8 @@ def __init__( *, child_tasks: Optional[List["_models.ASRTask"]] = None, workflow_ids: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword child_tasks: The child tasks. :paramtype child_tasks: list[~azure.mgmt.recoveryservicessiterecovery.models.ASRTask] @@ -10778,8 +10966,8 @@ def __init__( agent_update_status: Optional[str] = None, post_update_reboot_status: Optional[str] = None, agent_expiry_date: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_version: The agent version. :paramtype agent_version: str @@ -10815,7 +11003,7 @@ class InMageAzureV2ApplyRecoveryPointInput(ApplyRecoveryPointProviderSpecificInp "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "InMageAzureV2" @@ -10849,8 +11037,8 @@ def __init__( log_storage_account_id: Optional[str] = None, disk_type: Optional[Union[str, "_models.DiskAccountType"]] = None, disk_encryption_set_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The DiskId. :paramtype disk_id: str @@ -11004,8 +11192,8 @@ def __init__( # pylint: disable=too-many-locals seed_managed_disk_tags: Optional[Dict[str, str]] = None, target_managed_disk_tags: Optional[Dict[str, str]] = None, target_nic_tags: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword master_target_id: The Master target Id. :paramtype master_target_id: str @@ -11148,8 +11336,8 @@ def __init__( details: Optional[str] = None, summary: Optional[str] = None, site_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword event_type: InMage Event type. Takes one of the values of InMageDataContract.InMageMonitoringEventType. @@ -11209,8 +11397,8 @@ def __init__( replica_disk_type: Optional[str] = None, disk_encryption_set_id: Optional[str] = None, target_disk_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk id. :paramtype disk_id: str @@ -11273,8 +11461,8 @@ def __init__( recovery_point_history: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, multi_vm_sync_status: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword crash_consistent_frequency_in_minutes: The crash consistent snapshot frequency in minutes. @@ -11343,8 +11531,8 @@ def __init__( recovery_point_history: Optional[int] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_threshold_in_minutes: The recovery point threshold in minutes. :paramtype recovery_point_threshold_in_minutes: int @@ -11474,8 +11662,8 @@ def __init__( progress_health: Optional[str] = None, progress_status: Optional[str] = None, seconds_to_take_switch_provider: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk id. :paramtype disk_id: str @@ -11571,7 +11759,7 @@ class InMageAzureV2RecoveryPointDetails(ProviderSpecificRecoveryPointDetails): "is_multi_vm_sync_point": {"key": "isMultiVmSyncPoint", "type": "str"}, } - def __init__(self, *, is_multi_vm_sync_point: Optional[str] = None, **kwargs): + def __init__(self, *, is_multi_vm_sync_point: Optional[str] = None, **kwargs: Any) -> None: """ :keyword is_multi_vm_sync_point: A value indicating whether the recovery point is multi VM consistent. @@ -11895,8 +12083,8 @@ def __init__( # pylint: disable=too-many-locals List["_models.InMageAzureV2SwitchProviderBlockingErrorDetails"] ] = None, switch_provider_details: Optional["_models.InMageAzureV2SwitchProviderDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword infrastructure_vm_id: The infrastructure VM Id. :paramtype infrastructure_vm_id: str @@ -12168,8 +12356,8 @@ def __init__( policy_id: Optional[str] = None, log_storage_account_id: Optional[str] = None, disks_to_include: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword master_target_id: The Master target Id. :paramtype master_target_id: str @@ -12234,7 +12422,7 @@ class InMageAzureV2SwitchProviderBlockingErrorDetails(_serialization.Model): "error_tags": {"key": "errorTags", "type": "{str}"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.error_code = None @@ -12274,7 +12462,7 @@ class InMageAzureV2SwitchProviderDetails(_serialization.Model): "target_appliance_id": {"key": "targetApplianceId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.target_vault_id = None @@ -12305,7 +12493,7 @@ class SwitchProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"InMageAzureV2": "InMageAzureV2SwitchProviderInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -12340,7 +12528,7 @@ class InMageAzureV2SwitchProviderInput(SwitchProviderSpecificInput): "target_appliance_id": {"key": "targetApplianceID", "type": "str"}, } - def __init__(self, *, target_vault_id: str, target_fabric_id: str, target_appliance_id: str, **kwargs): + def __init__(self, *, target_vault_id: str, target_fabric_id: str, target_appliance_id: str, **kwargs: Any) -> None: """ :keyword target_vault_id: The target vault Id. Required. :paramtype target_vault_id: str @@ -12377,7 +12565,7 @@ class InMageAzureV2TestFailoverInput(TestFailoverProviderSpecificInput): "recovery_point_id": {"key": "recoveryPointId", "type": "str"}, } - def __init__(self, *, recovery_point_id: Optional[str] = None, **kwargs): + def __init__(self, *, recovery_point_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword recovery_point_id: The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null should be passed. @@ -12409,7 +12597,7 @@ class InMageAzureV2UnplannedFailoverInput(UnplannedFailoverProviderSpecificInput "recovery_point_id": {"key": "recoveryPointId", "type": "str"}, } - def __init__(self, *, recovery_point_id: Optional[str] = None, **kwargs): + def __init__(self, *, recovery_point_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword recovery_point_id: The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. @@ -12487,8 +12675,8 @@ def __init__( target_nic_tags: Optional[Dict[str, str]] = None, sql_server_license_type: Optional[Union[str, "_models.SqlServerLicenseType"]] = None, vm_disks: Optional[List["_models.UpdateDiskInput"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_azure_v1_resource_group_id: The recovery Azure resource group Id for classic deployment. @@ -12567,8 +12755,8 @@ def __init__( recovery_point_history: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, multi_vm_sync_status: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_threshold_in_minutes: The recovery point threshold in minutes. :paramtype recovery_point_threshold_in_minutes: int @@ -12609,7 +12797,7 @@ class InMageDisableProtectionProviderSpecificInput(DisableProtectionProviderSpec "replica_vm_deletion_status": {"key": "replicaVmDeletionStatus", "type": "str"}, } - def __init__(self, *, replica_vm_deletion_status: Optional[str] = None, **kwargs): + def __init__(self, *, replica_vm_deletion_status: Optional[str] = None, **kwargs: Any) -> None: """ :keyword replica_vm_deletion_status: A value indicating whether the replica VM should be destroyed or retained. Values from Delete and Retain. @@ -12655,8 +12843,8 @@ def __init__( disk_type: Optional[str] = None, disk_configuration: Optional[str] = None, volume_list: Optional[List["_models.DiskVolumeDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. :paramtype disk_id: str @@ -12701,8 +12889,8 @@ def __init__( *, volume_options: Optional[List["_models.InMageVolumeExclusionOptions"]] = None, disk_signature_options: Optional[List["_models.InMageDiskSignatureExclusionOptions"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword volume_options: The volume label based option for disk exclusion. :paramtype volume_options: @@ -12717,7 +12905,8 @@ def __init__( class InMageDiskSignatureExclusionOptions(_serialization.Model): - """Guest disk signature based disk exclusion option when doing enable protection of virtual machine in InMage provider. + """Guest disk signature based disk exclusion option when doing enable protection of virtual + machine in InMage provider. :ivar disk_signature: The guest signature of disk to be excluded from replication. :vartype disk_signature: str @@ -12727,7 +12916,7 @@ class InMageDiskSignatureExclusionOptions(_serialization.Model): "disk_signature": {"key": "diskSignature", "type": "str"}, } - def __init__(self, *, disk_signature: Optional[str] = None, **kwargs): + def __init__(self, *, disk_signature: Optional[str] = None, **kwargs: Any) -> None: """ :keyword disk_signature: The guest signature of disk to be excluded from replication. :paramtype disk_signature: str @@ -12804,8 +12993,8 @@ def __init__( datastore_name: Optional[str] = None, disk_exclusion_input: Optional["_models.InMageDiskExclusionInput"] = None, disks_to_include: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vm_friendly_name: The VM Name. :paramtype vm_friendly_name: str @@ -12880,7 +13069,7 @@ class InMageFabricSwitchProviderBlockingErrorDetails(_serialization.Model): "error_tags": {"key": "errorTags", "type": "{str}"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.error_code = None @@ -12928,8 +13117,8 @@ def __init__( recovery_point_history: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, multi_vm_sync_status: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_threshold_in_minutes: The recovery point threshold in minutes. :paramtype recovery_point_threshold_in_minutes: int @@ -12989,8 +13178,8 @@ def __init__( recovery_point_threshold_in_minutes: Optional[int] = None, recovery_point_history: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_threshold_in_minutes: The recovery point threshold in minutes. :paramtype recovery_point_threshold_in_minutes: int @@ -13112,8 +13301,8 @@ def __init__( resync_start_time: Optional[datetime.datetime] = None, progress_health: Optional[str] = None, progress_status: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk id. :paramtype disk_id: str @@ -13222,7 +13411,7 @@ class InMageRcmAgentUpgradeBlockingErrorDetails(_serialization.Model): "error_tags": {"key": "errorTags", "type": "{str}"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.error_code = None @@ -13295,7 +13484,7 @@ class InMageRcmApplianceDetails(_serialization.Model): # pylint: disable=too-ma }, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -13335,7 +13524,7 @@ class InMageRcmApplianceSpecificDetails(ApplianceSpecificDetails): "appliances": {"key": "appliances", "type": "[InMageRcmApplianceDetails]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "InMageRcm" @@ -13363,7 +13552,7 @@ class InMageRcmApplyRecoveryPointInput(ApplyRecoveryPointProviderSpecificInput): "recovery_point_id": {"key": "recoveryPointId", "type": "str"}, } - def __init__(self, *, recovery_point_id: str, **kwargs): + def __init__(self, *, recovery_point_id: str, **kwargs: Any) -> None: """ :keyword recovery_point_id: The recovery point Id. Required. :paramtype recovery_point_id: str @@ -13434,7 +13623,7 @@ class InMageRcmDiscoveredProtectedVmDetails(_serialization.Model): # pylint: di "last_discovery_time_in_utc": {"key": "lastDiscoveryTimeInUtc", "type": "iso-8601"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.v_center_id = None @@ -13487,8 +13676,8 @@ def __init__( log_storage_account_id: str, disk_type: Union[str, "_models.DiskAccountType"], disk_encryption_set_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. Required. :paramtype disk_id: str @@ -13538,8 +13727,8 @@ def __init__( log_storage_account_id: str, disk_type: Union[str, "_models.DiskAccountType"], disk_encryption_set_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_storage_account_id: The log storage account ARM Id. Required. :paramtype log_storage_account_id: str @@ -13656,8 +13845,8 @@ def __init__( target_boot_diagnostics_storage_account_id: Optional[str] = None, run_as_account_id: Optional[str] = None, multi_vm_group_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_discovery_machine_id: The ARM Id of discovered machine. Required. :paramtype fabric_discovery_machine_id: str @@ -13773,7 +13962,7 @@ class InMageRcmEventDetails(EventProviderSpecificDetails): "component_display_name": {"key": "componentDisplayName", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "InMageRcm" @@ -13824,8 +14013,8 @@ def __init__( vmware_site_id: str, physical_site_id: str, source_agent_identity: "_models.IdentityProviderInput", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vmware_site_id: The ARM Id of the VMware site. Required. :paramtype vmware_site_id: str @@ -13930,7 +14119,9 @@ class InMageRcmFabricSpecificDetails(FabricSpecificDetails): # pylint: disable= "agent_details": {"key": "agentDetails", "type": "[AgentDetails]"}, } - def __init__(self, *, source_agent_identity_details: Optional["_models.IdentityProviderDetails"] = None, **kwargs): + def __init__( + self, *, source_agent_identity_details: Optional["_models.IdentityProviderDetails"] = None, **kwargs: Any + ) -> None: """ :keyword source_agent_identity_details: The source agent identity details. :paramtype source_agent_identity_details: @@ -13993,7 +14184,7 @@ class InMageRcmFabricSwitchProviderBlockingErrorDetails(_serialization.Model): "error_tags": {"key": "errorTags", "type": "{str}"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.error_code = None @@ -14067,7 +14258,7 @@ class InMageRcmFailbackDiscoveredProtectedVmDetails( "last_discovery_time_in_utc": {"key": "lastDiscoveryTimeInUtc", "type": "iso-8601"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.v_center_id = None @@ -14123,7 +14314,7 @@ class InMageRcmFailbackEventDetails(EventProviderSpecificDetails): "component_display_name": {"key": "componentDisplayName", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "InMageRcmFailback" @@ -14185,7 +14376,7 @@ class InMageRcmFailbackMobilityAgentDetails(_serialization.Model): "is_upgradeable": {"key": "isUpgradeable", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.version = None @@ -14228,7 +14419,7 @@ class InMageRcmFailbackNicDetails(_serialization.Model): "source_ip_address": {"key": "sourceIpAddress", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.mac_address = None @@ -14260,7 +14451,9 @@ class InMageRcmFailbackPlannedFailoverProviderInput(PlannedFailoverProviderSpeci "recovery_point_type": {"key": "recoveryPointType", "type": "str"}, } - def __init__(self, *, recovery_point_type: Union[str, "_models.InMageRcmFailbackRecoveryPointType"], **kwargs): + def __init__( + self, *, recovery_point_type: Union[str, "_models.InMageRcmFailbackRecoveryPointType"], **kwargs: Any + ) -> None: """ :keyword recovery_point_type: The recovery point type. Required. Known values are: "ApplicationConsistent" and "CrashConsistent". @@ -14301,8 +14494,8 @@ def __init__( *, crash_consistent_frequency_in_minutes: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword crash_consistent_frequency_in_minutes: The crash consistent snapshot frequency (in minutes). @@ -14346,8 +14539,8 @@ def __init__( *, app_consistent_frequency_in_minutes: Optional[int] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword app_consistent_frequency_in_minutes: The app consistent snapshot frequency in minutes. :paramtype app_consistent_frequency_in_minutes: int @@ -14424,8 +14617,8 @@ def __init__( *, ir_details: Optional["_models.InMageRcmFailbackSyncDetails"] = None, resync_details: Optional["_models.InMageRcmFailbackSyncDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ir_details: The initial replication details. :paramtype ir_details: @@ -14610,8 +14803,8 @@ def __init__( # pylint: disable=too-many-locals mobility_agent_details: Optional["_models.InMageRcmFailbackMobilityAgentDetails"] = None, vm_nics: Optional[List["_models.InMageRcmFailbackNicDetails"]] = None, discovered_vm_details: Optional["_models.InMageRcmFailbackDiscoveredProtectedVmDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword protected_disks: The list of protected disks. :paramtype protected_disks: @@ -14687,7 +14880,9 @@ class InMageRcmFailbackReprotectInput(ReverseReplicationProviderSpecificInput): "policy_id": {"key": "policyId", "type": "str"}, } - def __init__(self, *, process_server_id: str, policy_id: str, run_as_account_id: Optional[str] = None, **kwargs): + def __init__( + self, *, process_server_id: str, policy_id: str, run_as_account_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword process_server_id: The process server Id. Required. :paramtype process_server_id: str @@ -14753,7 +14948,7 @@ class InMageRcmFailbackSyncDetails(_serialization.Model): "progress_percentage": {"key": "progressPercentage", "type": "int"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.progress_health = None @@ -14803,7 +14998,7 @@ class InMageRcmLastAgentUpgradeErrorDetails(_serialization.Model): "error_tags": {"key": "errorTags", "type": "{str}"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.error_code = None @@ -14869,7 +15064,7 @@ class InMageRcmMobilityAgentDetails(_serialization.Model): "is_upgradeable": {"key": "isUpgradeable", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.version = None @@ -14957,8 +15152,8 @@ def __init__( test_subnet_name: Optional[str] = None, test_ip_address: Optional[str] = None, test_ip_address_type: Optional[Union[str, "_models.EthernetAddressType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword is_primary_nic: A value indicating whether this is the primary NIC. :paramtype is_primary_nic: str @@ -15044,8 +15239,8 @@ def __init__( target_static_ip_address: Optional[str] = None, test_subnet_name: Optional[str] = None, test_static_ip_address: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword nic_id: The NIC Id. Required. :paramtype nic_id: str @@ -15111,8 +15306,8 @@ def __init__( crash_consistent_frequency_in_minutes: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, enable_multi_vm_sync: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_history_in_minutes: The duration in minutes until which the recovery points need to be stored. @@ -15172,8 +15367,8 @@ def __init__( app_consistent_frequency_in_minutes: Optional[int] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, enable_multi_vm_sync: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_history_in_minutes: The duration in minutes until which the recovery points need to be stored. @@ -15272,8 +15467,8 @@ def __init__( disk_type: Optional[Union[str, "_models.DiskAccountType"]] = None, ir_details: Optional["_models.InMageRcmSyncDetails"] = None, resync_details: Optional["_models.InMageRcmSyncDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_type: The disk type. Known values are: "Standard_LRS", "Premium_LRS", and "StandardSSD_LRS". @@ -15325,7 +15520,7 @@ class InMageRcmProtectionContainerMappingDetails(ProtectionContainerMappingProvi "enable_agent_auto_upgrade": {"key": "enableAgentAutoUpgrade", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "InMageRcm" @@ -15356,7 +15551,7 @@ class InMageRcmRecoveryPointDetails(ProviderSpecificRecoveryPointDetails): "is_multi_vm_sync_point": {"key": "isMultiVmSyncPoint", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "InMageRcm" @@ -15627,8 +15822,8 @@ def __init__( # pylint: disable=too-many-locals ] = None, vm_nics: Optional[List["_models.InMageRcmNicDetails"]] = None, discovered_vm_details: Optional["_models.InMageRcmDiscoveredProtectedVmDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword license_type: License Type of the VM to be used. :paramtype license_type: str @@ -15766,8 +15961,8 @@ def __init__( datastore_name: str, log_storage_account_id: str, policy_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword reprotect_agent_id: The reprotect agent Id. Required. :paramtype reprotect_agent_id: str @@ -15836,7 +16031,7 @@ class InMageRcmSyncDetails(_serialization.Model): "progress_percentage": {"key": "progressPercentage", "type": "int"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.progress_health = None @@ -15873,7 +16068,9 @@ class InMageRcmTestFailoverInput(TestFailoverProviderSpecificInput): "recovery_point_id": {"key": "recoveryPointId", "type": "str"}, } - def __init__(self, *, network_id: Optional[str] = None, recovery_point_id: Optional[str] = None, **kwargs): + def __init__( + self, *, network_id: Optional[str] = None, recovery_point_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword network_id: The test network Id. :paramtype network_id: str @@ -15912,7 +16109,7 @@ class InMageRcmUnplannedFailoverInput(UnplannedFailoverProviderSpecificInput): "recovery_point_id": {"key": "recoveryPointId", "type": "str"}, } - def __init__(self, *, perform_shutdown: str, recovery_point_id: Optional[str] = None, **kwargs): + def __init__(self, *, perform_shutdown: str, recovery_point_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword perform_shutdown: A value indicating whether VM is to be shutdown. Required. :paramtype perform_shutdown: str @@ -15948,7 +16145,7 @@ class UpdateApplianceForReplicationProtectedItemProviderSpecificInput(_serializa _subtype_map = {"instance_type": {"InMageRcm": "InMageRcmUpdateApplianceForReplicationProtectedItemInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -15976,7 +16173,7 @@ class InMageRcmUpdateApplianceForReplicationProtectedItemInput( "run_as_account_id": {"key": "runAsAccountId", "type": "str"}, } - def __init__(self, *, run_as_account_id: Optional[str] = None, **kwargs): + def __init__(self, *, run_as_account_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword run_as_account_id: The run as account Id. :paramtype run_as_account_id: str @@ -16008,7 +16205,7 @@ class InMageRcmUpdateContainerMappingInput(ReplicationProviderSpecificUpdateCont "enable_agent_auto_upgrade": {"key": "enableAgentAutoUpgrade", "type": "str"}, } - def __init__(self, *, enable_agent_auto_upgrade: str, **kwargs): + def __init__(self, *, enable_agent_auto_upgrade: str, **kwargs: Any) -> None: """ :keyword enable_agent_auto_upgrade: A value indicating whether agent auto upgrade has to be enabled. Required. @@ -16087,8 +16284,8 @@ def __init__( test_network_id: Optional[str] = None, vm_nics: Optional[List["_models.InMageRcmNicInput"]] = None, license_type: Optional[Union[str, "_models.LicenseType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword target_vm_name: The target VM name. :paramtype target_vm_name: str @@ -16320,8 +16517,8 @@ def __init__( # pylint: disable=too-many-locals is_additional_stats_available: Optional[bool] = None, total_data_transferred: Optional[int] = None, total_progress_health: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword active_site_type: The active location of the VM. If the VM is being protected from Azure, this field will take values from { Azure, OnPrem }. If the VM is being protected between @@ -16515,8 +16712,8 @@ def __init__( datastore_name: Optional[str] = None, disk_exclusion_input: Optional["_models.InMageDiskExclusionInput"] = None, disks_to_include: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword master_target_id: The Master Target Id. Required. :paramtype master_target_id: str @@ -16581,8 +16778,8 @@ def __init__( *, recovery_point_type: Optional[Union[str, "_models.RecoveryPointType"]] = None, recovery_point_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_type: The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided by RecoveryPointId will be used. In @@ -16633,8 +16830,8 @@ def __init__( *, recovery_point_type: Optional[Union[str, "_models.RecoveryPointType"]] = None, recovery_point_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_type: The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided by RecoveryPointId will be used. In @@ -16653,7 +16850,8 @@ def __init__( class InMageVolumeExclusionOptions(_serialization.Model): - """Guest disk signature based disk exclusion option when doing enable protection of virtual machine in InMage provider. + """Guest disk signature based disk exclusion option when doing enable protection of virtual + machine in InMage provider. :ivar volume_label: The volume label. The disk having any volume with this label will be excluded from replication. @@ -16670,8 +16868,8 @@ class InMageVolumeExclusionOptions(_serialization.Model): } def __init__( - self, *, volume_label: Optional[str] = None, only_exclude_if_single_volume: Optional[str] = None, **kwargs - ): + self, *, volume_label: Optional[str] = None, only_exclude_if_single_volume: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword volume_label: The volume label. The disk having any volume with this label will be excluded from replication. @@ -16687,7 +16885,11 @@ def __init__( class InnerHealthError(_serialization.Model): # pylint: disable=too-many-instance-attributes - """Implements InnerHealthError class. HealthError object has a list of InnerHealthErrors as child errors. InnerHealthError is used because this will prevent an infinite loop of structures when Hydra tries to auto-generate the contract. We are exposing the related health errors as inner health errors and all API consumers can utilize this in the same fashion as Exception -> InnerException. + """Implements InnerHealthError class. HealthError object has a list of InnerHealthErrors as child + errors. InnerHealthError is used because this will prevent an infinite loop of structures when + Hydra tries to auto-generate the contract. We are exposing the related health errors as inner + health errors and all API consumers can utilize this in the same fashion as Exception -> + InnerException. :ivar error_source: Source of error. :vartype error_source: str @@ -16755,8 +16957,8 @@ def __init__( entity_id: Optional[str] = None, error_id: Optional[str] = None, customer_resolvability: Optional[Union[str, "_models.HealthErrorCustomerResolvability"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword error_source: Source of error. :paramtype error_source: str @@ -16833,8 +17035,8 @@ def __init__( private_port: Optional[int] = None, public_port: Optional[int] = None, protocol: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword endpoint_name: :paramtype endpoint_name: str @@ -16923,8 +17125,8 @@ def __init__( tfo_static_ip_address: Optional[str] = None, tfo_public_ip_address_id: Optional[str] = None, tfo_lb_backend_address_pool_ids: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: :paramtype name: str @@ -17030,8 +17232,8 @@ def __init__( tfo_static_ip_address: Optional[str] = None, tfo_public_ip_address_id: Optional[str] = None, tfo_lb_backend_address_pool_ids: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip_config_name: :paramtype ip_config_name: str @@ -17102,8 +17304,8 @@ class Job(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.JobProperties"] = None, **kwargs - ): + self, *, location: Optional[str] = None, properties: Optional["_models.JobProperties"] = None, **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -17128,7 +17330,9 @@ class JobCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Job"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Job"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of jobs. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.Job] @@ -17175,8 +17379,8 @@ def __init__( target_object_name: Optional[str] = None, target_instance_type: Optional[str] = None, job_scenario_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword job_id: The job id. :paramtype job_id: str @@ -17231,8 +17435,8 @@ def __init__( error_level: Optional[str] = None, creation_time: Optional[datetime.datetime] = None, task_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword service_error_details: The Service error details. :paramtype service_error_details: ~azure.mgmt.recoveryservicessiterecovery.models.ServiceError @@ -17324,8 +17528,8 @@ def __init__( target_object_name: Optional[str] = None, target_instance_type: Optional[str] = None, custom_details: Optional["_models.JobDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword activity_id: The activity id. :paramtype activity_id: str @@ -17421,8 +17625,8 @@ def __init__( job_output_type: Optional[Union[str, "_models.ExportJobOutputSerializationType"]] = None, job_name: Optional[str] = None, timezone_offset: Optional[float] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword start_time: Date time to get jobs from. :paramtype start_time: str @@ -17490,8 +17694,8 @@ def __init__( job_friendly_name: Optional[str] = None, job_status: Optional[str] = None, affected_object_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword job_id: Job arm id for the event. :paramtype job_id: str @@ -17525,8 +17729,8 @@ class KeyEncryptionKeyInfo(_serialization.Model): } def __init__( - self, *, key_identifier: Optional[str] = None, key_vault_resource_arm_id: Optional[str] = None, **kwargs - ): + self, *, key_identifier: Optional[str] = None, key_vault_resource_arm_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword key_identifier: The key URL / identifier. :paramtype key_identifier: str @@ -17574,8 +17778,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.LogicalNetworkProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -17601,8 +17805,8 @@ class LogicalNetworkCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.LogicalNetwork"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.LogicalNetwork"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The Logical Networks list details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.LogicalNetwork] @@ -17644,8 +17848,8 @@ def __init__( network_virtualization_status: Optional[str] = None, logical_network_usage: Optional[str] = None, logical_network_definitions_status: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The Friendly Name. :paramtype friendly_name: str @@ -17698,8 +17902,8 @@ def __init__( name: Optional[str] = None, instructions: Optional[str] = None, observation: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name. :paramtype name: str @@ -17765,7 +17969,7 @@ class MarsAgentDetails(_serialization.Model): "health_errors": {"key": "healthErrors", "type": "[HealthError]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -17864,8 +18068,8 @@ def __init__( mars_agent_expiry_date: Optional[datetime.datetime] = None, agent_version_details: Optional["_models.VersionDetails"] = None, mars_agent_version_details: Optional["_models.VersionDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The server Id. :paramtype id: str @@ -17945,7 +18149,7 @@ class MigrateInput(_serialization.Model): "properties": {"key": "properties", "type": "MigrateInputProperties"}, } - def __init__(self, *, properties: "_models.MigrateInputProperties", **kwargs): + def __init__(self, *, properties: "_models.MigrateInputProperties", **kwargs: Any) -> None: """ :keyword properties: Migrate input properties. Required. :paramtype properties: ~azure.mgmt.recoveryservicessiterecovery.models.MigrateInputProperties @@ -17972,7 +18176,7 @@ class MigrateInputProperties(_serialization.Model): "provider_specific_details": {"key": "providerSpecificDetails", "type": "MigrateProviderSpecificInput"}, } - def __init__(self, *, provider_specific_details: "_models.MigrateProviderSpecificInput", **kwargs): + def __init__(self, *, provider_specific_details: "_models.MigrateProviderSpecificInput", **kwargs: Any) -> None: """ :keyword provider_specific_details: The provider specific details. Required. :paramtype provider_specific_details: @@ -18004,7 +18208,7 @@ class MigrateProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"VMwareCbt": "VMwareCbtMigrateInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -18046,8 +18250,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.MigrationItemProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -18073,8 +18277,8 @@ class MigrationItemCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.MigrationItem"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.MigrationItem"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of migration items. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.MigrationItem] @@ -18193,8 +18397,8 @@ class MigrationItemProperties(_serialization.Model): # pylint: disable=too-many } def __init__( - self, *, provider_specific_details: Optional["_models.MigrationProviderSpecificSettings"] = None, **kwargs - ): + self, *, provider_specific_details: Optional["_models.MigrationProviderSpecificSettings"] = None, **kwargs: Any + ) -> None: """ :keyword provider_specific_details: The migration provider custom settings. :paramtype provider_specific_details: @@ -18246,8 +18450,8 @@ def __init__( source_fabric_name: Optional[str] = None, source_container_name: Optional[str] = None, instance_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword source_fabric_name: The source fabric name filter. :paramtype source_fabric_name: str @@ -18284,7 +18488,7 @@ class MigrationProviderSpecificSettings(_serialization.Model): _subtype_map = {"instance_type": {"VMwareCbt": "VMwareCbtMigrationDetails"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -18327,8 +18531,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.MigrationRecoveryPointProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -18359,8 +18563,8 @@ def __init__( *, value: Optional[List["_models.MigrationRecoveryPoint"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The migration recovery point details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.MigrationRecoveryPoint] @@ -18395,7 +18599,7 @@ class MigrationRecoveryPointProperties(_serialization.Model): "recovery_point_type": {"key": "recoveryPointType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.recovery_point_time = None @@ -18425,8 +18629,8 @@ def __init__( version: Optional[str] = None, reboot_status: Optional[str] = None, os_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword version: The version of the latest update. :paramtype version: str @@ -18473,8 +18677,8 @@ class Network(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.NetworkProperties"] = None, **kwargs - ): + self, *, location: Optional[str] = None, properties: Optional["_models.NetworkProperties"] = None, **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -18499,7 +18703,9 @@ class NetworkCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Network"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Network"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The Networks list details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.Network] @@ -18512,7 +18718,11 @@ def __init__(self, *, value: Optional[List["_models.Network"]] = None, next_link class NetworkMapping(Resource): - """Network Mapping model. Ideally it should have been possible to inherit this class from prev version in InheritedModels as long as there is no difference in structure or method signature. Since there were no base Models for certain fields and methods viz NetworkMappingProperties and Load with required return type, the class has been introduced in its entirety with references to base models to facilitate extensions in subsequent versions. + """Network Mapping model. Ideally it should have been possible to inherit this class from prev + version in InheritedModels as long as there is no difference in structure or method signature. + Since there were no base Models for certain fields and methods viz NetworkMappingProperties and + Load with required return type, the class has been introduced in its entirety with references + to base models to facilitate extensions in subsequent versions. Variables are only populated by the server, and will be ignored when sending a request. @@ -18547,8 +18757,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.NetworkMappingProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -18560,7 +18770,10 @@ def __init__( class NetworkMappingCollection(_serialization.Model): - """List of network mappings. As with NetworkMapping, it should be possible to reuse a prev version of this class. It doesn't seem likely this class could be anything more than a slightly bespoke collection of NetworkMapping. Hence it makes sense to override Load with Base.NetworkMapping instead of existing CurrentVersion.NetworkMapping. + """List of network mappings. As with NetworkMapping, it should be possible to reuse a prev version + of this class. It doesn't seem likely this class could be anything more than a slightly bespoke + collection of NetworkMapping. Hence it makes sense to override Load with Base.NetworkMapping + instead of existing CurrentVersion.NetworkMapping. :ivar value: The Network Mappings list. :vartype value: list[~azure.mgmt.recoveryservicessiterecovery.models.NetworkMapping] @@ -18574,8 +18787,8 @@ class NetworkMappingCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NetworkMapping"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.NetworkMapping"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The Network Mappings list. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.NetworkMapping] @@ -18635,8 +18848,8 @@ def __init__( recovery_fabric_arm_id: Optional[str] = None, recovery_fabric_friendly_name: Optional[str] = None, fabric_specific_settings: Optional["_models.NetworkMappingFabricSpecificSettings"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword state: The pairing state for network mapping. :paramtype state: str @@ -18697,8 +18910,8 @@ def __init__( subnets: Optional[List["_models.Subnet"]] = None, friendly_name: Optional[str] = None, network_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_type: The Fabric Type. :paramtype fabric_type: str @@ -18762,8 +18975,8 @@ def __init__( recovery_point_history: Optional[int] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword policy_name: The protection profile input. Required. :paramtype policy_name: str @@ -18823,8 +19036,8 @@ def __init__( *, recovery_virtual_network_resource_group_name: Optional[str] = None, recovery_virtual_network_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_virtual_network_resource_group_name: The name of the resource group to be used to create the recovery virtual network. If absent, target network would be created in the @@ -18879,8 +19092,8 @@ def __init__( display: Optional["_models.Display"] = None, origin: Optional[str] = None, properties: Optional[JSON] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the API. The name of the operation being performed on this particular object. It should match the action name that appears in RBAC / the event service. Examples of @@ -18926,8 +19139,12 @@ class OperationsDiscoveryCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.OperationsDiscovery"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.OperationsDiscovery"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: The ClientDiscovery details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.OperationsDiscovery] @@ -18974,8 +19191,8 @@ def __init__( o_s_version: Optional[str] = None, o_s_major_version: Optional[str] = None, o_s_minor_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword os_type: VM Disk details. :paramtype os_type: str @@ -19022,8 +19239,8 @@ def __init__( os_vhd_id: Optional[str] = None, os_type: Optional[str] = None, vhd_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword os_vhd_id: The id of the disk containing the OS. :paramtype os_vhd_id: str @@ -19052,7 +19269,7 @@ class OSVersionWrapper(_serialization.Model): "service_pack": {"key": "servicePack", "type": "str"}, } - def __init__(self, *, version: Optional[str] = None, service_pack: Optional[str] = None, **kwargs): + def __init__(self, *, version: Optional[str] = None, service_pack: Optional[str] = None, **kwargs: Any) -> None: """ :keyword version: The version. :paramtype version: str @@ -19082,7 +19299,7 @@ class PauseReplicationInput(_serialization.Model): "properties": {"key": "properties", "type": "PauseReplicationInputProperties"}, } - def __init__(self, *, properties: "_models.PauseReplicationInputProperties", **kwargs): + def __init__(self, *, properties: "_models.PauseReplicationInputProperties", **kwargs: Any) -> None: """ :keyword properties: Pause replication input properties. Required. :paramtype properties: @@ -19109,7 +19326,7 @@ class PauseReplicationInputProperties(_serialization.Model): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, *, instance_type: str, **kwargs): + def __init__(self, *, instance_type: str, **kwargs: Any) -> None: """ :keyword instance_type: The class type. Required. :paramtype instance_type: str @@ -19130,7 +19347,7 @@ class PlannedFailoverInput(_serialization.Model): "properties": {"key": "properties", "type": "PlannedFailoverInputProperties"}, } - def __init__(self, *, properties: Optional["_models.PlannedFailoverInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.PlannedFailoverInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Planned failover input properties. :paramtype properties: @@ -19163,8 +19380,8 @@ def __init__( *, failover_direction: Optional[str] = None, provider_specific_details: Optional["_models.PlannedFailoverProviderSpecificFailoverInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword failover_direction: Failover direction. :paramtype failover_direction: str @@ -19209,8 +19426,8 @@ class Policy(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.PolicyProperties"] = None, **kwargs - ): + self, *, location: Optional[str] = None, properties: Optional["_models.PolicyProperties"] = None, **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -19235,7 +19452,9 @@ class PolicyCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Policy"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Policy"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The policy details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.Policy] @@ -19267,8 +19486,8 @@ def __init__( *, friendly_name: Optional[str] = None, provider_specific_details: Optional["_models.PolicyProviderSpecificDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The FriendlyName. :paramtype friendly_name: str @@ -19445,8 +19664,8 @@ def __init__( # pylint: disable=too-many-locals health_errors: Optional[List["_models.HealthError"]] = None, agent_expiry_date: Optional[datetime.datetime] = None, agent_version_details: Optional["_models.VersionDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The Process Server's friendly name. :paramtype friendly_name: str @@ -19690,7 +19909,7 @@ class ProcessServerDetails(_serialization.Model): # pylint: disable=too-many-in "historic_health": {"key": "historicHealth", "type": "str"}, } - def __init__(self, **kwargs): # pylint: disable=too-many-locals + def __init__(self, **kwargs: Any) -> None: # pylint: disable=too-many-locals """ """ super().__init__(**kwargs) self.id = None @@ -19760,8 +19979,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.ProtectableItemProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -19788,8 +20007,8 @@ class ProtectableItemCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.ProtectableItem"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.ProtectableItem"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The Protectable item details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.ProtectableItem] @@ -19841,8 +20060,8 @@ def __init__( protection_readiness_errors: Optional[List[str]] = None, supported_replication_providers: Optional[List[str]] = None, custom_details: Optional["_models.ConfigurationSettings"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The name. :paramtype friendly_name: str @@ -19882,7 +20101,7 @@ class ProtectableItemQueryParameter(_serialization.Model): "state": {"key": "state", "type": "str"}, } - def __init__(self, *, state: Optional[str] = None, **kwargs): + def __init__(self, *, state: Optional[str] = None, **kwargs: Any) -> None: """ :keyword state: State of the Protectable item query filter. :paramtype state: str @@ -19936,8 +20155,8 @@ def __init__( instance_type: Optional[str] = None, multi_vm_group_create_option: Optional[Union[str, "_models.MultiVmGroupCreateOption"]] = None, process_server_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword source_fabric_name: The source fabric name filter. :paramtype source_fabric_name: str @@ -20006,8 +20225,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.ProtectionContainerProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -20034,8 +20253,12 @@ class ProtectionContainerCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.ProtectionContainer"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.ProtectionContainer"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: The Protection Container details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.ProtectionContainer] @@ -20064,7 +20287,7 @@ class ProtectionContainerFabricSpecificDetails(_serialization.Model): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type = None @@ -20107,8 +20330,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.ProtectionContainerMappingProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -20140,8 +20363,8 @@ def __init__( *, value: Optional[List["_models.ProtectionContainerMapping"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: List of container mappings. :paramtype value: @@ -20214,8 +20437,8 @@ def __init__( source_fabric_friendly_name: Optional[str] = None, target_fabric_friendly_name: Optional[str] = None, policy_friendly_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword target_protection_container_id: Paired protection container ARM ID. :paramtype target_protection_container_id: str @@ -20297,8 +20520,8 @@ def __init__( pairing_status: Optional[str] = None, role: Optional[str] = None, fabric_specific_details: Optional["_models.ProtectionContainerFabricSpecificDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_friendly_name: Fabric friendly name. :paramtype fabric_friendly_name: str @@ -20357,8 +20580,8 @@ def __init__( error_id: Optional[str] = None, possible_causes: Optional[str] = None, recommended_action: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword error_code: The Error code. :paramtype error_code: int @@ -20429,7 +20652,7 @@ class PushInstallerDetails(_serialization.Model): "health_errors": {"key": "healthErrors", "type": "[HealthError]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -20497,7 +20720,7 @@ class RcmProxyDetails(_serialization.Model): "health_errors": {"key": "healthErrors", "type": "[HealthError]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -20544,8 +20767,12 @@ class RecoveryPlan(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.RecoveryPlanProperties"] = None, **kwargs - ): + self, + *, + location: Optional[str] = None, + properties: Optional["_models.RecoveryPlanProperties"] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -20578,7 +20805,7 @@ class RecoveryPlanProviderSpecificDetails(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "RecoveryPlanA2ADetails"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -20622,8 +20849,8 @@ def __init__( recovery_zone: Optional[str] = None, primary_extended_location: Optional["_models.ExtendedLocation"] = None, recovery_extended_location: Optional["_models.ExtendedLocation"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_zone: The primary zone. :paramtype primary_zone: str @@ -20679,7 +20906,7 @@ class RecoveryPlanProviderSpecificFailoverInput(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -20724,8 +20951,8 @@ def __init__( recovery_point_type: Union[str, "_models.A2ARpRecoveryPointType"], cloud_service_creation_option: Optional[str] = None, multi_vm_sync_point_option: Optional[Union[str, "_models.MultiVmSyncPointOption"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_type: The recovery point type. Required. Known values are: "Latest", "LatestApplicationConsistent", "LatestCrashConsistent", and "LatestProcessed". @@ -20769,7 +20996,7 @@ class RecoveryPlanProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"A2A": "RecoveryPlanA2AInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -20813,8 +21040,8 @@ def __init__( recovery_zone: Optional[str] = None, primary_extended_location: Optional["_models.ExtendedLocation"] = None, recovery_extended_location: Optional["_models.ExtendedLocation"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_zone: The primary zone. :paramtype primary_zone: str @@ -20874,8 +21101,8 @@ def __init__( failover_types: List[Union[str, "_models.ReplicationProtectedItemOperation"]], failover_directions: List[Union[str, "_models.PossibleOperationsDirections"]], custom_details: "_models.RecoveryPlanActionDetails", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword action_name: The action name. Required. :paramtype action_name: str @@ -20926,7 +21153,7 @@ class RecoveryPlanActionDetails(_serialization.Model): } } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -20968,8 +21195,8 @@ def __init__( fabric_location: Union[str, "_models.RecoveryPlanActionLocation"], runbook_id: Optional[str] = None, timeout: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword runbook_id: The runbook ARM Id. :paramtype runbook_id: str @@ -21002,8 +21229,8 @@ class RecoveryPlanCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.RecoveryPlan"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.RecoveryPlan"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of recovery plans. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlan] @@ -21053,8 +21280,8 @@ def __init__( replication_protected_items: Optional[List["_models.RecoveryPlanProtectedItem"]] = None, start_group_actions: Optional[List["_models.RecoveryPlanAction"]] = None, end_group_actions: Optional[List["_models.RecoveryPlanAction"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword group_type: The group type. Required. Known values are: "Shutdown", "Boot", and "Failover". @@ -21118,8 +21345,8 @@ def __init__( name: Optional[str] = None, group_id: Optional[str] = None, rp_group_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword child_tasks: The child tasks. :paramtype child_tasks: list[~azure.mgmt.recoveryservicessiterecovery.models.ASRTask] @@ -21171,8 +21398,8 @@ def __init__( *, data_sync_option: Union[str, "_models.DataSyncStatus"], recovery_vm_creation_option: Union[str, "_models.AlternateLocationRecoveryOption"], - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword data_sync_option: The data sync option. Required. Known values are: "ForDownTime" and "ForSynchronization". @@ -21223,8 +21450,8 @@ def __init__( primary_kek_certificate_pfx: Optional[str] = None, secondary_kek_certificate_pfx: Optional[str] = None, recovery_point_type: Optional[Union[str, "_models.HyperVReplicaAzureRpRecoveryPointType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword primary_kek_certificate_pfx: The primary KEK certificate PFX. :paramtype primary_kek_certificate_pfx: str @@ -21274,8 +21501,8 @@ def __init__( *, recovery_point_type: Union[str, "_models.InMageV2RpRecoveryPointType"], use_multi_vm_sync_point: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_type: The recovery point type. Required. Known values are: "Latest", "LatestApplicationConsistent", "LatestCrashConsistent", and "LatestProcessed". @@ -21314,7 +21541,7 @@ class RecoveryPlanInMageFailoverInput(RecoveryPlanProviderSpecificFailoverInput) "recovery_point_type": {"key": "recoveryPointType", "type": "str"}, } - def __init__(self, *, recovery_point_type: Union[str, "_models.RpInMageRecoveryPointType"], **kwargs): + def __init__(self, *, recovery_point_type: Union[str, "_models.RpInMageRecoveryPointType"], **kwargs: Any) -> None: """ :keyword recovery_point_type: The recovery point type. Required. Known values are: "LatestTime", "LatestTag", and "Custom". @@ -21358,8 +21585,8 @@ def __init__( *, recovery_point_type: Union[str, "_models.InMageRcmFailbackRecoveryPointType"], use_multi_vm_sync_point: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_type: The recovery point type. Required. Known values are: "ApplicationConsistent" and "CrashConsistent". @@ -21407,8 +21634,8 @@ def __init__( *, recovery_point_type: Union[str, "_models.RecoveryPlanPointType"], use_multi_vm_sync_point: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_type: The recovery point type. Required. Known values are: "Latest", "LatestApplicationConsistent", "LatestCrashConsistent", and "LatestProcessed". @@ -21445,7 +21672,7 @@ class RecoveryPlanManualActionDetails(RecoveryPlanActionDetails): "description": {"key": "description", "type": "str"}, } - def __init__(self, *, description: Optional[str] = None, **kwargs): + def __init__(self, *, description: Optional[str] = None, **kwargs: Any) -> None: """ :keyword description: The manual action description. :paramtype description: str @@ -21473,7 +21700,7 @@ class RecoveryPlanPlannedFailoverInput(_serialization.Model): "properties": {"key": "properties", "type": "RecoveryPlanPlannedFailoverInputProperties"}, } - def __init__(self, *, properties: "_models.RecoveryPlanPlannedFailoverInputProperties", **kwargs): + def __init__(self, *, properties: "_models.RecoveryPlanPlannedFailoverInputProperties", **kwargs: Any) -> None: """ :keyword properties: The recovery plan planned failover input properties. Required. :paramtype properties: @@ -21514,8 +21741,8 @@ def __init__( *, failover_direction: Union[str, "_models.PossibleOperationsDirections"], provider_specific_details: Optional[List["_models.RecoveryPlanProviderSpecificFailoverInput"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword failover_direction: The failover direction. Required. Known values are: "PrimaryToRecovery" and "RecoveryToPrimary". @@ -21610,8 +21837,8 @@ def __init__( current_scenario_status_description: Optional[str] = None, groups: Optional[List["_models.RecoveryPlanGroup"]] = None, provider_specific_details: Optional[List["_models.RecoveryPlanProviderSpecificDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The friendly name. :paramtype friendly_name: str @@ -21686,8 +21913,8 @@ def __init__( *, id: Optional[str] = None, # pylint: disable=redefined-builtin virtual_machine_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ARM Id of the recovery plan protected item. :paramtype id: str @@ -21736,8 +21963,8 @@ def __init__( path: str, fabric_location: Union[str, "_models.RecoveryPlanActionLocation"], timeout: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword path: The script path. Required. :paramtype path: str @@ -21791,8 +22018,8 @@ def __init__( name: Optional[str] = None, group_id: Optional[str] = None, rp_group_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword child_tasks: The child tasks. :paramtype child_tasks: list[~azure.mgmt.recoveryservicessiterecovery.models.ASRTask] @@ -21825,7 +22052,7 @@ class RecoveryPlanTestFailoverCleanupInput(_serialization.Model): "properties": {"key": "properties", "type": "RecoveryPlanTestFailoverCleanupInputProperties"}, } - def __init__(self, *, properties: "_models.RecoveryPlanTestFailoverCleanupInputProperties", **kwargs): + def __init__(self, *, properties: "_models.RecoveryPlanTestFailoverCleanupInputProperties", **kwargs: Any) -> None: """ :keyword properties: The recovery plan test failover cleanup input properties. Required. :paramtype properties: @@ -21850,7 +22077,7 @@ class RecoveryPlanTestFailoverCleanupInputProperties(_serialization.Model): "comments": {"key": "comments", "type": "str"}, } - def __init__(self, *, comments: Optional[str] = None, **kwargs): + def __init__(self, *, comments: Optional[str] = None, **kwargs: Any) -> None: """ :keyword comments: The test failover cleanup comments. :paramtype comments: str @@ -21877,7 +22104,7 @@ class RecoveryPlanTestFailoverInput(_serialization.Model): "properties": {"key": "properties", "type": "RecoveryPlanTestFailoverInputProperties"}, } - def __init__(self, *, properties: "_models.RecoveryPlanTestFailoverInputProperties", **kwargs): + def __init__(self, *, properties: "_models.RecoveryPlanTestFailoverInputProperties", **kwargs: Any) -> None: """ :keyword properties: The recovery plan test failover input properties. Required. :paramtype properties: @@ -21927,8 +22154,8 @@ def __init__( network_type: str, network_id: Optional[str] = None, provider_specific_details: Optional[List["_models.RecoveryPlanProviderSpecificFailoverInput"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword failover_direction: The failover direction. Required. Known values are: "PrimaryToRecovery" and "RecoveryToPrimary". @@ -21967,7 +22194,7 @@ class RecoveryPlanUnplannedFailoverInput(_serialization.Model): "properties": {"key": "properties", "type": "RecoveryPlanUnplannedFailoverInputProperties"}, } - def __init__(self, *, properties: "_models.RecoveryPlanUnplannedFailoverInputProperties", **kwargs): + def __init__(self, *, properties: "_models.RecoveryPlanUnplannedFailoverInputProperties", **kwargs: Any) -> None: """ :keyword properties: The recovery plan unplanned failover input properties. Required. :paramtype properties: @@ -22015,8 +22242,8 @@ def __init__( failover_direction: Union[str, "_models.PossibleOperationsDirections"], source_site_operations: Union[str, "_models.SourceSiteOperations"], provider_specific_details: Optional[List["_models.RecoveryPlanProviderSpecificFailoverInput"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword failover_direction: The failover direction. Required. Known values are: "PrimaryToRecovery" and "RecoveryToPrimary". @@ -22072,8 +22299,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.RecoveryPointProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -22099,8 +22326,8 @@ class RecoveryPointCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.RecoveryPoint"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.RecoveryPoint"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The recovery point details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPoint] @@ -22136,8 +22363,8 @@ def __init__( recovery_point_time: Optional[datetime.datetime] = None, recovery_point_type: Optional[str] = None, provider_specific_details: Optional["_models.ProviderSpecificRecoveryPointDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_time: The recovery point time. :paramtype recovery_point_time: ~datetime.datetime @@ -22190,8 +22417,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.RecoveryServicesProviderProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -22222,8 +22449,8 @@ def __init__( *, value: Optional[List["_models.RecoveryServicesProvider"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The Servers details. :paramtype value: @@ -22336,8 +22563,8 @@ def __init__( resource_access_identity_details: Optional["_models.IdentityProviderDetails"] = None, data_plane_authentication_identity_details: Optional["_models.IdentityProviderDetails"] = None, provider_version_details: Optional["_models.VersionDetails"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword fabric_type: Type of the site. :paramtype fabric_type: str @@ -22420,7 +22647,7 @@ class RemoveDisksInput(_serialization.Model): "properties": {"key": "properties", "type": "RemoveDisksInputProperties"}, } - def __init__(self, *, properties: Optional["_models.RemoveDisksInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.RemoveDisksInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Remove disk input properties. :paramtype properties: @@ -22445,8 +22672,8 @@ class RemoveDisksInputProperties(_serialization.Model): } def __init__( - self, *, provider_specific_details: Optional["_models.RemoveDisksProviderSpecificInput"] = None, **kwargs - ): + self, *, provider_specific_details: Optional["_models.RemoveDisksProviderSpecificInput"] = None, **kwargs: Any + ) -> None: """ :keyword provider_specific_details: The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be @@ -22471,8 +22698,8 @@ class RemoveProtectionContainerMappingInput(_serialization.Model): } def __init__( - self, *, properties: Optional["_models.RemoveProtectionContainerMappingInputProperties"] = None, **kwargs - ): + self, *, properties: Optional["_models.RemoveProtectionContainerMappingInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Configure protection input properties. :paramtype properties: @@ -22501,8 +22728,8 @@ def __init__( self, *, provider_specific_input: Optional["_models.ReplicationProviderContainerUnmappingInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider_specific_input: Provider specific input for unpairing. :paramtype provider_specific_input: @@ -22524,7 +22751,9 @@ class RenewCertificateInput(_serialization.Model): "properties": {"key": "properties", "type": "RenewCertificateInputProperties"}, } - def __init__(self, *, properties: Optional["_models.RenewCertificateInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.RenewCertificateInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Renew certificate input properties. :paramtype properties: @@ -22545,7 +22774,7 @@ class RenewCertificateInputProperties(_serialization.Model): "renew_certificate_type": {"key": "renewCertificateType", "type": "str"}, } - def __init__(self, *, renew_certificate_type: Optional[str] = None, **kwargs): + def __init__(self, *, renew_certificate_type: Optional[str] = None, **kwargs: Any) -> None: """ :keyword renew_certificate_type: Renew certificate type. :paramtype renew_certificate_type: str @@ -22604,7 +22833,7 @@ class ReplicationAgentDetails(_serialization.Model): "health_errors": {"key": "healthErrors", "type": "[HealthError]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -22630,7 +22859,7 @@ class ReplicationAppliance(_serialization.Model): "properties": {"key": "properties", "type": "ReplicationApplianceProperties"}, } - def __init__(self, *, properties: Optional["_models.ReplicationApplianceProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.ReplicationApplianceProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Appliance related data. :paramtype properties: @@ -22652,7 +22881,9 @@ class ReplicationApplianceProperties(_serialization.Model): "provider_specific_details": {"key": "providerSpecificDetails", "type": "ApplianceSpecificDetails"}, } - def __init__(self, *, provider_specific_details: Optional["_models.ApplianceSpecificDetails"] = None, **kwargs): + def __init__( + self, *, provider_specific_details: Optional["_models.ApplianceSpecificDetails"] = None, **kwargs: Any + ) -> None: """ :keyword provider_specific_details: Provider specific settings. :paramtype provider_specific_details: @@ -22692,7 +22923,7 @@ class ReplicationEligibilityResults(_serialization.Model): "properties": {"key": "properties", "type": "ReplicationEligibilityResultsProperties"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -22713,7 +22944,7 @@ class ReplicationEligibilityResultsCollection(_serialization.Model): "value": {"key": "value", "type": "[ReplicationEligibilityResults]"}, } - def __init__(self, *, value: Optional[List["_models.ReplicationEligibilityResults"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.ReplicationEligibilityResults"]] = None, **kwargs: Any) -> None: """ :keyword value: The replication eligibility results details. :paramtype value: @@ -22759,8 +22990,8 @@ def __init__( message: Optional[str] = None, possible_causes: Optional[str] = None, recommended_action: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: The error code. :paramtype code: str @@ -22800,7 +23031,9 @@ class ReplicationEligibilityResultsProperties(_serialization.Model): "errors": {"key": "errors", "type": "[ReplicationEligibilityResultsErrorInfo]"}, } - def __init__(self, *, errors: Optional[List["_models.ReplicationEligibilityResultsErrorInfo"]] = None, **kwargs): + def __init__( + self, *, errors: Optional[List["_models.ReplicationEligibilityResultsErrorInfo"]] = None, **kwargs: Any + ) -> None: """ :keyword errors: The error details. :paramtype errors: @@ -22828,7 +23061,7 @@ class ReplicationGroupDetails(ConfigurationSettings): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "ReplicationGroupDetails" @@ -22871,8 +23104,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.ReplicationProtectedItemProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -22903,8 +23136,8 @@ def __init__( *, value: Optional[List["_models.ReplicationProtectedItem"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The Replication protected item details. :paramtype value: @@ -23057,8 +23290,8 @@ def __init__( # pylint: disable=too-many-locals provider_specific_details: Optional["_models.ReplicationProviderSpecificSettings"] = None, recovery_container_id: Optional[str] = None, event_correlation_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The name. :paramtype friendly_name: str @@ -23198,8 +23431,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.ReplicationProtectionIntentProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -23231,8 +23464,8 @@ def __init__( *, value: Optional[List["_models.ReplicationProtectionIntent"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The Replication protection intent details. :paramtype value: @@ -23289,8 +23522,8 @@ def __init__( *, friendly_name: Optional[str] = None, provider_specific_details: Optional["_models.ReplicationProtectionIntentProviderSpecificSettings"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The name. :paramtype friendly_name: str @@ -23318,7 +23551,7 @@ class ReplicationProviderContainerUnmappingInput(_serialization.Model): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, *, instance_type: Optional[str] = None, **kwargs): + def __init__(self, *, instance_type: Optional[str] = None, **kwargs: Any) -> None: """ :keyword instance_type: The class type. :paramtype instance_type: str @@ -23393,7 +23626,7 @@ class ReprotectAgentDetails(_serialization.Model): # pylint: disable=too-many-i "last_discovery_in_utc": {"key": "lastDiscoveryInUtc", "type": "iso-8601"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -23422,7 +23655,7 @@ class ResolveHealthError(_serialization.Model): "health_error_id": {"key": "healthErrorId", "type": "str"}, } - def __init__(self, *, health_error_id: Optional[str] = None, **kwargs): + def __init__(self, *, health_error_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword health_error_id: Health error id. :paramtype health_error_id: str @@ -23443,7 +23676,7 @@ class ResolveHealthInput(_serialization.Model): "properties": {"key": "properties", "type": "ResolveHealthInputProperties"}, } - def __init__(self, *, properties: Optional["_models.ResolveHealthInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.ResolveHealthInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Disable resolve health input properties. :paramtype properties: @@ -23465,7 +23698,7 @@ class ResolveHealthInputProperties(_serialization.Model): "health_errors": {"key": "healthErrors", "type": "[ResolveHealthError]"}, } - def __init__(self, *, health_errors: Optional[List["_models.ResolveHealthError"]] = None, **kwargs): + def __init__(self, *, health_errors: Optional[List["_models.ResolveHealthError"]] = None, **kwargs: Any) -> None: """ :keyword health_errors: Health errors. :paramtype health_errors: @@ -23498,8 +23731,8 @@ def __init__( resource_count: Optional[int] = None, issues: Optional[List["_models.HealthErrorSummary"]] = None, categorized_resource_counts: Optional[Dict[str, int]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_count: The count of total resources under the container. :paramtype resource_count: int @@ -23525,7 +23758,7 @@ class ResumeJobParams(_serialization.Model): "properties": {"key": "properties", "type": "ResumeJobParamsProperties"}, } - def __init__(self, *, properties: Optional["_models.ResumeJobParamsProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.ResumeJobParamsProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Resume job properties. :paramtype properties: @@ -23546,7 +23779,7 @@ class ResumeJobParamsProperties(_serialization.Model): "comments": {"key": "comments", "type": "str"}, } - def __init__(self, *, comments: Optional[str] = None, **kwargs): + def __init__(self, *, comments: Optional[str] = None, **kwargs: Any) -> None: """ :keyword comments: Resume job comments. :paramtype comments: str @@ -23573,7 +23806,7 @@ class ResumeReplicationInput(_serialization.Model): "properties": {"key": "properties", "type": "ResumeReplicationInputProperties"}, } - def __init__(self, *, properties: "_models.ResumeReplicationInputProperties", **kwargs): + def __init__(self, *, properties: "_models.ResumeReplicationInputProperties", **kwargs: Any) -> None: """ :keyword properties: Resume replication input properties. Required. :paramtype properties: @@ -23604,7 +23837,9 @@ class ResumeReplicationInputProperties(_serialization.Model): }, } - def __init__(self, *, provider_specific_details: "_models.ResumeReplicationProviderSpecificInput", **kwargs): + def __init__( + self, *, provider_specific_details: "_models.ResumeReplicationProviderSpecificInput", **kwargs: Any + ) -> None: """ :keyword provider_specific_details: The provider specific input for resume replication. Required. @@ -23637,7 +23872,7 @@ class ResumeReplicationProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"VMwareCbt": "VMwareCbtResumeReplicationInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -23660,7 +23895,7 @@ class ResyncInput(_serialization.Model): "properties": {"key": "properties", "type": "ResyncInputProperties"}, } - def __init__(self, *, properties: "_models.ResyncInputProperties", **kwargs): + def __init__(self, *, properties: "_models.ResyncInputProperties", **kwargs: Any) -> None: """ :keyword properties: Resync input properties. Required. :paramtype properties: ~azure.mgmt.recoveryservicessiterecovery.models.ResyncInputProperties @@ -23687,7 +23922,7 @@ class ResyncInputProperties(_serialization.Model): "provider_specific_details": {"key": "providerSpecificDetails", "type": "ResyncProviderSpecificInput"}, } - def __init__(self, *, provider_specific_details: "_models.ResyncProviderSpecificInput", **kwargs): + def __init__(self, *, provider_specific_details: "_models.ResyncProviderSpecificInput", **kwargs: Any) -> None: """ :keyword provider_specific_details: The provider specific details. Required. :paramtype provider_specific_details: @@ -23719,7 +23954,7 @@ class ResyncProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"VMwareCbt": "VMwareCbtResyncInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -23752,8 +23987,8 @@ def __init__( capacity_in_bytes: Optional[int] = None, free_space_in_bytes: Optional[int] = None, threshold_percentage: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword volume_name: The volume name. :paramtype volume_name: str @@ -23783,7 +24018,9 @@ class ReverseReplicationInput(_serialization.Model): "properties": {"key": "properties", "type": "ReverseReplicationInputProperties"}, } - def __init__(self, *, properties: Optional["_models.ReverseReplicationInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.ReverseReplicationInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Reverse replication properties. :paramtype properties: @@ -23816,8 +24053,8 @@ def __init__( *, failover_direction: Optional[str] = None, provider_specific_details: Optional["_models.ReverseReplicationProviderSpecificInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword failover_direction: Failover direction. :paramtype failover_direction: str @@ -23861,8 +24098,8 @@ def __init__( scope: Optional[str] = None, principal_id: Optional[str] = None, role_definition_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The ARM Id of the role assignment. :paramtype id: str @@ -23897,7 +24134,7 @@ class RunAsAccount(_serialization.Model): "account_name": {"key": "accountName", "type": "str"}, } - def __init__(self, *, account_id: Optional[str] = None, account_name: Optional[str] = None, **kwargs): + def __init__(self, *, account_id: Optional[str] = None, account_name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword account_id: The CS RunAs account Id. :paramtype account_id: str @@ -23945,8 +24182,8 @@ def __init__( path: Optional[str] = None, output: Optional[str] = None, is_primary_side_script: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name. :paramtype name: str @@ -23996,8 +24233,8 @@ def __init__( possible_causes: Optional[str] = None, recommended_action: Optional[str] = None, activity_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword code: Error code. :paramtype code: str @@ -24055,8 +24292,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.StorageClassificationProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -24087,8 +24324,8 @@ def __init__( *, value: Optional[List["_models.StorageClassification"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The storage details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.StorageClassification] @@ -24137,8 +24374,8 @@ def __init__( *, location: Optional[str] = None, properties: Optional["_models.StorageClassificationMappingProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -24170,8 +24407,8 @@ def __init__( *, value: Optional[List["_models.StorageClassificationMapping"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: The storage details. :paramtype value: @@ -24196,7 +24433,7 @@ class StorageClassificationMappingInput(_serialization.Model): "properties": {"key": "properties", "type": "StorageMappingInputProperties"}, } - def __init__(self, *, properties: Optional["_models.StorageMappingInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.StorageMappingInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Storage mapping input properties. :paramtype properties: @@ -24217,7 +24454,7 @@ class StorageClassificationMappingProperties(_serialization.Model): "target_storage_classification_id": {"key": "targetStorageClassificationId", "type": "str"}, } - def __init__(self, *, target_storage_classification_id: Optional[str] = None, **kwargs): + def __init__(self, *, target_storage_classification_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword target_storage_classification_id: Target storage object Id. :paramtype target_storage_classification_id: str @@ -24237,7 +24474,7 @@ class StorageClassificationProperties(_serialization.Model): "friendly_name": {"key": "friendlyName", "type": "str"}, } - def __init__(self, *, friendly_name: Optional[str] = None, **kwargs): + def __init__(self, *, friendly_name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword friendly_name: Friendly name of the Storage classification. :paramtype friendly_name: str @@ -24257,7 +24494,7 @@ class StorageMappingInputProperties(_serialization.Model): "target_storage_classification_id": {"key": "targetStorageClassificationId", "type": "str"}, } - def __init__(self, *, target_storage_classification_id: Optional[str] = None, **kwargs): + def __init__(self, *, target_storage_classification_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword target_storage_classification_id: The ID of the storage object. :paramtype target_storage_classification_id: str @@ -24289,8 +24526,8 @@ def __init__( name: Optional[str] = None, friendly_name: Optional[str] = None, address_list: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The subnet name. :paramtype name: str @@ -24337,8 +24574,12 @@ class SupportedOperatingSystems(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.SupportedOSProperties"] = None, **kwargs - ): + self, + *, + location: Optional[str] = None, + properties: Optional["_models.SupportedOSProperties"] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -24372,8 +24613,8 @@ def __init__( os_name: Optional[str] = None, os_type: Optional[str] = None, os_versions: Optional[List["_models.OSVersionWrapper"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword os_name: The name. :paramtype os_name: str @@ -24400,7 +24641,9 @@ class SupportedOSProperties(_serialization.Model): "supported_os_list": {"key": "supportedOsList", "type": "[SupportedOSProperty]"}, } - def __init__(self, *, supported_os_list: Optional[List["_models.SupportedOSProperty"]] = None, **kwargs): + def __init__( + self, *, supported_os_list: Optional[List["_models.SupportedOSProperty"]] = None, **kwargs: Any + ) -> None: """ :keyword supported_os_list: The supported operating systems property list. :paramtype supported_os_list: @@ -24429,8 +24672,8 @@ def __init__( *, instance_type: Optional[str] = None, supported_os: Optional[List["_models.SupportedOSDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword instance_type: The replication provider type. :paramtype instance_type: str @@ -24455,7 +24698,9 @@ class SwitchProtectionInput(_serialization.Model): "properties": {"key": "properties", "type": "SwitchProtectionInputProperties"}, } - def __init__(self, *, properties: Optional["_models.SwitchProtectionInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.SwitchProtectionInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Switch protection properties. :paramtype properties: @@ -24488,8 +24733,8 @@ def __init__( *, replication_protected_item_name: Optional[str] = None, provider_specific_details: Optional["_models.SwitchProtectionProviderSpecificInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword replication_protected_item_name: The unique replication protected item name. :paramtype replication_protected_item_name: str @@ -24532,8 +24777,8 @@ def __init__( *, affected_object_details: Optional[Dict[str, str]] = None, new_replication_protected_item_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword affected_object_details: The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. @@ -24558,7 +24803,7 @@ class SwitchProviderInput(_serialization.Model): "properties": {"key": "properties", "type": "SwitchProviderInputProperties"}, } - def __init__(self, *, properties: Optional["_models.SwitchProviderInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.SwitchProviderInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: Switch provider input properties. :paramtype properties: @@ -24588,8 +24833,8 @@ def __init__( *, target_instance_type: Optional[str] = None, provider_specific_details: Optional["_models.SwitchProviderSpecificInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword target_instance_type: Target provider type. :paramtype target_instance_type: str @@ -24630,8 +24875,8 @@ def __init__( name: Optional[str] = None, type: Optional[str] = None, properties: Optional["_models.TargetComputeSizeProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The Id. :paramtype id: str @@ -24665,8 +24910,12 @@ class TargetComputeSizeCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.TargetComputeSize"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.TargetComputeSize"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: The list of target compute sizes. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.TargetComputeSize] @@ -24735,8 +24984,8 @@ def __init__( errors: Optional[List["_models.ComputeSizeErrorDetails"]] = None, high_iops_supported: Optional[str] = None, hyper_v_generations: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Target compute size name. :paramtype name: str @@ -24791,7 +25040,7 @@ class TestFailoverCleanupInput(_serialization.Model): "properties": {"key": "properties", "type": "TestFailoverCleanupInputProperties"}, } - def __init__(self, *, properties: "_models.TestFailoverCleanupInputProperties", **kwargs): + def __init__(self, *, properties: "_models.TestFailoverCleanupInputProperties", **kwargs: Any) -> None: """ :keyword properties: Test failover cleanup input properties. Required. :paramtype properties: @@ -24816,7 +25065,7 @@ class TestFailoverCleanupInputProperties(_serialization.Model): "comments": {"key": "comments", "type": "str"}, } - def __init__(self, *, comments: Optional[str] = None, **kwargs): + def __init__(self, *, comments: Optional[str] = None, **kwargs: Any) -> None: """ :keyword comments: Test failover cleanup comments. :paramtype comments: str @@ -24843,7 +25092,7 @@ class TestFailoverInput(_serialization.Model): "properties": {"key": "properties", "type": "TestFailoverInputProperties"}, } - def __init__(self, *, properties: "_models.TestFailoverInputProperties", **kwargs): + def __init__(self, *, properties: "_models.TestFailoverInputProperties", **kwargs: Any) -> None: """ :keyword properties: Test failover input properties. Required. :paramtype properties: @@ -24881,8 +25130,8 @@ def __init__( network_type: Optional[str] = None, network_id: Optional[str] = None, provider_specific_details: Optional["_models.TestFailoverProviderSpecificInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword failover_direction: Test failover direction. :paramtype failover_direction: str @@ -24952,8 +25201,8 @@ def __init__( network_friendly_name: Optional[str] = None, network_type: Optional[str] = None, protected_item_details: Optional[List["_models.FailoverReplicationProtectedItemDetails"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword affected_object_details: The affected object properties like source server, source cloud, target server, target cloud etc. based on the workflow object details. @@ -25000,7 +25249,7 @@ class TestMigrateCleanupInput(_serialization.Model): "properties": {"key": "properties", "type": "TestMigrateCleanupInputProperties"}, } - def __init__(self, *, properties: "_models.TestMigrateCleanupInputProperties", **kwargs): + def __init__(self, *, properties: "_models.TestMigrateCleanupInputProperties", **kwargs: Any) -> None: """ :keyword properties: Test migrate cleanup input properties. Required. :paramtype properties: @@ -25025,7 +25274,7 @@ class TestMigrateCleanupInputProperties(_serialization.Model): "comments": {"key": "comments", "type": "str"}, } - def __init__(self, *, comments: Optional[str] = None, **kwargs): + def __init__(self, *, comments: Optional[str] = None, **kwargs: Any) -> None: """ :keyword comments: Test migrate cleanup comments. :paramtype comments: str @@ -25051,7 +25300,7 @@ class TestMigrateInput(_serialization.Model): "properties": {"key": "properties", "type": "TestMigrateInputProperties"}, } - def __init__(self, *, properties: "_models.TestMigrateInputProperties", **kwargs): + def __init__(self, *, properties: "_models.TestMigrateInputProperties", **kwargs: Any) -> None: """ :keyword properties: Test migrate input properties. Required. :paramtype properties: @@ -25079,7 +25328,7 @@ class TestMigrateInputProperties(_serialization.Model): "provider_specific_details": {"key": "providerSpecificDetails", "type": "TestMigrateProviderSpecificInput"}, } - def __init__(self, *, provider_specific_details: "_models.TestMigrateProviderSpecificInput", **kwargs): + def __init__(self, *, provider_specific_details: "_models.TestMigrateProviderSpecificInput", **kwargs: Any) -> None: """ :keyword provider_specific_details: The provider specific details. Required. :paramtype provider_specific_details: @@ -25111,7 +25360,7 @@ class TestMigrateProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"VMwareCbt": "VMwareCbtTestMigrateInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -25135,7 +25384,7 @@ class UnplannedFailoverInput(_serialization.Model): "properties": {"key": "properties", "type": "UnplannedFailoverInputProperties"}, } - def __init__(self, *, properties: "_models.UnplannedFailoverInputProperties", **kwargs): + def __init__(self, *, properties: "_models.UnplannedFailoverInputProperties", **kwargs: Any) -> None: """ :keyword properties: Unplanned failover input properties. Required. :paramtype properties: @@ -25172,8 +25421,8 @@ def __init__( failover_direction: Optional[str] = None, source_site_operations: Optional[str] = None, provider_specific_details: Optional["_models.UnplannedFailoverProviderSpecificInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword failover_direction: Failover direction. :paramtype failover_direction: str @@ -25207,7 +25456,9 @@ class UpdateApplianceForReplicationProtectedItemInput(_serialization.Model): "properties": {"key": "properties", "type": "UpdateApplianceForReplicationProtectedItemInputProperties"}, } - def __init__(self, *, properties: "_models.UpdateApplianceForReplicationProtectedItemInputProperties", **kwargs): + def __init__( + self, *, properties: "_models.UpdateApplianceForReplicationProtectedItemInputProperties", **kwargs: Any + ) -> None: """ :keyword properties: Update appliance replication protected item properties. Required. :paramtype properties: @@ -25248,8 +25499,8 @@ def __init__( *, target_appliance_id: str, provider_specific_details: "_models.UpdateApplianceForReplicationProtectedItemProviderSpecificInput", - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword target_appliance_id: The target appliance Id. Required. :paramtype target_appliance_id: str @@ -25283,7 +25534,7 @@ class UpdateDiskInput(_serialization.Model): "target_disk_name": {"key": "targetDiskName", "type": "str"}, } - def __init__(self, *, disk_id: str, target_disk_name: Optional[str] = None, **kwargs): + def __init__(self, *, disk_id: str, target_disk_name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword disk_id: The disk Id. Required. :paramtype disk_id: str @@ -25307,7 +25558,9 @@ class UpdateMigrationItemInput(_serialization.Model): "properties": {"key": "properties", "type": "UpdateMigrationItemInputProperties"}, } - def __init__(self, *, properties: Optional["_models.UpdateMigrationItemInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.UpdateMigrationItemInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Update migration item input properties. :paramtype properties: @@ -25339,7 +25592,9 @@ class UpdateMigrationItemInputProperties(_serialization.Model): }, } - def __init__(self, *, provider_specific_details: "_models.UpdateMigrationItemProviderSpecificInput", **kwargs): + def __init__( + self, *, provider_specific_details: "_models.UpdateMigrationItemProviderSpecificInput", **kwargs: Any + ) -> None: """ :keyword provider_specific_details: The provider specific input to update migration item. Required. @@ -25372,7 +25627,7 @@ class UpdateMigrationItemProviderSpecificInput(_serialization.Model): _subtype_map = {"instance_type": {"VMwareCbt": "VMwareCbtUpdateMigrationItemInput"}} - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: Optional[str] = None @@ -25390,7 +25645,9 @@ class UpdateMobilityServiceRequest(_serialization.Model): "properties": {"key": "properties", "type": "UpdateMobilityServiceRequestProperties"}, } - def __init__(self, *, properties: Optional["_models.UpdateMobilityServiceRequestProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.UpdateMobilityServiceRequestProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: The properties of the update mobility service request. :paramtype properties: @@ -25411,7 +25668,7 @@ class UpdateMobilityServiceRequestProperties(_serialization.Model): "run_as_account_id": {"key": "runAsAccountId", "type": "str"}, } - def __init__(self, *, run_as_account_id: Optional[str] = None, **kwargs): + def __init__(self, *, run_as_account_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword run_as_account_id: The CS run as account Id. :paramtype run_as_account_id: str @@ -25432,7 +25689,9 @@ class UpdateNetworkMappingInput(_serialization.Model): "properties": {"key": "properties", "type": "UpdateNetworkMappingInputProperties"}, } - def __init__(self, *, properties: Optional["_models.UpdateNetworkMappingInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.UpdateNetworkMappingInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: The input properties needed to update network mapping. :paramtype properties: @@ -25466,8 +25725,8 @@ def __init__( recovery_fabric_name: Optional[str] = None, recovery_network_id: Optional[str] = None, fabric_specific_details: Optional["_models.FabricSpecificUpdateNetworkMappingInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_fabric_name: Recovery fabric name. :paramtype recovery_fabric_name: str @@ -25495,7 +25754,7 @@ class UpdatePolicyInput(_serialization.Model): "properties": {"key": "properties", "type": "UpdatePolicyInputProperties"}, } - def __init__(self, *, properties: Optional["_models.UpdatePolicyInputProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.UpdatePolicyInputProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: The ReplicationProviderSettings. :paramtype properties: @@ -25518,8 +25777,8 @@ class UpdatePolicyInputProperties(_serialization.Model): } def __init__( - self, *, replication_provider_settings: Optional["_models.PolicyProviderSpecificInput"] = None, **kwargs - ): + self, *, replication_provider_settings: Optional["_models.PolicyProviderSpecificInput"] = None, **kwargs: Any + ) -> None: """ :keyword replication_provider_settings: The ReplicationProviderSettings. :paramtype replication_provider_settings: @@ -25542,8 +25801,8 @@ class UpdateProtectionContainerMappingInput(_serialization.Model): } def __init__( - self, *, properties: Optional["_models.UpdateProtectionContainerMappingInputProperties"] = None, **kwargs - ): + self, *, properties: Optional["_models.UpdateProtectionContainerMappingInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Update protection container mapping input properties. :paramtype properties: @@ -25573,8 +25832,8 @@ def __init__( self, *, provider_specific_input: Optional["_models.ReplicationProviderSpecificUpdateContainerMappingInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider_specific_input: Provider specific input for updating protection container mapping. @@ -25597,7 +25856,9 @@ class UpdateRecoveryPlanInput(_serialization.Model): "properties": {"key": "properties", "type": "UpdateRecoveryPlanInputProperties"}, } - def __init__(self, *, properties: Optional["_models.UpdateRecoveryPlanInputProperties"] = None, **kwargs): + def __init__( + self, *, properties: Optional["_models.UpdateRecoveryPlanInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Recovery plan update properties. :paramtype properties: @@ -25618,7 +25879,7 @@ class UpdateRecoveryPlanInputProperties(_serialization.Model): "groups": {"key": "groups", "type": "[RecoveryPlanGroup]"}, } - def __init__(self, *, groups: Optional[List["_models.RecoveryPlanGroup"]] = None, **kwargs): + def __init__(self, *, groups: Optional[List["_models.RecoveryPlanGroup"]] = None, **kwargs: Any) -> None: """ :keyword groups: The recovery plan groups. :paramtype groups: list[~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanGroup] @@ -25640,8 +25901,8 @@ class UpdateReplicationProtectedItemInput(_serialization.Model): } def __init__( - self, *, properties: Optional["_models.UpdateReplicationProtectedItemInputProperties"] = None, **kwargs - ): + self, *, properties: Optional["_models.UpdateReplicationProtectedItemInputProperties"] = None, **kwargs: Any + ) -> None: """ :keyword properties: Update replication protected item properties. :paramtype properties: @@ -25710,8 +25971,8 @@ def __init__( license_type: Optional[Union[str, "_models.LicenseType"]] = None, recovery_availability_set_id: Optional[str] = None, provider_specific_details: Optional["_models.UpdateReplicationProtectedItemProviderInput"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_azure_vm_name: Target Azure VM name given by the user. :paramtype recovery_azure_vm_name: str @@ -25764,7 +26025,7 @@ class UpdateVCenterRequest(_serialization.Model): "properties": {"key": "properties", "type": "UpdateVCenterRequestProperties"}, } - def __init__(self, *, properties: Optional["_models.UpdateVCenterRequestProperties"] = None, **kwargs): + def __init__(self, *, properties: Optional["_models.UpdateVCenterRequestProperties"] = None, **kwargs: Any) -> None: """ :keyword properties: The update VCenter Request Properties. :paramtype properties: @@ -25805,8 +26066,8 @@ def __init__( process_server_id: Optional[str] = None, port: Optional[str] = None, run_as_account_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: The friendly name of the vCenter. :paramtype friendly_name: str @@ -25859,8 +26120,12 @@ class VaultHealthDetails(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.VaultHealthProperties"] = None, **kwargs - ): + self, + *, + location: Optional[str] = None, + properties: Optional["_models.VaultHealthProperties"] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -25901,8 +26166,8 @@ def __init__( protected_items_health: Optional["_models.ResourceHealthSummary"] = None, fabrics_health: Optional["_models.ResourceHealthSummary"] = None, containers_health: Optional["_models.ResourceHealthSummary"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vault_errors: The list of errors on the vault. :paramtype vault_errors: list[~azure.mgmt.recoveryservicessiterecovery.models.HealthError] @@ -25956,8 +26221,12 @@ class VaultSetting(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.VaultSettingProperties"] = None, **kwargs - ): + self, + *, + location: Optional[str] = None, + properties: Optional["_models.VaultSettingProperties"] = None, + **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -25983,8 +26252,8 @@ class VaultSettingCollection(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.VaultSetting"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.VaultSetting"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of vault setting. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.VaultSetting] @@ -26014,7 +26283,7 @@ class VaultSettingCreationInput(_serialization.Model): "properties": {"key": "properties", "type": "VaultSettingCreationInputProperties"}, } - def __init__(self, *, properties: "_models.VaultSettingCreationInputProperties", **kwargs): + def __init__(self, *, properties: "_models.VaultSettingCreationInputProperties", **kwargs: Any) -> None: """ :keyword properties: Vault setting creation input properties. Required. :paramtype properties: @@ -26043,8 +26312,8 @@ def __init__( *, migration_solution_id: Optional[str] = None, vmware_to_azure_provider_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword migration_solution_id: The migration solution Id. :paramtype migration_solution_id: str @@ -26075,8 +26344,8 @@ def __init__( *, migration_solution_id: Optional[str] = None, vmware_to_azure_provider_type: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword migration_solution_id: The migration solution ARM Id. :paramtype migration_solution_id: str @@ -26120,8 +26389,8 @@ class VCenter(Resource): } def __init__( - self, *, location: Optional[str] = None, properties: Optional["_models.VCenterProperties"] = None, **kwargs - ): + self, *, location: Optional[str] = None, properties: Optional["_models.VCenterProperties"] = None, **kwargs: Any + ) -> None: """ :keyword location: Resource Location. :paramtype location: str @@ -26146,7 +26415,9 @@ class VCenterCollection(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.VCenter"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.VCenter"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The vCenter details. :paramtype value: list[~azure.mgmt.recoveryservicessiterecovery.models.VCenter] @@ -26213,8 +26484,8 @@ def __init__( run_as_account_id: Optional[str] = None, fabric_arm_resource_name: Optional[str] = None, health_errors: Optional[List["_models.HealthError"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword friendly_name: Friendly name of the vCenter. :paramtype friendly_name: str @@ -26277,8 +26548,8 @@ def __init__( version: Optional[str] = None, expiry_date: Optional[datetime.datetime] = None, status: Optional[Union[str, "_models.AgentVersionStatus"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword version: The agent version. :paramtype version: str @@ -26326,8 +26597,8 @@ def __init__( job_task: Optional["_models.JobEntity"] = None, skipped_reason: Optional[str] = None, skipped_reason_string: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword job_task: The job entity. :paramtype job_task: ~azure.mgmt.recoveryservicessiterecovery.models.JobEntity @@ -26359,7 +26630,7 @@ class VmmDetails(FabricSpecificDetails): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VMM" @@ -26382,7 +26653,7 @@ class VmmToAzureCreateNetworkMappingInput(FabricSpecificCreateNetworkMappingInpu "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VmmToAzure" @@ -26405,7 +26676,7 @@ class VmmToAzureNetworkMappingSettings(NetworkMappingFabricSpecificSettings): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VmmToAzure" @@ -26428,7 +26699,7 @@ class VmmToAzureUpdateNetworkMappingInput(FabricSpecificUpdateNetworkMappingInpu "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VmmToAzure" @@ -26451,7 +26722,7 @@ class VmmToVmmCreateNetworkMappingInput(FabricSpecificCreateNetworkMappingInput) "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VmmToVmm" @@ -26474,7 +26745,7 @@ class VmmToVmmNetworkMappingSettings(NetworkMappingFabricSpecificSettings): "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VmmToVmm" @@ -26497,7 +26768,7 @@ class VmmToVmmUpdateNetworkMappingInput(FabricSpecificUpdateNetworkMappingInput) "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VmmToVmm" @@ -26563,8 +26834,8 @@ def __init__( has_fibre_channel_adapter: Optional[Union[str, "_models.PresenceStatus"]] = None, has_shared_vhd: Optional[Union[str, "_models.PresenceStatus"]] = None, hyper_v_host_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword source_item_id: The source id of the object. :paramtype source_item_id: str @@ -26699,8 +26970,8 @@ def __init__( tfo_recovery_nic_resource_group_name: Optional[str] = None, tfo_reuse_existing_nic: bool = False, target_nic_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword nic_id: The nic Id. :paramtype nic_id: str @@ -26843,8 +27114,8 @@ def __init__( tfo_nic_resource_group_name: Optional[str] = None, tfo_reuse_existing_nic: Optional[bool] = None, target_nic_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword nic_id: The nic Id. :paramtype nic_id: str @@ -26926,8 +27197,8 @@ class VmNicUpdatesTaskDetails(TaskTypeDetails): } def __init__( - self, *, vm_id: Optional[str] = None, nic_id: Optional[str] = None, name: Optional[str] = None, **kwargs - ): + self, *, vm_id: Optional[str] = None, nic_id: Optional[str] = None, name: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword vm_id: Virtual machine Id. :paramtype vm_id: str @@ -26960,7 +27231,7 @@ class VMwareCbtContainerCreationInput(ReplicationProviderSpecificContainerCreati "instance_type": {"key": "instanceType", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VMwareCbt" @@ -27013,8 +27284,8 @@ def __init__( key_vault_uri: Optional[str] = None, storage_account_sas_secret_name: Optional[str] = None, service_bus_connection_string_secret_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword key_vault_id: The target key vault ARM Id. :paramtype key_vault_id: str @@ -27086,8 +27357,8 @@ def __init__( log_storage_account_sas_secret_name: str, disk_type: Optional[Union[str, "_models.DiskAccountType"]] = None, disk_encryption_set_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. Required. :paramtype disk_id: str @@ -27161,6 +27432,11 @@ class VMwareCbtEnableMigrationInput( :vartype target_availability_zone: str :ivar target_proximity_placement_group_id: The target proximity placement group ARM Id. :vartype target_proximity_placement_group_id: str + :ivar confidential_vm_key_vault_id: The confidential VM key vault Id for ADE installation. + :vartype confidential_vm_key_vault_id: str + :ivar target_vm_security_profile: The target VM security profile. + :vartype target_vm_security_profile: + ~azure.mgmt.recoveryservicessiterecovery.models.VMwareCbtSecurityProfileProperties :ivar target_boot_diagnostics_storage_account_id: The target boot diagnostics storage account ARM Id. :vartype target_boot_diagnostics_storage_account_id: str @@ -27205,6 +27481,8 @@ class VMwareCbtEnableMigrationInput( "target_availability_set_id": {"key": "targetAvailabilitySetId", "type": "str"}, "target_availability_zone": {"key": "targetAvailabilityZone", "type": "str"}, "target_proximity_placement_group_id": {"key": "targetProximityPlacementGroupId", "type": "str"}, + "confidential_vm_key_vault_id": {"key": "confidentialVmKeyVaultId", "type": "str"}, + "target_vm_security_profile": {"key": "targetVmSecurityProfile", "type": "VMwareCbtSecurityProfileProperties"}, "target_boot_diagnostics_storage_account_id": {"key": "targetBootDiagnosticsStorageAccountId", "type": "str"}, "perform_auto_resync": {"key": "performAutoResync", "type": "str"}, "target_vm_tags": {"key": "targetVmTags", "type": "{str}"}, @@ -27233,14 +27511,16 @@ def __init__( # pylint: disable=too-many-locals target_availability_set_id: Optional[str] = None, target_availability_zone: Optional[str] = None, target_proximity_placement_group_id: Optional[str] = None, + confidential_vm_key_vault_id: Optional[str] = None, + target_vm_security_profile: Optional["_models.VMwareCbtSecurityProfileProperties"] = None, target_boot_diagnostics_storage_account_id: Optional[str] = None, perform_auto_resync: Optional[str] = None, target_vm_tags: Optional[Dict[str, str]] = None, seed_disk_tags: Optional[Dict[str, str]] = None, target_disk_tags: Optional[Dict[str, str]] = None, target_nic_tags: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vmware_machine_id: The ARM Id of the VM discovered in VMware. Required. :paramtype vmware_machine_id: str @@ -27281,6 +27561,11 @@ def __init__( # pylint: disable=too-many-locals :paramtype target_availability_zone: str :keyword target_proximity_placement_group_id: The target proximity placement group ARM Id. :paramtype target_proximity_placement_group_id: str + :keyword confidential_vm_key_vault_id: The confidential VM key vault Id for ADE installation. + :paramtype confidential_vm_key_vault_id: str + :keyword target_vm_security_profile: The target VM security profile. + :paramtype target_vm_security_profile: + ~azure.mgmt.recoveryservicessiterecovery.models.VMwareCbtSecurityProfileProperties :keyword target_boot_diagnostics_storage_account_id: The target boot diagnostics storage account ARM Id. :paramtype target_boot_diagnostics_storage_account_id: str @@ -27314,6 +27599,8 @@ def __init__( # pylint: disable=too-many-locals self.target_availability_set_id = target_availability_set_id self.target_availability_zone = target_availability_zone self.target_proximity_placement_group_id = target_proximity_placement_group_id + self.confidential_vm_key_vault_id = confidential_vm_key_vault_id + self.target_vm_security_profile = target_vm_security_profile self.target_boot_diagnostics_storage_account_id = target_boot_diagnostics_storage_account_id self.perform_auto_resync = perform_auto_resync self.target_vm_tags = target_vm_tags @@ -27345,7 +27632,7 @@ class VMwareCbtEventDetails(EventProviderSpecificDetails): "migration_item_name": {"key": "migrationItemName", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VMwareCbt" @@ -27361,6 +27648,8 @@ class VMwareCbtMigrateInput(MigrateProviderSpecificInput): :vartype instance_type: str :ivar perform_shutdown: A value indicating whether VM is to be shutdown. Required. :vartype perform_shutdown: str + :ivar os_upgrade_version: A value indicating the inplace OS Upgrade version. + :vartype os_upgrade_version: str """ _validation = { @@ -27371,16 +27660,20 @@ class VMwareCbtMigrateInput(MigrateProviderSpecificInput): _attribute_map = { "instance_type": {"key": "instanceType", "type": "str"}, "perform_shutdown": {"key": "performShutdown", "type": "str"}, + "os_upgrade_version": {"key": "osUpgradeVersion", "type": "str"}, } - def __init__(self, *, perform_shutdown: str, **kwargs): + def __init__(self, *, perform_shutdown: str, os_upgrade_version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword perform_shutdown: A value indicating whether VM is to be shutdown. Required. :paramtype perform_shutdown: str + :keyword os_upgrade_version: A value indicating the inplace OS Upgrade version. + :paramtype os_upgrade_version: str """ super().__init__(**kwargs) self.instance_type: str = "VMwareCbt" self.perform_shutdown = perform_shutdown + self.os_upgrade_version = os_upgrade_version class VMwareCbtMigrationDetails(MigrationProviderSpecificSettings): # pylint: disable=too-many-instance-attributes @@ -27396,6 +27689,8 @@ class VMwareCbtMigrationDetails(MigrationProviderSpecificSettings): # pylint: d :vartype vmware_machine_id: str :ivar os_type: The type of the OS on the VM. :vartype os_type: str + :ivar os_name: The name of the OS on the VM. + :vartype os_name: str :ivar firmware_type: The firmware type. :vartype firmware_type: str :ivar target_generation: The target generation. @@ -27425,6 +27720,11 @@ class VMwareCbtMigrationDetails(MigrationProviderSpecificSettings): # pylint: d :vartype target_availability_zone: str :ivar target_proximity_placement_group_id: The target proximity placement group Id. :vartype target_proximity_placement_group_id: str + :ivar confidential_vm_key_vault_id: The confidential VM key vault Id for ADE installation. + :vartype confidential_vm_key_vault_id: str + :ivar target_vm_security_profile: The target VM security profile. + :vartype target_vm_security_profile: + ~azure.mgmt.recoveryservicessiterecovery.models.VMwareCbtSecurityProfileProperties :ivar target_boot_diagnostics_storage_account_id: The target boot diagnostics storage account ARM Id. :vartype target_boot_diagnostics_storage_account_id: str @@ -27472,12 +27772,15 @@ class VMwareCbtMigrationDetails(MigrationProviderSpecificSettings): # pylint: d :vartype seed_disk_tags: dict[str, str] :ivar target_disk_tags: The tags for the target disks. :vartype target_disk_tags: dict[str, str] + :ivar supported_os_versions: List of supported inplace OS Upgrade versions. + :vartype supported_os_versions: list[str] """ _validation = { "instance_type": {"required": True}, "vmware_machine_id": {"readonly": True}, "os_type": {"readonly": True}, + "os_name": {"readonly": True}, "firmware_type": {"readonly": True}, "target_generation": {"readonly": True}, "data_mover_run_as_account_id": {"readonly": True}, @@ -27502,6 +27805,7 @@ class VMwareCbtMigrationDetails(MigrationProviderSpecificSettings): # pylint: d "instance_type": {"key": "instanceType", "type": "str"}, "vmware_machine_id": {"key": "vmwareMachineId", "type": "str"}, "os_type": {"key": "osType", "type": "str"}, + "os_name": {"key": "osName", "type": "str"}, "firmware_type": {"key": "firmwareType", "type": "str"}, "target_generation": {"key": "targetGeneration", "type": "str"}, "license_type": {"key": "licenseType", "type": "str"}, @@ -27516,6 +27820,8 @@ class VMwareCbtMigrationDetails(MigrationProviderSpecificSettings): # pylint: d "target_availability_set_id": {"key": "targetAvailabilitySetId", "type": "str"}, "target_availability_zone": {"key": "targetAvailabilityZone", "type": "str"}, "target_proximity_placement_group_id": {"key": "targetProximityPlacementGroupId", "type": "str"}, + "confidential_vm_key_vault_id": {"key": "confidentialVmKeyVaultId", "type": "str"}, + "target_vm_security_profile": {"key": "targetVmSecurityProfile", "type": "VMwareCbtSecurityProfileProperties"}, "target_boot_diagnostics_storage_account_id": {"key": "targetBootDiagnosticsStorageAccountId", "type": "str"}, "target_vm_tags": {"key": "targetVmTags", "type": "{str}"}, "protected_disks": {"key": "protectedDisks", "type": "[VMwareCbtProtectedDiskDetails]"}, @@ -27538,6 +27844,7 @@ class VMwareCbtMigrationDetails(MigrationProviderSpecificSettings): # pylint: d "perform_auto_resync": {"key": "performAutoResync", "type": "str"}, "seed_disk_tags": {"key": "seedDiskTags", "type": "{str}"}, "target_disk_tags": {"key": "targetDiskTags", "type": "{str}"}, + "supported_os_versions": {"key": "supportedOSVersions", "type": "[str]"}, } def __init__( # pylint: disable=too-many-locals @@ -27551,6 +27858,8 @@ def __init__( # pylint: disable=too-many-locals target_availability_set_id: Optional[str] = None, target_availability_zone: Optional[str] = None, target_proximity_placement_group_id: Optional[str] = None, + confidential_vm_key_vault_id: Optional[str] = None, + target_vm_security_profile: Optional["_models.VMwareCbtSecurityProfileProperties"] = None, target_boot_diagnostics_storage_account_id: Optional[str] = None, target_vm_tags: Optional[Dict[str, str]] = None, protected_disks: Optional[List["_models.VMwareCbtProtectedDiskDetails"]] = None, @@ -27561,8 +27870,9 @@ def __init__( # pylint: disable=too-many-locals perform_auto_resync: Optional[str] = None, seed_disk_tags: Optional[Dict[str, str]] = None, target_disk_tags: Optional[Dict[str, str]] = None, - **kwargs - ): + supported_os_versions: Optional[List[str]] = None, + **kwargs: Any + ) -> None: """ :keyword license_type: License Type of the VM to be used. :paramtype license_type: str @@ -27580,6 +27890,11 @@ def __init__( # pylint: disable=too-many-locals :paramtype target_availability_zone: str :keyword target_proximity_placement_group_id: The target proximity placement group Id. :paramtype target_proximity_placement_group_id: str + :keyword confidential_vm_key_vault_id: The confidential VM key vault Id for ADE installation. + :paramtype confidential_vm_key_vault_id: str + :keyword target_vm_security_profile: The target VM security profile. + :paramtype target_vm_security_profile: + ~azure.mgmt.recoveryservicessiterecovery.models.VMwareCbtSecurityProfileProperties :keyword target_boot_diagnostics_storage_account_id: The target boot diagnostics storage account ARM Id. :paramtype target_boot_diagnostics_storage_account_id: str @@ -27602,11 +27917,14 @@ def __init__( # pylint: disable=too-many-locals :paramtype seed_disk_tags: dict[str, str] :keyword target_disk_tags: The tags for the target disks. :paramtype target_disk_tags: dict[str, str] + :keyword supported_os_versions: List of supported inplace OS Upgrade versions. + :paramtype supported_os_versions: list[str] """ super().__init__(**kwargs) self.instance_type: str = "VMwareCbt" self.vmware_machine_id = None self.os_type = None + self.os_name = None self.firmware_type = None self.target_generation = None self.license_type = license_type @@ -27621,6 +27939,8 @@ def __init__( # pylint: disable=too-many-locals self.target_availability_set_id = target_availability_set_id self.target_availability_zone = target_availability_zone self.target_proximity_placement_group_id = target_proximity_placement_group_id + self.confidential_vm_key_vault_id = confidential_vm_key_vault_id + self.target_vm_security_profile = target_vm_security_profile self.target_boot_diagnostics_storage_account_id = target_boot_diagnostics_storage_account_id self.target_vm_tags = target_vm_tags self.protected_disks = protected_disks @@ -27643,6 +27963,7 @@ def __init__( # pylint: disable=too-many-locals self.perform_auto_resync = perform_auto_resync self.seed_disk_tags = seed_disk_tags self.target_disk_tags = target_disk_tags + self.supported_os_versions = supported_os_versions class VMwareCbtNicDetails(_serialization.Model): # pylint: disable=too-many-instance-attributes @@ -27722,8 +28043,8 @@ def __init__( test_ip_address_type: Optional[Union[str, "_models.EthernetAddressType"]] = None, target_nic_name: Optional[str] = None, is_selected_for_migration: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword is_primary_nic: A value indicating whether this is the primary NIC. :paramtype is_primary_nic: str @@ -27818,8 +28139,8 @@ def __init__( target_nic_name: Optional[str] = None, test_subnet_name: Optional[str] = None, test_static_ip_address: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword nic_id: The NIC Id. Required. :paramtype nic_id: str @@ -27884,8 +28205,8 @@ def __init__( recovery_point_history_in_minutes: Optional[int] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_history_in_minutes: The duration in minutes until which the recovery points need to be stored. @@ -27938,8 +28259,8 @@ def __init__( recovery_point_history_in_minutes: Optional[int] = None, app_consistent_frequency_in_minutes: Optional[int] = None, crash_consistent_frequency_in_minutes: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword recovery_point_history_in_minutes: The duration in minutes until which the recovery points need to be stored. @@ -28031,8 +28352,8 @@ def __init__( *, disk_type: Optional[Union[str, "_models.DiskAccountType"]] = None, target_disk_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword disk_type: The disk type. Known values are: "Standard_LRS", "Premium_LRS", and "StandardSSD_LRS". @@ -28081,6 +28402,8 @@ class VMwareCbtProtectionContainerMappingDetails(ProtectionContainerMappingProvi :vartype target_location: str :ivar role_size_to_nic_count_map: The role size to NIC count map. :vartype role_size_to_nic_count_map: dict[str, int] + :ivar excluded_skus: The SKUs to be excluded. + :vartype excluded_skus: list[str] """ _validation = { @@ -28103,10 +28426,14 @@ class VMwareCbtProtectionContainerMappingDetails(ProtectionContainerMappingProvi "service_bus_connection_string_secret_name": {"key": "serviceBusConnectionStringSecretName", "type": "str"}, "target_location": {"key": "targetLocation", "type": "str"}, "role_size_to_nic_count_map": {"key": "roleSizeToNicCountMap", "type": "{int}"}, + "excluded_skus": {"key": "excludedSkus", "type": "[str]"}, } - def __init__(self, **kwargs): - """ """ + def __init__(self, *, excluded_skus: Optional[List[str]] = None, **kwargs: Any) -> None: + """ + :keyword excluded_skus: The SKUs to be excluded. + :paramtype excluded_skus: list[str] + """ super().__init__(**kwargs) self.instance_type: str = "VMwareCbt" self.key_vault_id = None @@ -28116,6 +28443,7 @@ def __init__(self, **kwargs): self.service_bus_connection_string_secret_name = None self.target_location = None self.role_size_to_nic_count_map = None + self.excluded_skus = excluded_skus class VMwareCbtResumeReplicationInput(ResumeReplicationProviderSpecificInput): @@ -28138,7 +28466,7 @@ class VMwareCbtResumeReplicationInput(ResumeReplicationProviderSpecificInput): "delete_migration_resources": {"key": "deleteMigrationResources", "type": "str"}, } - def __init__(self, *, delete_migration_resources: Optional[str] = None, **kwargs): + def __init__(self, *, delete_migration_resources: Optional[str] = None, **kwargs: Any) -> None: """ :keyword delete_migration_resources: A value indicating whether Migration resources to be deleted. @@ -28170,7 +28498,7 @@ class VMwareCbtResyncInput(ResyncProviderSpecificInput): "skip_cbt_reset": {"key": "skipCbtReset", "type": "str"}, } - def __init__(self, *, skip_cbt_reset: str, **kwargs): + def __init__(self, *, skip_cbt_reset: str, **kwargs: Any) -> None: """ :keyword skip_cbt_reset: A value indicating whether CBT is to be reset. Required. :paramtype skip_cbt_reset: str @@ -28180,6 +28508,73 @@ def __init__(self, *, skip_cbt_reset: str, **kwargs): self.skip_cbt_reset = skip_cbt_reset +class VMwareCbtSecurityProfileProperties(_serialization.Model): + """VMwareCbt security profile input. + + :ivar target_vm_security_type: The target VM security type. Known values are: "None", + "TrustedLaunch", and "ConfidentialVM". + :vartype target_vm_security_type: str or + ~azure.mgmt.recoveryservicessiterecovery.models.SecurityType + :ivar is_target_vm_secure_boot_enabled: A value indicating whether secure boot to be enabled. + :vartype is_target_vm_secure_boot_enabled: str + :ivar is_target_vm_tpm_enabled: A value indicating whether trusted platform module to be + enabled. + :vartype is_target_vm_tpm_enabled: str + :ivar is_target_vm_integrity_monitoring_enabled: A value indicating whether integrity + monitoring to be enabled. + :vartype is_target_vm_integrity_monitoring_enabled: str + :ivar is_target_vm_confidential_encryption_enabled: A value indicating whether confidential + compute encryption to be enabled. + :vartype is_target_vm_confidential_encryption_enabled: str + """ + + _attribute_map = { + "target_vm_security_type": {"key": "targetVmSecurityType", "type": "str"}, + "is_target_vm_secure_boot_enabled": {"key": "isTargetVmSecureBootEnabled", "type": "str"}, + "is_target_vm_tpm_enabled": {"key": "isTargetVmTpmEnabled", "type": "str"}, + "is_target_vm_integrity_monitoring_enabled": {"key": "isTargetVmIntegrityMonitoringEnabled", "type": "str"}, + "is_target_vm_confidential_encryption_enabled": { + "key": "isTargetVmConfidentialEncryptionEnabled", + "type": "str", + }, + } + + def __init__( + self, + *, + target_vm_security_type: Optional[Union[str, "_models.SecurityType"]] = None, + is_target_vm_secure_boot_enabled: Optional[str] = None, + is_target_vm_tpm_enabled: Optional[str] = None, + is_target_vm_integrity_monitoring_enabled: Optional[str] = None, + is_target_vm_confidential_encryption_enabled: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword target_vm_security_type: The target VM security type. Known values are: "None", + "TrustedLaunch", and "ConfidentialVM". + :paramtype target_vm_security_type: str or + ~azure.mgmt.recoveryservicessiterecovery.models.SecurityType + :keyword is_target_vm_secure_boot_enabled: A value indicating whether secure boot to be + enabled. + :paramtype is_target_vm_secure_boot_enabled: str + :keyword is_target_vm_tpm_enabled: A value indicating whether trusted platform module to be + enabled. + :paramtype is_target_vm_tpm_enabled: str + :keyword is_target_vm_integrity_monitoring_enabled: A value indicating whether integrity + monitoring to be enabled. + :paramtype is_target_vm_integrity_monitoring_enabled: str + :keyword is_target_vm_confidential_encryption_enabled: A value indicating whether confidential + compute encryption to be enabled. + :paramtype is_target_vm_confidential_encryption_enabled: str + """ + super().__init__(**kwargs) + self.target_vm_security_type = target_vm_security_type + self.is_target_vm_secure_boot_enabled = is_target_vm_secure_boot_enabled + self.is_target_vm_tpm_enabled = is_target_vm_tpm_enabled + self.is_target_vm_integrity_monitoring_enabled = is_target_vm_integrity_monitoring_enabled + self.is_target_vm_confidential_encryption_enabled = is_target_vm_confidential_encryption_enabled + + class VMwareCbtTestMigrateInput(TestMigrateProviderSpecificInput): """VMwareCbt specific test migrate input. @@ -28193,6 +28588,8 @@ class VMwareCbtTestMigrateInput(TestMigrateProviderSpecificInput): :vartype network_id: str :ivar vm_nics: The list of NIC details. :vartype vm_nics: list[~azure.mgmt.recoveryservicessiterecovery.models.VMwareCbtNicInput] + :ivar os_upgrade_version: A value indicating the inplace OS Upgrade version. + :vartype os_upgrade_version: str """ _validation = { @@ -28206,6 +28603,7 @@ class VMwareCbtTestMigrateInput(TestMigrateProviderSpecificInput): "recovery_point_id": {"key": "recoveryPointId", "type": "str"}, "network_id": {"key": "networkId", "type": "str"}, "vm_nics": {"key": "vmNics", "type": "[VMwareCbtNicInput]"}, + "os_upgrade_version": {"key": "osUpgradeVersion", "type": "str"}, } def __init__( @@ -28214,8 +28612,9 @@ def __init__( recovery_point_id: str, network_id: str, vm_nics: Optional[List["_models.VMwareCbtNicInput"]] = None, - **kwargs - ): + os_upgrade_version: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword recovery_point_id: The recovery point Id. Required. :paramtype recovery_point_id: str @@ -28223,12 +28622,15 @@ def __init__( :paramtype network_id: str :keyword vm_nics: The list of NIC details. :paramtype vm_nics: list[~azure.mgmt.recoveryservicessiterecovery.models.VMwareCbtNicInput] + :keyword os_upgrade_version: A value indicating the inplace OS Upgrade version. + :paramtype os_upgrade_version: str """ super().__init__(**kwargs) self.instance_type: str = "VMwareCbt" self.recovery_point_id = recovery_point_id self.network_id = network_id self.vm_nics = vm_nics + self.os_upgrade_version = os_upgrade_version class VMwareCbtUpdateDiskInput(_serialization.Model): @@ -28255,8 +28657,8 @@ class VMwareCbtUpdateDiskInput(_serialization.Model): } def __init__( - self, *, disk_id: str, target_disk_name: Optional[str] = None, is_os_disk: Optional[str] = None, **kwargs - ): + self, *, disk_id: str, target_disk_name: Optional[str] = None, is_os_disk: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword disk_id: The disk Id. Required. :paramtype disk_id: str @@ -28366,8 +28768,8 @@ def __init__( target_vm_tags: Optional[Dict[str, str]] = None, target_disk_tags: Optional[Dict[str, str]] = None, target_nic_tags: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword target_vm_name: The target VM name. :paramtype target_vm_name: str @@ -28589,8 +28991,8 @@ def __init__( # pylint: disable=too-many-locals switch_provider_blocking_error_details: Optional[ List["_models.InMageFabricSwitchProviderBlockingErrorDetails"] ] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword process_servers: The list of Process Servers associated with the fabric. :paramtype process_servers: list[~azure.mgmt.recoveryservicessiterecovery.models.ProcessServer] @@ -28733,8 +29135,8 @@ def __init__( migration_solution_id: str, vmware_site_id: Optional[str] = None, physical_site_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword vmware_site_id: The ARM Id of the VMware site. :paramtype vmware_site_id: str @@ -28798,7 +29200,7 @@ class VMwareV2FabricSpecificDetails(FabricSpecificDetails): "process_servers": {"key": "processServers", "type": "[ProcessServerDetails]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.instance_type: str = "VMwareV2" @@ -28873,8 +29275,8 @@ def __init__( discovery_type: Optional[str] = None, disk_details: Optional[List["_models.InMageDiskDetails"]] = None, validation_errors: Optional[List["_models.HealthError"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword agent_generated_id: The ID generated by the InMage agent after it gets installed on guest. This is the ID to be used during InMage CreateProtection. diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_site_recovery_management_client_enums.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_site_recovery_management_client_enums.py index a743df64d7296..67a6d0e0a13ca 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_site_recovery_management_client_enums.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/models/_site_recovery_management_client_enums.py @@ -388,6 +388,14 @@ class RpInMageRecoveryPointType(str, Enum, metaclass=CaseInsensitiveEnumMeta): CUSTOM = "Custom" +class SecurityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The target VM security type.""" + + NONE = "None" + TRUSTED_LAUNCH = "TrustedLaunch" + CONFIDENTIAL_VM = "ConfidentialVM" + + class SetMultiVmSyncStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """A value indicating whether multi-VM sync has to be enabled. Value should be 'Enabled' or 'Disabled'. diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_migration_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_migration_recovery_points_operations.py index e2d03a0c6c28c..7594934c3cdd6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_migration_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_migration_recovery_points_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ def build_list_by_replication_migration_items_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,7 +89,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -168,9 +163,7 @@ def list_by_replication_migration_items( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationRecoveryPointCollection] = kwargs.pop("cls", None) error_map = { @@ -227,8 +220,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -281,9 +275,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationRecoveryPoint] = kwargs.pop("cls", None) request = build_get_request( @@ -302,8 +294,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_operations.py index 6a9f05fbdaa18..3291d83eee8b0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_group_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,9 +98,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.OperationsDiscovery"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.OperationsDiscoveryCollection] = kwargs.pop("cls", None) error_map = { @@ -158,8 +151,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_recovery_points_operations.py index ddc6e3c5d8e4d..08a6b1da266dc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_recovery_points_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ def build_list_by_replication_protected_items_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -96,7 +91,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -169,9 +164,7 @@ def list_by_replication_protected_items( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPointCollection] = kwargs.pop("cls", None) error_map = { @@ -228,8 +221,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -282,9 +276,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPoint] = kwargs.pop("cls", None) request = build_get_request( @@ -303,8 +295,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_alert_settings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_alert_settings_operations.py index 3a442236f19b9..f6cef5bd1424a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_alert_settings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_alert_settings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +30,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +43,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -78,7 +74,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -110,7 +106,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -172,9 +168,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Alert"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.AlertCollection] = kwargs.pop("cls", None) error_map = { @@ -228,8 +222,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -269,9 +264,7 @@ def get(self, alert_setting_name: str, **kwargs: Any) -> _models.Alert: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Alert] = kwargs.pop("cls", None) request = build_get_request( @@ -287,8 +280,9 @@ def get(self, alert_setting_name: str, **kwargs: Any) -> _models.Alert: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -365,8 +359,8 @@ def create( :param alert_setting_name: The name of the email notification(alert) configuration. Required. :type alert_setting_name: str - :param request: The input to configure the email notification(alert). Is either a model type or - a IO type. Required. + :param request: The input to configure the email notification(alert). Is either a + ConfigureAlertRequest type or a IO type. Required. :type request: ~azure.mgmt.recoveryservicessiterecovery.models.ConfigureAlertRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -387,16 +381,14 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Alert] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(request, (IO, bytes)): + if isinstance(request, (IOBase, bytes)): _content = request else: _json = self._serialize.body(request, "ConfigureAlertRequest") @@ -417,8 +409,9 @@ def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_appliances_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_appliances_operations.py index b8cf09c350549..30597060895f5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_appliances_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_appliances_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -111,9 +106,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ApplianceCollection] = kwargs.pop("cls", None) error_map = { @@ -168,8 +161,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_eligibility_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_eligibility_results_operations.py index 2e401100fb37d..fc45e8b4869b9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_eligibility_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_eligibility_results_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -144,9 +139,7 @@ def list(self, virtual_machine_name: str, **kwargs: Any) -> _models.ReplicationE _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationEligibilityResultsCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -161,8 +154,9 @@ def list(self, virtual_machine_name: str, **kwargs: Any) -> _models.ReplicationE request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -206,9 +200,7 @@ def get(self, virtual_machine_name: str, **kwargs: Any) -> _models.ReplicationEl _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationEligibilityResults] = kwargs.pop("cls", None) request = build_get_request( @@ -223,8 +215,9 @@ def get(self, virtual_machine_name: str, **kwargs: Any) -> _models.ReplicationEl request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_events_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_events_operations.py index 4c4ae1061c18b..6354bd3301fe0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_events_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_events_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +75,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -141,9 +136,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.EventCollection] = kwargs.pop("cls", None) error_map = { @@ -198,8 +191,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -239,9 +233,7 @@ def get(self, event_name: str, **kwargs: Any) -> _models.Event: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Event] = kwargs.pop("cls", None) request = build_get_request( @@ -257,8 +249,9 @@ def get(self, event_name: str, **kwargs: Any) -> _models.Event: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_fabrics_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_fabrics_operations.py index 114c07af1fe76..976ebcd6e2681 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_fabrics_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_fabrics_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,7 +82,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,7 +116,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -154,7 +150,7 @@ def build_purge_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -181,7 +177,7 @@ def build_check_consistency_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -212,7 +208,7 @@ def build_migrate_to_aad_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -239,7 +235,7 @@ def build_reassociate_gateway_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -273,7 +269,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -300,7 +296,7 @@ def build_renew_certificate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -362,9 +358,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Fabric"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.FabricCollection] = kwargs.pop("cls", None) error_map = { @@ -418,8 +412,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -461,9 +456,7 @@ def get(self, fabric_name: str, filter: Optional[str] = None, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) request = build_get_request( @@ -480,8 +473,9 @@ def get(self, fabric_name: str, filter: Optional[str] = None, **kwargs: Any) -> request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -515,16 +509,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "FabricCreationInput") @@ -545,8 +537,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -639,7 +632,8 @@ def begin_create( :param fabric_name: Name of the ASR fabric. Required. :type fabric_name: str - :param input: Fabric creation input. Is either a model type or a IO type. Required. + :param input: Fabric creation input. Is either a FabricCreationInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.FabricCreationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -659,9 +653,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -717,9 +709,7 @@ def _purge_initial(self, fabric_name: str, **kwargs: Any) -> None: # pylint: di _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -735,8 +725,9 @@ def _purge_initial(self, fabric_name: str, **kwargs: Any) -> None: # pylint: di request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -775,9 +766,7 @@ def begin_purge(self, fabric_name: str, **kwargs: Any) -> LROPoller[None]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -828,9 +817,7 @@ def _check_consistency_initial(self, fabric_name: str, **kwargs: Any) -> Optiona _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) request = build_check_consistency_request( @@ -846,8 +833,9 @@ def _check_consistency_initial(self, fabric_name: str, **kwargs: Any) -> Optiona request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -892,9 +880,7 @@ def begin_check_consistency(self, fabric_name: str, **kwargs: Any) -> LROPoller[ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -949,9 +935,7 @@ def _migrate_to_aad_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_migrate_to_aad_request( @@ -967,8 +951,9 @@ def _migrate_to_aad_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1007,9 +992,7 @@ def begin_migrate_to_aad(self, fabric_name: str, **kwargs: Any) -> LROPoller[Non _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1065,16 +1048,14 @@ def _reassociate_gateway_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(failover_process_server_request, (IO, bytes)): + if isinstance(failover_process_server_request, (IOBase, bytes)): _content = failover_process_server_request else: _json = self._serialize.body(failover_process_server_request, "FailoverProcessServerRequest") @@ -1095,8 +1076,9 @@ def _reassociate_gateway_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1201,7 +1183,7 @@ def begin_reassociate_gateway( :param fabric_name: The name of the fabric containing the process server. Required. :type fabric_name: str :param failover_process_server_request: The input to the failover process server operation. Is - either a model type or a IO type. Required. + either a FailoverProcessServerRequest type or a IO type. Required. :type failover_process_server_request: ~azure.mgmt.recoveryservicessiterecovery.models.FailoverProcessServerRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1222,9 +1204,7 @@ def begin_reassociate_gateway( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1282,9 +1262,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -1300,8 +1278,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1340,9 +1319,7 @@ def begin_delete(self, fabric_name: str, **kwargs: Any) -> LROPoller[None]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1395,16 +1372,14 @@ def _renew_certificate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Fabric]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(renew_certificate, (IO, bytes)): + if isinstance(renew_certificate, (IOBase, bytes)): _content = renew_certificate else: _json = self._serialize.body(renew_certificate, "RenewCertificateInput") @@ -1425,8 +1400,9 @@ def _renew_certificate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1519,8 +1495,8 @@ def begin_renew_certificate( :param fabric_name: fabric name to renew certs for. Required. :type fabric_name: str - :param renew_certificate: Renew certificate input. Is either a model type or a IO type. - Required. + :param renew_certificate: Renew certificate input. Is either a RenewCertificateInput type or a + IO type. Required. :type renew_certificate: ~azure.mgmt.recoveryservicessiterecovery.models.RenewCertificateInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1541,9 +1517,7 @@ def begin_renew_certificate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Fabric] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_jobs_operations.py index 284f5d63583fb..ddcacf3c462cb 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_jobs_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -82,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +110,7 @@ def build_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +142,7 @@ def build_restart_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,7 +174,7 @@ def build_resume_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -213,7 +209,7 @@ def build_export_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -276,9 +272,7 @@ def list(self, filter: Optional[str] = None, **kwargs: Any) -> Iterable["_models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.JobCollection] = kwargs.pop("cls", None) error_map = { @@ -333,8 +327,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -374,9 +369,7 @@ def get(self, job_name: str, **kwargs: Any) -> _models.Job: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) request = build_get_request( @@ -392,8 +385,9 @@ def get(self, job_name: str, **kwargs: Any) -> _models.Job: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -425,9 +419,7 @@ def _cancel_initial(self, job_name: str, **kwargs: Any) -> Optional[_models.Job] _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) request = build_cancel_request( @@ -443,8 +435,9 @@ def _cancel_initial(self, job_name: str, **kwargs: Any) -> Optional[_models.Job] request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -489,9 +482,7 @@ def begin_cancel(self, job_name: str, **kwargs: Any) -> LROPoller[_models.Job]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -544,9 +535,7 @@ def _restart_initial(self, job_name: str, **kwargs: Any) -> Optional[_models.Job _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) request = build_restart_request( @@ -562,8 +551,9 @@ def _restart_initial(self, job_name: str, **kwargs: Any) -> Optional[_models.Job request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -608,9 +598,7 @@ def begin_restart(self, job_name: str, **kwargs: Any) -> LROPoller[_models.Job]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -665,16 +653,14 @@ def _resume_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(resume_job_params, (IO, bytes)): + if isinstance(resume_job_params, (IOBase, bytes)): _content = resume_job_params else: _json = self._serialize.body(resume_job_params, "ResumeJobParams") @@ -695,8 +681,9 @@ def _resume_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -789,7 +776,8 @@ def begin_resume( :param job_name: Job identifier. Required. :type job_name: str - :param resume_job_params: Resume rob comments. Is either a model type or a IO type. Required. + :param resume_job_params: Resume rob comments. Is either a ResumeJobParams type or a IO type. + Required. :type resume_job_params: ~azure.mgmt.recoveryservicessiterecovery.models.ResumeJobParams or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -809,9 +797,7 @@ def begin_resume( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -869,16 +855,14 @@ def _export_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Job]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(job_query_parameter, (IO, bytes)): + if isinstance(job_query_parameter, (IOBase, bytes)): _content = job_query_parameter else: _json = self._serialize.body(job_query_parameter, "JobQueryParameter") @@ -898,8 +882,9 @@ def _export_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -981,7 +966,8 @@ def begin_export( The operation to export the details of the Azure Site Recovery jobs of the vault. - :param job_query_parameter: job query filter. Is either a model type or a IO type. Required. + :param job_query_parameter: job query filter. Is either a JobQueryParameter type or a IO type. + Required. :type job_query_parameter: ~azure.mgmt.recoveryservicessiterecovery.models.JobQueryParameter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1002,9 +988,7 @@ def begin_export( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_logical_networks_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_logical_networks_operations.py index 3e481859c4b0e..9e77289548736 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_logical_networks_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_logical_networks_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_by_replication_fabrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -84,7 +79,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -147,9 +142,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> Iterab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.LogicalNetworkCollection] = kwargs.pop("cls", None) error_map = { @@ -204,8 +197,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -247,9 +241,7 @@ def get(self, fabric_name: str, logical_network_name: str, **kwargs: Any) -> _mo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.LogicalNetwork] = kwargs.pop("cls", None) request = build_get_request( @@ -266,8 +258,9 @@ def get(self, fabric_name: str, logical_network_name: str, **kwargs: Any) -> _mo request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_migration_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_migration_items_operations.py index 1d58287631496..57772c25373b3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_migration_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_migration_items_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +54,7 @@ def build_list_by_replication_protection_containers_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +99,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -143,7 +139,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -187,7 +183,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -224,7 +220,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -267,7 +263,7 @@ def build_migrate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -310,7 +306,7 @@ def build_pause_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -353,7 +349,7 @@ def build_resume_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -396,7 +392,7 @@ def build_resync_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -439,7 +435,7 @@ def build_test_migrate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -482,7 +478,7 @@ def build_test_migrate_cleanup_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -526,7 +522,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -609,9 +605,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationItemCollection] = kwargs.pop("cls", None) error_map = { @@ -670,8 +664,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -717,9 +712,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) request = build_get_request( @@ -737,8 +730,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -777,16 +771,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "EnableMigrationInput") @@ -809,8 +801,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -933,7 +926,8 @@ def begin_create( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param input: Enable migration input. Is either a model type or a IO type. Required. + :param input: Enable migration input. Is either a EnableMigrationInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.EnableMigrationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -955,9 +949,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1022,9 +1014,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -1043,8 +1033,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1096,9 +1087,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1159,16 +1148,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdateMigrationItemInput") @@ -1191,8 +1178,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1315,7 +1303,8 @@ def begin_update( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param input: Update migration item input. Is either a model type or a IO type. Required. + :param input: Update migration item input. Is either a UpdateMigrationItemInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateMigrationItemInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1337,9 +1326,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1404,16 +1391,14 @@ def _migrate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(migrate_input, (IO, bytes)): + if isinstance(migrate_input, (IOBase, bytes)): _content = migrate_input else: _json = self._serialize.body(migrate_input, "MigrateInput") @@ -1436,8 +1421,9 @@ def _migrate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1560,7 +1546,7 @@ def begin_migrate( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param migrate_input: Migrate input. Is either a model type or a IO type. Required. + :param migrate_input: Migrate input. Is either a MigrateInput type or a IO type. Required. :type migrate_input: ~azure.mgmt.recoveryservicessiterecovery.models.MigrateInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1582,9 +1568,7 @@ def begin_migrate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1649,16 +1633,14 @@ def _pause_replication_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(pause_replication_input, (IO, bytes)): + if isinstance(pause_replication_input, (IOBase, bytes)): _content = pause_replication_input else: _json = self._serialize.body(pause_replication_input, "PauseReplicationInput") @@ -1681,8 +1663,9 @@ def _pause_replication_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1806,8 +1789,8 @@ def begin_pause_replication( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param pause_replication_input: Pause replication input. Is either a model type or a IO type. - Required. + :param pause_replication_input: Pause replication input. Is either a PauseReplicationInput type + or a IO type. Required. :type pause_replication_input: ~azure.mgmt.recoveryservicessiterecovery.models.PauseReplicationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1830,9 +1813,7 @@ def begin_pause_replication( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1897,16 +1878,14 @@ def _resume_replication_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(resume_replication_input, (IO, bytes)): + if isinstance(resume_replication_input, (IOBase, bytes)): _content = resume_replication_input else: _json = self._serialize.body(resume_replication_input, "ResumeReplicationInput") @@ -1929,8 +1908,9 @@ def _resume_replication_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2054,8 +2034,8 @@ def begin_resume_replication( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param resume_replication_input: Resume replication input. Is either a model type or a IO type. - Required. + :param resume_replication_input: Resume replication input. Is either a ResumeReplicationInput + type or a IO type. Required. :type resume_replication_input: ~azure.mgmt.recoveryservicessiterecovery.models.ResumeReplicationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2078,9 +2058,7 @@ def begin_resume_replication( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2145,16 +2123,14 @@ def _resync_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "ResyncInput") @@ -2177,8 +2153,9 @@ def _resync_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2301,7 +2278,7 @@ def begin_resync( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param input: Resync input. Is either a model type or a IO type. Required. + :param input: Resync input. Is either a ResyncInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.ResyncInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2323,9 +2300,7 @@ def begin_resync( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2390,16 +2365,14 @@ def _test_migrate_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(test_migrate_input, (IO, bytes)): + if isinstance(test_migrate_input, (IOBase, bytes)): _content = test_migrate_input else: _json = self._serialize.body(test_migrate_input, "TestMigrateInput") @@ -2422,8 +2395,9 @@ def _test_migrate_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2546,7 +2520,8 @@ def begin_test_migrate( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param test_migrate_input: Test migrate input. Is either a model type or a IO type. Required. + :param test_migrate_input: Test migrate input. Is either a TestMigrateInput type or a IO type. + Required. :type test_migrate_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestMigrateInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2569,9 +2544,7 @@ def begin_test_migrate( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2636,16 +2609,14 @@ def _test_migrate_cleanup_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.MigrationItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(test_migrate_cleanup_input, (IO, bytes)): + if isinstance(test_migrate_cleanup_input, (IOBase, bytes)): _content = test_migrate_cleanup_input else: _json = self._serialize.body(test_migrate_cleanup_input, "TestMigrateCleanupInput") @@ -2668,8 +2639,9 @@ def _test_migrate_cleanup_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2793,8 +2765,8 @@ def begin_test_migrate_cleanup( :type protection_container_name: str :param migration_item_name: Migration item name. Required. :type migration_item_name: str - :param test_migrate_cleanup_input: Test migrate cleanup input. Is either a model type or a IO - type. Required. + :param test_migrate_cleanup_input: Test migrate cleanup input. Is either a + TestMigrateCleanupInput type or a IO type. Required. :type test_migrate_cleanup_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestMigrateCleanupInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2817,9 +2789,7 @@ def begin_test_migrate_cleanup( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MigrationItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2892,9 +2862,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.MigrationItemCollection] = kwargs.pop("cls", None) error_map = { @@ -2951,8 +2919,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_network_mappings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_network_mappings_operations.py index afcc0a0eb6eec..b5b2e33e85364 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_network_mappings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_network_mappings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +50,7 @@ def build_list_by_replication_networks_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +89,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,7 +129,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -175,7 +171,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -210,7 +206,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -247,7 +243,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -312,9 +308,7 @@ def list_by_replication_networks( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -370,8 +364,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -417,9 +412,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkMapping] = kwargs.pop("cls", None) request = build_get_request( @@ -437,8 +430,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -477,16 +471,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.NetworkMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreateNetworkMappingInput") @@ -509,8 +501,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -633,7 +626,8 @@ def begin_create( :type network_name: str :param network_mapping_name: Network mapping name. Required. :type network_mapping_name: str - :param input: Create network mapping input. Is either a model type or a IO type. Required. + :param input: Create network mapping input. Is either a CreateNetworkMappingInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateNetworkMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -655,9 +649,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkMapping] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -717,9 +709,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -737,8 +727,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -783,9 +774,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -845,16 +834,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.NetworkMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdateNetworkMappingInput") @@ -877,8 +864,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1001,7 +989,8 @@ def begin_update( :type network_name: str :param network_mapping_name: Network mapping name. Required. :type network_mapping_name: str - :param input: Update network mapping input. Is either a model type or a IO type. Required. + :param input: Update network mapping input. Is either a UpdateNetworkMappingInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateNetworkMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1023,9 +1012,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.NetworkMapping] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1086,9 +1073,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.NetworkMapping"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -1142,8 +1127,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_networks_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_networks_operations.py index 814b13f390cb7..497010022482e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_networks_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_networks_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_by_replication_fabrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -84,7 +79,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -117,7 +112,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -177,9 +172,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> Iterab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkCollection] = kwargs.pop("cls", None) error_map = { @@ -234,8 +227,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -277,9 +271,7 @@ def get(self, fabric_name: str, network_name: str, **kwargs: Any) -> _models.Net _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Network] = kwargs.pop("cls", None) request = build_get_request( @@ -296,8 +288,9 @@ def get(self, fabric_name: str, network_name: str, **kwargs: Any) -> _models.Net request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -331,9 +324,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Network"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.NetworkCollection] = kwargs.pop("cls", None) error_map = { @@ -387,8 +378,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_policies_operations.py index 000b5a60bb942..63351c7165618 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_policies_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +76,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +108,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +142,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -173,7 +169,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -235,9 +231,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Policy"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.PolicyCollection] = kwargs.pop("cls", None) error_map = { @@ -291,8 +285,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -332,9 +327,7 @@ def get(self, policy_name: str, **kwargs: Any) -> _models.Policy: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.Policy] = kwargs.pop("cls", None) request = build_get_request( @@ -350,8 +343,9 @@ def get(self, policy_name: str, **kwargs: Any) -> _models.Policy: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -385,16 +379,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Policy]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreatePolicyInput") @@ -415,8 +407,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -509,7 +502,7 @@ def begin_create( :param policy_name: Replication policy name. Required. :type policy_name: str - :param input: Create policy input. Is either a model type or a IO type. Required. + :param input: Create policy input. Is either a CreatePolicyInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreatePolicyInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -529,9 +522,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Policy] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -589,9 +580,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -607,8 +596,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -647,9 +637,7 @@ def begin_delete(self, policy_name: str, **kwargs: Any) -> LROPoller[None]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -702,16 +690,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Policy]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdatePolicyInput") @@ -732,8 +718,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -826,7 +813,7 @@ def begin_update( :param policy_name: Policy Id. Required. :type policy_name: str - :param input: Update Policy Input. Is either a model type or a IO type. Required. + :param input: Update Policy Input. Is either a UpdatePolicyInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdatePolicyInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -846,9 +833,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Policy] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protectable_items_operations.py index 6a29d5eec07f5..65fc748af56ea 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protectable_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protectable_items_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -56,7 +51,7 @@ def build_list_by_replication_protection_containers_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,7 +96,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -181,9 +176,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectableItemCollection] = kwargs.pop("cls", None) error_map = { @@ -242,8 +235,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -289,9 +283,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectableItem] = kwargs.pop("cls", None) request = build_get_request( @@ -309,8 +301,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protected_items_operations.py index fdf0c874e8b83..b9f5e36fd90ff 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protected_items_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +50,7 @@ def build_list_by_replication_protection_containers_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +89,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,7 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -179,7 +175,7 @@ def build_purge_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -216,7 +212,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -261,7 +257,7 @@ def build_add_disks_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -306,7 +302,7 @@ def build_apply_recovery_point_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -351,7 +347,7 @@ def build_failover_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -393,7 +389,7 @@ def build_failover_commit_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -435,7 +431,7 @@ def build_planned_failover_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -480,7 +476,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -522,7 +518,7 @@ def build_remove_disks_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -567,7 +563,7 @@ def build_repair_replication_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -609,7 +605,7 @@ def build_reprotect_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -654,7 +650,7 @@ def build_resolve_health_errors_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -699,7 +695,7 @@ def build_switch_provider_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -744,7 +740,7 @@ def build_test_failover_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -789,7 +785,7 @@ def build_test_failover_cleanup_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -834,7 +830,7 @@ def build_unplanned_failover_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -879,7 +875,7 @@ def build_update_appliance_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -924,7 +920,7 @@ def build_update_mobility_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -969,7 +965,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1039,9 +1035,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItemCollection] = kwargs.pop("cls", None) error_map = { @@ -1097,8 +1091,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1144,9 +1139,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) request = build_get_request( @@ -1164,8 +1157,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1204,16 +1198,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "EnableProtectionInput") @@ -1236,8 +1228,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1360,7 +1353,8 @@ def begin_create( :type protection_container_name: str :param replicated_protected_item_name: A name for the replication protected item. Required. :type replicated_protected_item_name: str - :param input: Enable Protection Input. Is either a model type or a IO type. Required. + :param input: Enable Protection Input. Is either a EnableProtectionInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.EnableProtectionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1382,9 +1376,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1444,9 +1436,7 @@ def _purge_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -1464,8 +1454,9 @@ def _purge_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1512,9 +1503,7 @@ def begin_purge( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1574,16 +1563,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_protection_input, (IO, bytes)): + if isinstance(update_protection_input, (IOBase, bytes)): _content = update_protection_input else: _json = self._serialize.body(update_protection_input, "UpdateReplicationProtectedItemInput") @@ -1606,8 +1593,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1731,8 +1719,8 @@ def begin_update( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param update_protection_input: Update protection input. Is either a model type or a IO type. - Required. + :param update_protection_input: Update protection input. Is either a + UpdateReplicationProtectedItemInput type or a IO type. Required. :type update_protection_input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateReplicationProtectedItemInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1755,9 +1743,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1822,16 +1808,14 @@ def _add_disks_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(add_disks_input, (IO, bytes)): + if isinstance(add_disks_input, (IOBase, bytes)): _content = add_disks_input else: _json = self._serialize.body(add_disks_input, "AddDisksInput") @@ -1854,8 +1838,9 @@ def _add_disks_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1978,7 +1963,7 @@ def begin_add_disks( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param add_disks_input: Add disks input. Is either a model type or a IO type. Required. + :param add_disks_input: Add disks input. Is either a AddDisksInput type or a IO type. Required. :type add_disks_input: ~azure.mgmt.recoveryservicessiterecovery.models.AddDisksInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -2000,9 +1985,7 @@ def begin_add_disks( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2067,16 +2050,14 @@ def _apply_recovery_point_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(apply_recovery_point_input, (IO, bytes)): + if isinstance(apply_recovery_point_input, (IOBase, bytes)): _content = apply_recovery_point_input else: _json = self._serialize.body(apply_recovery_point_input, "ApplyRecoveryPointInput") @@ -2099,8 +2080,9 @@ def _apply_recovery_point_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2224,8 +2206,8 @@ def begin_apply_recovery_point( :type protection_container_name: str :param replicated_protected_item_name: The replicated protected item name. Required. :type replicated_protected_item_name: str - :param apply_recovery_point_input: The ApplyRecoveryPointInput. Is either a model type or a IO - type. Required. + :param apply_recovery_point_input: The ApplyRecoveryPointInput. Is either a + ApplyRecoveryPointInput type or a IO type. Required. :type apply_recovery_point_input: ~azure.mgmt.recoveryservicessiterecovery.models.ApplyRecoveryPointInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2248,9 +2230,7 @@ def begin_apply_recovery_point( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2310,9 +2290,7 @@ def _failover_cancel_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) request = build_failover_cancel_request( @@ -2330,8 +2308,9 @@ def _failover_cancel_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2384,9 +2363,7 @@ def begin_failover_cancel( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2443,9 +2420,7 @@ def _failover_commit_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) request = build_failover_commit_request( @@ -2463,8 +2438,9 @@ def _failover_commit_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2517,9 +2493,7 @@ def begin_failover_commit( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -2581,16 +2555,14 @@ def _planned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(failover_input, (IO, bytes)): + if isinstance(failover_input, (IOBase, bytes)): _content = failover_input else: _json = self._serialize.body(failover_input, "PlannedFailoverInput") @@ -2613,8 +2585,9 @@ def _planned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2737,7 +2710,8 @@ def begin_planned_failover( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param failover_input: Planned failover input. Is either a model type or a IO type. Required. + :param failover_input: Planned failover input. Is either a PlannedFailoverInput type or a IO + type. Required. :type failover_input: ~azure.mgmt.recoveryservicessiterecovery.models.PlannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2760,9 +2734,7 @@ def begin_planned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2827,16 +2799,14 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(disable_protection_input, (IO, bytes)): + if isinstance(disable_protection_input, (IOBase, bytes)): _content = disable_protection_input else: _json = self._serialize.body(disable_protection_input, "DisableProtectionInput") @@ -2859,8 +2829,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2977,8 +2948,8 @@ def begin_delete( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param disable_protection_input: Disable protection input. Is either a model type or a IO type. - Required. + :param disable_protection_input: Disable protection input. Is either a DisableProtectionInput + type or a IO type. Required. :type disable_protection_input: ~azure.mgmt.recoveryservicessiterecovery.models.DisableProtectionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2999,9 +2970,7 @@ def begin_delete( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3064,16 +3033,14 @@ def _remove_disks_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(remove_disks_input, (IO, bytes)): + if isinstance(remove_disks_input, (IOBase, bytes)): _content = remove_disks_input else: _json = self._serialize.body(remove_disks_input, "RemoveDisksInput") @@ -3096,8 +3063,9 @@ def _remove_disks_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3220,7 +3188,8 @@ def begin_remove_disks( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param remove_disks_input: Remove disks input. Is either a model type or a IO type. Required. + :param remove_disks_input: Remove disks input. Is either a RemoveDisksInput type or a IO type. + Required. :type remove_disks_input: ~azure.mgmt.recoveryservicessiterecovery.models.RemoveDisksInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3243,9 +3212,7 @@ def begin_remove_disks( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3305,9 +3272,7 @@ def _repair_replication_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) request = build_repair_replication_request( @@ -3325,8 +3290,9 @@ def _repair_replication_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3380,9 +3346,7 @@ def begin_repair_replication( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -3444,16 +3408,14 @@ def _reprotect_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(reprotect_input, (IO, bytes)): + if isinstance(reprotect_input, (IOBase, bytes)): _content = reprotect_input else: _json = self._serialize.body(reprotect_input, "ReverseReplicationInput") @@ -3476,8 +3438,9 @@ def _reprotect_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3600,8 +3563,8 @@ def begin_reprotect( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param reprotect_input: Reverse replication input. Is either a model type or a IO type. - Required. + :param reprotect_input: Reverse replication input. Is either a ReverseReplicationInput type or + a IO type. Required. :type reprotect_input: ~azure.mgmt.recoveryservicessiterecovery.models.ReverseReplicationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3624,9 +3587,7 @@ def begin_reprotect( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3691,16 +3652,14 @@ def _resolve_health_errors_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(resolve_health_input, (IO, bytes)): + if isinstance(resolve_health_input, (IOBase, bytes)): _content = resolve_health_input else: _json = self._serialize.body(resolve_health_input, "ResolveHealthInput") @@ -3723,8 +3682,9 @@ def _resolve_health_errors_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -3847,8 +3807,8 @@ def begin_resolve_health_errors( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param resolve_health_input: Health issue input object. Is either a model type or a IO type. - Required. + :param resolve_health_input: Health issue input object. Is either a ResolveHealthInput type or + a IO type. Required. :type resolve_health_input: ~azure.mgmt.recoveryservicessiterecovery.models.ResolveHealthInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -3871,9 +3831,7 @@ def begin_resolve_health_errors( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -3938,16 +3896,14 @@ def _switch_provider_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(switch_provider_input, (IO, bytes)): + if isinstance(switch_provider_input, (IOBase, bytes)): _content = switch_provider_input else: _json = self._serialize.body(switch_provider_input, "SwitchProviderInput") @@ -3970,8 +3926,9 @@ def _switch_provider_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -4095,8 +4052,8 @@ def begin_switch_provider( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param switch_provider_input: Switch provider input. Is either a model type or a IO type. - Required. + :param switch_provider_input: Switch provider input. Is either a SwitchProviderInput type or a + IO type. Required. :type switch_provider_input: ~azure.mgmt.recoveryservicessiterecovery.models.SwitchProviderInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -4119,9 +4076,7 @@ def begin_switch_provider( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4188,16 +4143,14 @@ def _test_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(testfailover_input, (IO, bytes)): + if isinstance(testfailover_input, (IOBase, bytes)): _content = testfailover_input else: _json = self._serialize.body(testfailover_input, "TestFailoverInput") @@ -4220,8 +4173,9 @@ def _test_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -4344,7 +4298,8 @@ def begin_test_failover( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param testfailover_input: Test failover input. Is either a model type or a IO type. Required. + :param testfailover_input: Test failover input. Is either a TestFailoverInput type or a IO + type. Required. :type testfailover_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -4367,9 +4322,7 @@ def begin_test_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4434,16 +4387,14 @@ def _test_failover_cleanup_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(cleanup_input, (IO, bytes)): + if isinstance(cleanup_input, (IOBase, bytes)): _content = cleanup_input else: _json = self._serialize.body(cleanup_input, "TestFailoverCleanupInput") @@ -4466,8 +4417,9 @@ def _test_failover_cleanup_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -4590,8 +4542,8 @@ def begin_test_failover_cleanup( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param cleanup_input: Test failover cleanup input. Is either a model type or a IO type. - Required. + :param cleanup_input: Test failover cleanup input. Is either a TestFailoverCleanupInput type or + a IO type. Required. :type cleanup_input: ~azure.mgmt.recoveryservicessiterecovery.models.TestFailoverCleanupInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -4614,9 +4566,7 @@ def begin_test_failover_cleanup( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4681,16 +4631,14 @@ def _unplanned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(failover_input, (IO, bytes)): + if isinstance(failover_input, (IOBase, bytes)): _content = failover_input else: _json = self._serialize.body(failover_input, "UnplannedFailoverInput") @@ -4713,8 +4661,9 @@ def _unplanned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -4837,7 +4786,8 @@ def begin_unplanned_failover( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param failover_input: Failover input. Is either a model type or a IO type. Required. + :param failover_input: Failover input. Is either a UnplannedFailoverInput type or a IO type. + Required. :type failover_input: ~azure.mgmt.recoveryservicessiterecovery.models.UnplannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -4860,9 +4810,7 @@ def begin_unplanned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -4927,16 +4875,14 @@ def _update_appliance_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(appliance_update_input, (IO, bytes)): + if isinstance(appliance_update_input, (IOBase, bytes)): _content = appliance_update_input else: _json = self._serialize.body(appliance_update_input, "UpdateApplianceForReplicationProtectedItemInput") @@ -4959,8 +4905,9 @@ def _update_appliance_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -5084,8 +5031,8 @@ def begin_update_appliance( :type protection_container_name: str :param replicated_protected_item_name: Replication protected item name. Required. :type replicated_protected_item_name: str - :param appliance_update_input: Appliance update protection input. Is either a model type or a - IO type. Required. + :param appliance_update_input: Appliance update protection input. Is either a + UpdateApplianceForReplicationProtectedItemInput type or a IO type. Required. :type appliance_update_input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateApplianceForReplicationProtectedItemInput or IO @@ -5109,9 +5056,7 @@ def begin_update_appliance( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5176,16 +5121,14 @@ def _update_mobility_service_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ReplicationProtectedItem]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_mobility_service_request, (IO, bytes)): + if isinstance(update_mobility_service_request, (IOBase, bytes)): _content = update_mobility_service_request else: _json = self._serialize.body(update_mobility_service_request, "UpdateMobilityServiceRequest") @@ -5208,8 +5151,9 @@ def _update_mobility_service_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -5349,7 +5293,7 @@ def begin_update_mobility_service( be updated. Required. :type replicated_protected_item_name: str :param update_mobility_service_request: Request to update the mobility service on the protected - item. Is either a model type or a IO type. Required. + item. Is either a UpdateMobilityServiceRequest type or a IO type. Required. :type update_mobility_service_request: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateMobilityServiceRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -5372,9 +5316,7 @@ def begin_update_mobility_service( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectedItem] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -5445,9 +5387,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectedItemCollection] = kwargs.pop("cls", None) error_map = { @@ -5503,8 +5443,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_container_mappings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_container_mappings_operations.py index fa62c20ac6ba8..fe93a8724422e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_container_mappings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_container_mappings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +50,7 @@ def build_list_by_replication_protection_containers_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +89,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,7 +129,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -175,7 +171,7 @@ def build_purge_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -210,7 +206,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -253,7 +249,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) # Construct URL _url = kwargs.pop( @@ -287,7 +283,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -353,9 +349,7 @@ def list_by_replication_protection_containers( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -411,8 +405,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -458,9 +453,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerMapping] = kwargs.pop("cls", None) request = build_get_request( @@ -478,8 +471,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -518,16 +512,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainerMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(creation_input, (IO, bytes)): + if isinstance(creation_input, (IOBase, bytes)): _content = creation_input else: _json = self._serialize.body(creation_input, "CreateProtectionContainerMappingInput") @@ -550,8 +542,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -675,7 +668,8 @@ def begin_create( :type protection_container_name: str :param mapping_name: Protection container mapping name. Required. :type mapping_name: str - :param creation_input: Mapping creation input. Is either a model type or a IO type. Required. + :param creation_input: Mapping creation input. Is either a + CreateProtectionContainerMappingInput type or a IO type. Required. :type creation_input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateProtectionContainerMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -698,9 +692,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainerMapping] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -760,9 +752,7 @@ def _purge_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -780,8 +770,9 @@ def _purge_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -826,9 +817,7 @@ def begin_purge( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -888,16 +877,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainerMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_input, (IO, bytes)): + if isinstance(update_input, (IOBase, bytes)): _content = update_input else: _json = self._serialize.body(update_input, "UpdateProtectionContainerMappingInput") @@ -920,8 +907,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1045,7 +1033,8 @@ def begin_update( :type protection_container_name: str :param mapping_name: Protection container mapping name. Required. :type mapping_name: str - :param update_input: Mapping update input. Is either a model type or a IO type. Required. + :param update_input: Mapping update input. Is either a UpdateProtectionContainerMappingInput + type or a IO type. Required. :type update_input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateProtectionContainerMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1068,9 +1057,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainerMapping] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1135,16 +1122,14 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(removal_input, (IO, bytes)): + if isinstance(removal_input, (IOBase, bytes)): _content = removal_input else: _json = self._serialize.body(removal_input, "RemoveProtectionContainerMappingInput") @@ -1167,8 +1152,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1282,7 +1268,8 @@ def begin_delete( :type protection_container_name: str :param mapping_name: Protection container mapping name. Required. :type mapping_name: str - :param removal_input: Removal input. Is either a model type or a IO type. Required. + :param removal_input: Removal input. Is either a RemoveProtectionContainerMappingInput type or + a IO type. Required. :type removal_input: ~azure.mgmt.recoveryservicessiterecovery.models.RemoveProtectionContainerMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1303,9 +1290,7 @@ def begin_delete( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1365,9 +1350,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ProtectionContainerMapping"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -1421,8 +1404,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_containers_operations.py index 4a17909a3eefa..eba58f078f23c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_containers_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_by_replication_fabrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,7 +82,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -124,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -165,7 +161,7 @@ def build_discover_protectable_item_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -205,7 +201,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -238,7 +234,7 @@ def build_switch_protection_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -274,7 +270,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -335,9 +331,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> Iterab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerCollection] = kwargs.pop("cls", None) error_map = { @@ -392,8 +386,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -435,9 +430,7 @@ def get(self, fabric_name: str, protection_container_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) request = build_get_request( @@ -454,8 +447,9 @@ def get(self, fabric_name: str, protection_container_name: str, **kwargs: Any) - request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -493,16 +487,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainer]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(creation_input, (IO, bytes)): + if isinstance(creation_input, (IOBase, bytes)): _content = creation_input else: _json = self._serialize.body(creation_input, "CreateProtectionContainerInput") @@ -524,8 +516,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -640,7 +633,8 @@ def begin_create( :type fabric_name: str :param protection_container_name: Unique protection container ARM name. Required. :type protection_container_name: str - :param creation_input: Creation input. Is either a model type or a IO type. Required. + :param creation_input: Creation input. Is either a CreateProtectionContainerInput type or a IO + type. Required. :type creation_input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateProtectionContainerInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -663,9 +657,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -728,16 +720,14 @@ def _discover_protectable_item_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainer]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(discover_protectable_item_request, (IO, bytes)): + if isinstance(discover_protectable_item_request, (IOBase, bytes)): _content = discover_protectable_item_request else: _json = self._serialize.body(discover_protectable_item_request, "DiscoverProtectableItemRequest") @@ -759,8 +749,9 @@ def _discover_protectable_item_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -878,7 +869,7 @@ def begin_discover_protectable_item( :param protection_container_name: The name of the protection container. Required. :type protection_container_name: str :param discover_protectable_item_request: The request object to add a protectable item. Is - either a model type or a IO type. Required. + either a DiscoverProtectableItemRequest type or a IO type. Required. :type discover_protectable_item_request: ~azure.mgmt.recoveryservicessiterecovery.models.DiscoverProtectableItemRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -901,9 +892,7 @@ def begin_discover_protectable_item( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -962,9 +951,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -981,8 +968,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1023,9 +1011,7 @@ def begin_delete(self, fabric_name: str, protection_container_name: str, **kwarg _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1083,16 +1069,14 @@ def _switch_protection_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ProtectionContainer]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(switch_input, (IO, bytes)): + if isinstance(switch_input, (IOBase, bytes)): _content = switch_input else: _json = self._serialize.body(switch_input, "SwitchProtectionInput") @@ -1114,8 +1098,9 @@ def _switch_protection_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1232,7 +1217,8 @@ def begin_switch_protection( :type fabric_name: str :param protection_container_name: Protection container name. Required. :type protection_container_name: str - :param switch_input: Switch protection input. Is either a model type or a IO type. Required. + :param switch_input: Switch protection input. Is either a SwitchProtectionInput type or a IO + type. Required. :type switch_input: ~azure.mgmt.recoveryservicessiterecovery.models.SwitchProtectionInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1254,9 +1240,7 @@ def begin_switch_protection( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ProtectionContainer] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1316,9 +1300,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.ProtectionContainer"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ProtectionContainerCollection] = kwargs.pop("cls", None) error_map = { @@ -1372,8 +1354,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_intents_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_intents_operations.py index f27622b0df7b7..73117f6b6927f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_intents_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_protection_intents_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +30,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +49,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -88,7 +84,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,7 +116,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -190,9 +186,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectionIntentCollection] = kwargs.pop("cls", None) error_map = { @@ -248,8 +242,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -289,9 +284,7 @@ def get(self, intent_object_name: str, **kwargs: Any) -> _models.ReplicationProt _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.ReplicationProtectionIntent] = kwargs.pop("cls", None) request = build_get_request( @@ -307,8 +300,9 @@ def get(self, intent_object_name: str, **kwargs: Any) -> _models.ReplicationProt request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -385,7 +379,8 @@ def create( :param intent_object_name: A name for the replication protection item. Required. :type intent_object_name: str - :param input: Create Protection Intent Input. Is either a model type or a IO type. Required. + :param input: Create Protection Intent Input. Is either a CreateProtectionIntentInput type or a + IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateProtectionIntentInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -406,16 +401,14 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ReplicationProtectionIntent] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreateProtectionIntentInput") @@ -436,8 +429,9 @@ def create( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_plans_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_plans_operations.py index 3a5428908e6e1..2b1f6b616f9dc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_plans_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_plans_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +76,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +108,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +142,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -173,7 +169,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +204,7 @@ def build_failover_cancel_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,7 +236,7 @@ def build_failover_commit_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -272,7 +268,7 @@ def build_planned_failover_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -307,7 +303,7 @@ def build_reprotect_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -339,7 +335,7 @@ def build_test_failover_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -374,7 +370,7 @@ def build_test_failover_cleanup_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -409,7 +405,7 @@ def build_unplanned_failover_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -472,9 +468,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.RecoveryPlan"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlanCollection] = kwargs.pop("cls", None) error_map = { @@ -528,8 +522,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -569,9 +564,7 @@ def get(self, recovery_plan_name: str, **kwargs: Any) -> _models.RecoveryPlan: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) request = build_get_request( @@ -587,8 +580,9 @@ def get(self, recovery_plan_name: str, **kwargs: Any) -> _models.RecoveryPlan: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -622,16 +616,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "CreateRecoveryPlanInput") @@ -652,8 +644,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -750,7 +743,8 @@ def begin_create( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery Plan creation input. Is either a model type or a IO type. Required. + :param input: Recovery Plan creation input. Is either a CreateRecoveryPlanInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.CreateRecoveryPlanInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -772,9 +766,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -832,9 +824,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -850,8 +840,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -890,9 +881,7 @@ def begin_delete(self, recovery_plan_name: str, **kwargs: Any) -> LROPoller[None _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -945,16 +934,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "UpdateRecoveryPlanInput") @@ -975,8 +962,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1073,7 +1061,8 @@ def begin_update( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Update recovery plan input. Is either a model type or a IO type. Required. + :param input: Update recovery plan input. Is either a UpdateRecoveryPlanInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateRecoveryPlanInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -1095,9 +1084,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1153,9 +1140,7 @@ def _failover_cancel_initial(self, recovery_plan_name: str, **kwargs: Any) -> Op _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) request = build_failover_cancel_request( @@ -1171,8 +1156,9 @@ def _failover_cancel_initial(self, recovery_plan_name: str, **kwargs: Any) -> Op request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1219,9 +1205,7 @@ def begin_failover_cancel(self, recovery_plan_name: str, **kwargs: Any) -> LROPo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1274,9 +1258,7 @@ def _failover_commit_initial(self, recovery_plan_name: str, **kwargs: Any) -> Op _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) request = build_failover_commit_request( @@ -1292,8 +1274,9 @@ def _failover_commit_initial(self, recovery_plan_name: str, **kwargs: Any) -> Op request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1340,9 +1323,7 @@ def begin_failover_commit(self, recovery_plan_name: str, **kwargs: Any) -> LROPo _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1397,16 +1378,14 @@ def _planned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanPlannedFailoverInput") @@ -1427,8 +1406,9 @@ def _planned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1525,7 +1505,8 @@ def begin_planned_failover( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Failover input. Is either a model type or a IO type. Required. + :param input: Failover input. Is either a RecoveryPlanPlannedFailoverInput type or a IO type. + Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanPlannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1548,9 +1529,7 @@ def begin_planned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1606,9 +1585,7 @@ def _reprotect_initial(self, recovery_plan_name: str, **kwargs: Any) -> Optional _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) request = build_reprotect_request( @@ -1624,8 +1601,9 @@ def _reprotect_initial(self, recovery_plan_name: str, **kwargs: Any) -> Optional request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1672,9 +1650,7 @@ def begin_reprotect(self, recovery_plan_name: str, **kwargs: Any) -> LROPoller[_ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1729,16 +1705,14 @@ def _test_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanTestFailoverInput") @@ -1759,8 +1733,9 @@ def _test_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1857,7 +1832,8 @@ def begin_test_failover( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery plan test failover input. Is either a model type or a IO type. Required. + :param input: Recovery plan test failover input. Is either a RecoveryPlanTestFailoverInput type + or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -1880,9 +1856,7 @@ def begin_test_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1940,16 +1914,14 @@ def _test_failover_cleanup_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanTestFailoverCleanupInput") @@ -1970,8 +1942,9 @@ def _test_failover_cleanup_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2069,8 +2042,8 @@ def begin_test_failover_cleanup( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery plan test failover cleanup input. Is either a model type or a IO type. - Required. + :param input: Recovery plan test failover cleanup input. Is either a + RecoveryPlanTestFailoverCleanupInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanTestFailoverCleanupInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2093,9 +2066,7 @@ def begin_test_failover_cleanup( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -2153,16 +2124,14 @@ def _unplanned_failover_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryPlan]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "RecoveryPlanUnplannedFailoverInput") @@ -2183,8 +2152,9 @@ def _unplanned_failover_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -2281,8 +2251,8 @@ def begin_unplanned_failover( :param recovery_plan_name: Recovery plan name. Required. :type recovery_plan_name: str - :param input: Recovery plan unplanned failover input. Is either a model type or a IO type. - Required. + :param input: Recovery plan unplanned failover input. Is either a + RecoveryPlanUnplannedFailoverInput type or a IO type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.RecoveryPlanUnplannedFailoverInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -2305,9 +2275,7 @@ def begin_unplanned_failover( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryPlan] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_services_providers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_services_providers_operations.py index e139f29fed94f..603c2f96f1cdd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_services_providers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_recovery_services_providers_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_by_replication_fabrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,7 +82,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -124,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -164,7 +160,7 @@ def build_purge_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -197,7 +193,7 @@ def build_refresh_provider_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -234,7 +230,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -262,7 +258,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -326,9 +322,7 @@ def list_by_replication_fabrics( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProviderCollection] = kwargs.pop("cls", None) error_map = { @@ -383,8 +377,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -426,9 +421,7 @@ def get(self, fabric_name: str, provider_name: str, **kwargs: Any) -> _models.Re _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProvider] = kwargs.pop("cls", None) request = build_get_request( @@ -445,8 +438,9 @@ def get(self, fabric_name: str, provider_name: str, **kwargs: Any) -> _models.Re request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -484,16 +478,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.RecoveryServicesProvider]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(add_provider_input, (IO, bytes)): + if isinstance(add_provider_input, (IOBase, bytes)): _content = add_provider_input else: _json = self._serialize.body(add_provider_input, "AddRecoveryServicesProviderInput") @@ -515,8 +507,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -631,7 +624,8 @@ def begin_create( :type fabric_name: str :param provider_name: Recovery services provider name. Required. :type provider_name: str - :param add_provider_input: Add provider input. Is either a model type or a IO type. Required. + :param add_provider_input: Add provider input. Is either a AddRecoveryServicesProviderInput + type or a IO type. Required. :type add_provider_input: ~azure.mgmt.recoveryservicessiterecovery.models.AddRecoveryServicesProviderInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -654,9 +648,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.RecoveryServicesProvider] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -715,9 +707,7 @@ def _purge_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_purge_request( @@ -734,8 +724,9 @@ def _purge_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -776,9 +767,7 @@ def begin_purge(self, fabric_name: str, provider_name: str, **kwargs: Any) -> LR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -832,9 +821,7 @@ def _refresh_provider_initial( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.RecoveryServicesProvider]] = kwargs.pop("cls", None) request = build_refresh_provider_request( @@ -851,8 +838,9 @@ def _refresh_provider_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -903,9 +891,7 @@ def begin_refresh_provider( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProvider] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -961,9 +947,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -980,8 +964,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -1025,9 +1010,7 @@ def begin_delete(self, fabric_name: str, provider_name: str, **kwargs: Any) -> L _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1083,9 +1066,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.RecoveryServicesProvider"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.RecoveryServicesProviderCollection] = kwargs.pop("cls", None) error_map = { @@ -1139,8 +1120,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classification_mappings_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classification_mappings_operations.py index 92d473195570d..dc9e110a85e8f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classification_mappings_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classification_mappings_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +50,7 @@ def build_list_by_replication_storage_classifications_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +89,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,7 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -179,7 +175,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -210,7 +206,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -276,9 +272,7 @@ def list_by_replication_storage_classifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -334,8 +328,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -385,9 +380,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationMapping] = kwargs.pop("cls", None) request = build_get_request( @@ -405,8 +398,9 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -445,16 +439,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.StorageClassificationMapping]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(pairing_input, (IO, bytes)): + if isinstance(pairing_input, (IOBase, bytes)): _content = pairing_input else: _json = self._serialize.body(pairing_input, "StorageClassificationMappingInput") @@ -477,8 +469,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -602,7 +595,8 @@ def begin_create( :type storage_classification_name: str :param storage_classification_mapping_name: Storage classification mapping name. Required. :type storage_classification_mapping_name: str - :param pairing_input: Pairing input. Is either a model type or a IO type. Required. + :param pairing_input: Pairing input. Is either a StorageClassificationMappingInput type or a IO + type. Required. :type pairing_input: ~azure.mgmt.recoveryservicessiterecovery.models.StorageClassificationMappingInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -625,9 +619,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.StorageClassificationMapping] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -691,9 +683,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -711,8 +701,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -761,9 +752,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -820,9 +809,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.StorageClassificationMapping" _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationMappingCollection] = kwargs.pop("cls", None) error_map = { @@ -876,8 +863,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classifications_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classifications_operations.py index ea0cbe5dc0d14..23cf163af2960 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classifications_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_storage_classifications_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_by_replication_fabrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -84,7 +79,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -117,7 +112,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -179,9 +174,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> Iterab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationCollection] = kwargs.pop("cls", None) error_map = { @@ -236,8 +229,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -279,9 +273,7 @@ def get(self, fabric_name: str, storage_classification_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassification] = kwargs.pop("cls", None) request = build_get_request( @@ -298,8 +290,9 @@ def get(self, fabric_name: str, storage_classification_name: str, **kwargs: Any) request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -335,9 +328,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.StorageClassification"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.StorageClassificationCollection] = kwargs.pop("cls", None) error_map = { @@ -391,8 +382,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_health_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_health_operations.py index 27f96deccdc99..ce7346c9b771c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_health_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_health_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar, Union, cast from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_get_request(resource_name: str, resource_group_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_refresh_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +137,7 @@ def get(self, **kwargs: Any) -> _models.VaultHealthDetails: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultHealthDetails] = kwargs.pop("cls", None) request = build_get_request( @@ -159,8 +152,9 @@ def get(self, **kwargs: Any) -> _models.VaultHealthDetails: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -192,9 +186,7 @@ def _refresh_initial(self, **kwargs: Any) -> Optional[_models.VaultHealthDetails _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[Optional[_models.VaultHealthDetails]] = kwargs.pop("cls", None) request = build_refresh_request( @@ -209,8 +201,9 @@ def _refresh_initial(self, **kwargs: Any) -> Optional[_models.VaultHealthDetails request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -255,9 +248,7 @@ def begin_refresh(self, **kwargs: Any) -> LROPoller[_models.VaultHealthDetails]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultHealthDetails] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_setting_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_setting_operations.py index 6378b0fa6cb9f..ec8619e594443 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_setting_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replication_vault_setting_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +76,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +108,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -175,9 +171,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.VaultSetting"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultSettingCollection] = kwargs.pop("cls", None) error_map = { @@ -231,8 +225,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -272,9 +267,7 @@ def get(self, vault_setting_name: str, **kwargs: Any) -> _models.VaultSetting: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VaultSetting] = kwargs.pop("cls", None) request = build_get_request( @@ -290,8 +283,9 @@ def get(self, vault_setting_name: str, **kwargs: Any) -> _models.VaultSetting: request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -325,16 +319,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VaultSetting] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(input, (IO, bytes)): + if isinstance(input, (IOBase, bytes)): _content = input else: _json = self._serialize.body(input, "VaultSettingCreationInput") @@ -355,8 +347,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -454,7 +447,8 @@ def begin_create( :param vault_setting_name: Vault setting name. Required. :type vault_setting_name: str - :param input: Vault setting creation input. Is either a model type or a IO type. Required. + :param input: Vault setting creation input. Is either a VaultSettingCreationInput type or a IO + type. Required. :type input: ~azure.mgmt.recoveryservicessiterecovery.models.VaultSettingCreationInput or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -476,9 +470,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VaultSetting] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replicationv_centers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replicationv_centers_operations.py index bb36fbefe96f7..53f91a655ab01 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replicationv_centers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_replicationv_centers_operations.py @@ -6,7 +6,7 @@ # 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 io import IOBase from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +32,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +45,7 @@ def build_list_by_replication_fabrics_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,7 +82,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -124,7 +120,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -164,7 +160,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) # Construct URL _url = kwargs.pop( "template_url", @@ -197,7 +193,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -233,7 +229,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -293,9 +289,7 @@ def list_by_replication_fabrics(self, fabric_name: str, **kwargs: Any) -> Iterab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VCenterCollection] = kwargs.pop("cls", None) error_map = { @@ -350,8 +344,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -393,9 +388,7 @@ def get(self, fabric_name: str, vcenter_name: str, **kwargs: Any) -> _models.VCe _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VCenter] = kwargs.pop("cls", None) request = build_get_request( @@ -412,8 +405,9 @@ def get(self, fabric_name: str, vcenter_name: str, **kwargs: Any) -> _models.VCe request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -451,16 +445,14 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.VCenter]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(add_v_center_request, (IO, bytes)): + if isinstance(add_v_center_request, (IOBase, bytes)): _content = add_v_center_request else: _json = self._serialize.body(add_v_center_request, "AddVCenterRequest") @@ -482,8 +474,9 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -593,8 +586,8 @@ def begin_create( :type fabric_name: str :param vcenter_name: vcenter name. Required. :type vcenter_name: str - :param add_v_center_request: The input to the add vCenter operation. Is either a model type or - a IO type. Required. + :param add_v_center_request: The input to the add vCenter operation. Is either a + AddVCenterRequest type or a IO type. Required. :type add_v_center_request: ~azure.mgmt.recoveryservicessiterecovery.models.AddVCenterRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -615,9 +608,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VCenter] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -676,9 +667,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -695,8 +684,9 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -737,9 +727,7 @@ def begin_delete(self, fabric_name: str, vcenter_name: str, **kwargs: Any) -> LR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -797,16 +785,14 @@ def _update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.VCenter]] = kwargs.pop("cls", None) content_type = content_type or "application/json" _json = None _content = None - if isinstance(update_v_center_request, (IO, bytes)): + if isinstance(update_v_center_request, (IOBase, bytes)): _content = update_v_center_request else: _json = self._serialize.body(update_v_center_request, "UpdateVCenterRequest") @@ -828,8 +814,9 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -940,8 +927,8 @@ def begin_update( :type fabric_name: str :param vcenter_name: vcenter name. Required. :type vcenter_name: str - :param update_v_center_request: The input to the update vCenter operation. Is either a model - type or a IO type. Required. + :param update_v_center_request: The input to the update vCenter operation. Is either a + UpdateVCenterRequest type or a IO type. Required. :type update_v_center_request: ~azure.mgmt.recoveryservicessiterecovery.models.UpdateVCenterRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -962,9 +949,7 @@ def begin_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.VCenter] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1023,9 +1008,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.VCenter"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.VCenterCollection] = kwargs.pop("cls", None) error_map = { @@ -1079,8 +1062,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_supported_operating_systems_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_supported_operating_systems_operations.py index 6c4d63b9cf86e..86129691223e0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_supported_operating_systems_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_supported_operating_systems_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +45,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,9 +115,7 @@ def get(self, instance_type: Optional[str] = None, **kwargs: Any) -> _models.Sup _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.SupportedOperatingSystems] = kwargs.pop("cls", None) request = build_get_request( @@ -138,8 +131,9 @@ def get(self, instance_type: Optional[str] = None, **kwargs: Any) -> _models.Sup request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_target_compute_sizes_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_target_compute_sizes_operations.py index 8b0603d34826a..afed81a9be567 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_target_compute_sizes_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/operations/_target_compute_sizes_operations.py @@ -6,7 +6,6 @@ # 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, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ def build_list_by_replication_protected_items_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -125,9 +120,7 @@ def list_by_replication_protected_items( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop( - "api_version", _params.pop("api-version", self._config.api_version) - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) cls: ClsType[_models.TargetComputeSizeCollection] = kwargs.pop("cls", None) error_map = { @@ -184,8 +177,9 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) + _stream = False pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_get.py index 28971d688cc48..6ab92c8f5659e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/MigrationRecoveryPoints_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/MigrationRecoveryPoints_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_list_by_replication_migration_items.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_list_by_replication_migration_items.py index 953912e3da6bc..d261e22fb7a6a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_list_by_replication_migration_items.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/migration_recovery_points_list_by_replication_migration_items.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/MigrationRecoveryPoints_ListByReplicationMigrationItems.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/MigrationRecoveryPoints_ListByReplicationMigrationItems.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/operations_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/operations_list.py index 0c35791e03a4e..b8450aee1088a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/operations_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/operations_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/Operations_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_get.py index 8d21d4551d6a0..18a9a20e14ff7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_get.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/RecoveryPoints_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/RecoveryPoints_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_list_by_replication_protected_items.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_list_by_replication_protected_items.py index 4ce1f99c75915..80b1d36a7ef1c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_list_by_replication_protected_items.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/recovery_points_list_by_replication_protected_items.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/RecoveryPoints_ListByReplicationProtectedItems.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/RecoveryPoints_ListByReplicationProtectedItems.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_create.py index cee6b7ed2e93f..7b3552ac1f193 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_create.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationAlertSettings_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationAlertSettings_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_get.py index 49b1ea35c11b2..4d03c31a1eca0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationAlertSettings_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationAlertSettings_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_list.py index 4801888396917..4fd3b5fe296a2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_alert_settings_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationAlertSettings_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationAlertSettings_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_appliances_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_appliances_list.py index 5f54c2d5b911a..7073566b4e55f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_appliances_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_appliances_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationAppliances_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationAppliances_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_get.py index 4b8c81c0b6e06..fbfb48ee2008b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationEligibilityResults_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationEligibilityResults_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_list.py index 0aa9176251ee8..3913cee0787ce 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_eligibility_results_list.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationEligibilityResults_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationEligibilityResults_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_get.py index 031189c70ef73..50e996f47481e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationEvents_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationEvents_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_list.py index 402e07ae45fa7..19dcfc9c328bc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_events_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationEvents_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationEvents_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_check_consistency.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_check_consistency.py index 8a597805b4486..5c136cf874ded 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_check_consistency.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_check_consistency.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_CheckConsistency.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_CheckConsistency.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_create.py index 15ebbf60f1883..414eecce4d4cc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_delete.py index 4f5739fdad59a..b588a7e329a38 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_delete.py @@ -31,12 +31,11 @@ def main(): resource_name="vault1", ) - response = client.replication_fabrics.begin_delete( + client.replication_fabrics.begin_delete( fabric_name="cloud1", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_get.py index 029db8b3566b6..682a95abf81c5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_list.py index 886e84274f40f..196270fabd11b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_migrate_to_aad.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_migrate_to_aad.py index ef4147d8d62d8..c14e25d3c3112 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_migrate_to_aad.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_migrate_to_aad.py @@ -31,12 +31,11 @@ def main(): resource_name="vault1", ) - response = client.replication_fabrics.begin_migrate_to_aad( + client.replication_fabrics.begin_migrate_to_aad( fabric_name="cloud1", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_MigrateToAad.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_MigrateToAad.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_purge.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_purge.py index 3eaa7affae0cd..7395693c2c571 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_purge.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_purge.py @@ -31,12 +31,11 @@ def main(): resource_name="vault1", ) - response = client.replication_fabrics.begin_purge( + client.replication_fabrics.begin_purge( fabric_name="cloud1", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_Purge.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_Purge.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_reassociate_gateway.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_reassociate_gateway.py index a907051ff2e8d..cfc324be2f8e9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_reassociate_gateway.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_reassociate_gateway.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_ReassociateGateway.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_ReassociateGateway.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_renew_certificate.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_renew_certificate.py index 50b6e17ab0971..f9a26c740cb33 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_renew_certificate.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_fabrics_renew_certificate.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationFabrics_RenewCertificate.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationFabrics_RenewCertificate.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_cancel.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_cancel.py index 61f66f3ffd8a2..bfe35588586e0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_cancel.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_cancel.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationJobs_Cancel.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationJobs_Cancel.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_export.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_export.py index 53a95dcc6bb2c..59529d1112ad5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_export.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_export.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationJobs_Export.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationJobs_Export.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_get.py index e56cbcc948d96..49387658f6f1e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationJobs_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationJobs_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_list.py index 7eff5a94cbbac..988ce094c2177 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationJobs_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationJobs_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_restart.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_restart.py index 6bb49c598fd24..bd7eb89573348 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_restart.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_restart.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationJobs_Restart.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationJobs_Restart.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_resume.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_resume.py index e013310e1b744..b3478dd2c54c3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_resume.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_jobs_resume.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationJobs_Resume.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationJobs_Resume.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_get.py index 4ffaaf46bc722..750273f805aff 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationLogicalNetworks_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationLogicalNetworks_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_list_by_replication_fabrics.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_list_by_replication_fabrics.py index addc9f7918285..99c3d927ddb86 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_list_by_replication_fabrics.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_logical_networks_list_by_replication_fabrics.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationLogicalNetworks_ListByReplicationFabrics.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationLogicalNetworks_ListByReplicationFabrics.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_create.py index 843e15c6dfc46..84a8068ae9e8d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_create.py @@ -60,6 +60,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_delete.py index ab78a3de498ca..d2becf9434bee 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_delete.py @@ -31,14 +31,13 @@ def main(): resource_name="migrationvault", ) - response = client.replication_migration_items.begin_delete( + client.replication_migration_items.begin_delete( fabric_name="vmwarefabric1", protection_container_name="vmwareContainer1", migration_item_name="virtualmachine1", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_get.py index dd5b0267c3da0..48f2841d42634 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list.py index 0647a42acf8c5..c5e7f3be0f83c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list_by_replication_protection_containers.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list_by_replication_protection_containers.py index 5cf58440ec094..645f2097b4ac3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list_by_replication_protection_containers.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_list_by_replication_protection_containers.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_ListByReplicationProtectionContainers.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_ListByReplicationProtectionContainers.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_migrate.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_migrate.py index 7290bdd3fe11c..367b416dfb458 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_migrate.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_migrate.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_Migrate.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_Migrate.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_pause_replication.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_pause_replication.py index 19f48723af867..ed5d7f9c7aec1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_pause_replication.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_pause_replication.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_PauseReplication.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_PauseReplication.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resume_replication.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resume_replication.py index 797335de35ed8..14823b0ad5065 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resume_replication.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resume_replication.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_ResumeReplication.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_ResumeReplication.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resync.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resync.py index 09520e849e845..cfd920fce012d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resync.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_resync.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_Resync.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_Resync.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate.py index d122a81de185c..e1e2c58c65028 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_TestMigrate.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_TestMigrate.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate_cleanup.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate_cleanup.py index 37ce930626ca8..c4c9f3ac18651 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate_cleanup.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_test_migrate_cleanup.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_TestMigrateCleanup.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_TestMigrateCleanup.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_update.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_update.py index 59fa5c0bc1ada..a809fd26ac1f0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_update.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_migration_items_update.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationMigrationItems_Update.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationMigrationItems_Update.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_create.py index 22a0a5da8e7a8..0462f4ba88873 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_create.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworkMappings_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworkMappings_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_delete.py index 8e520661c3032..bf96625586b52 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_delete.py @@ -31,14 +31,13 @@ def main(): resource_name="srce2avaultbvtaC27", ) - response = client.replication_network_mappings.begin_delete( + client.replication_network_mappings.begin_delete( fabric_name="b0cef6e9a4437b81803d0b55ada4f700ab66caae59c35d62723a1589c0cd13ac", network_name="e2267b5c-2650-49bd-ab3f-d66aae694c06", network_mapping_name="corpe2amap", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworkMappings_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworkMappings_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_get.py index 6ebf75256aa0b..90071f57a3a3f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworkMappings_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworkMappings_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list.py index 62e3d4d241611..d090675c7363f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworkMappings_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworkMappings_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list_by_replication_networks.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list_by_replication_networks.py index aa50bd9b3cc12..c230c56805b19 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list_by_replication_networks.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_list_by_replication_networks.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworkMappings_ListByReplicationNetworks.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworkMappings_ListByReplicationNetworks.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_update.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_update.py index 265238f8dc3e9..3d1915026bb6f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_update.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_network_mappings_update.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworkMappings_Update.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworkMappings_Update.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_get.py index 2d72d7c65d516..ede0cd47b907c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworks_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworks_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list.py index 53f65ff7388aa..4415d2bcf7267 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworks_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworks_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list_by_replication_fabrics.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list_by_replication_fabrics.py index 55b3efa388cef..1e6a83553a13f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list_by_replication_fabrics.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_networks_list_by_replication_fabrics.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationNetworks_ListByReplicationFabrics.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationNetworks_ListByReplicationFabrics.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_create.py index ea543fc7ba0cf..84491e1a6f71e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationPolicies_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationPolicies_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_delete.py index b45883b40065b..6ed3f0e7e3db2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_delete.py @@ -31,12 +31,11 @@ def main(): resource_name="vault1", ) - response = client.replication_policies.begin_delete( + client.replication_policies.begin_delete( policy_name="protectionprofile1", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationPolicies_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationPolicies_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_get.py index abd350cb0b8ce..9ec9f57e93449 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationPolicies_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationPolicies_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_list.py index db19cab54dac5..48b3c87d196f7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationPolicies_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationPolicies_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_update.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_update.py index d501f04fb40a4..e6e4406c08dec 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_update.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_policies_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationPolicies_Update.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationPolicies_Update.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_get.py index ecc3751c18782..ee060ccc825f9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectableItems_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectableItems_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_list_by_replication_protection_containers.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_list_by_replication_protection_containers.py index 5b559364520de..811c5d4b77862 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_list_by_replication_protection_containers.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protectable_items_list_by_replication_protection_containers.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectableItems_ListByReplicationProtectionContainers.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectableItems_ListByReplicationProtectionContainers.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_add_disks.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_add_disks.py index 6b14c6cf43e42..e923894ced490 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_add_disks.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_add_disks.py @@ -53,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_AddDisks.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_AddDisks.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_apply_recovery_point.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_apply_recovery_point.py index dc6a52ce19381..6282be5eb809b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_apply_recovery_point.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_apply_recovery_point.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_ApplyRecoveryPoint.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_ApplyRecoveryPoint.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_create.py index 6449b75a35060..c1a688139af40 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_create.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_delete.py index 9d64bf11abcc0..3818ff3874115 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_delete.py @@ -31,7 +31,7 @@ def main(): resource_name="vault1", ) - response = client.replication_protected_items.begin_delete( + client.replication_protected_items.begin_delete( fabric_name="cloud1", protection_container_name="cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", replicated_protected_item_name="c0c14913-3d7a-48ea-9531-cc99e0e686e6", @@ -39,9 +39,8 @@ def main(): "properties": {"replicationProviderInput": {"instanceType": "DisableProtectionProviderSpecificInput"}} }, ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_cancel.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_cancel.py index cb22d2a22d7bf..0778201a8b5c3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_cancel.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_cancel.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_FailoverCancel.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_FailoverCancel.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_commit.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_commit.py index d8e1bbe378af0..e24d4af7fc4fc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_commit.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_failover_commit.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_FailoverCommit.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_FailoverCommit.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_get.py index 060abcb0a4179..fdf1a8edd8048 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list.py index 01ae6fa79e7c2..039b96a429e31 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list_by_replication_protection_containers.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list_by_replication_protection_containers.py index 0c9c5514d0ea8..e208297ec7035 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list_by_replication_protection_containers.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_list_by_replication_protection_containers.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_ListByReplicationProtectionContainers.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_ListByReplicationProtectionContainers.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_planned_failover.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_planned_failover.py index 5604cd564d222..14c480996766f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_planned_failover.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_planned_failover.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_PlannedFailover.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_PlannedFailover.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_purge.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_purge.py index 8dc5ff7c81ccc..95b3ab2683d41 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_purge.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_purge.py @@ -31,14 +31,13 @@ def main(): resource_name="vault1", ) - response = client.replication_protected_items.begin_purge( + client.replication_protected_items.begin_purge( fabric_name="cloud1", protection_container_name="cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", replicated_protected_item_name="c0c14913-3d7a-48ea-9531-cc99e0e686e6", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_Purge.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_Purge.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_remove_disks.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_remove_disks.py index 274a775862e92..df6f831da2ad8 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_remove_disks.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_remove_disks.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_RemoveDisks.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_RemoveDisks.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_repair_replication.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_repair_replication.py index 4f7013b37fe90..eabd3c9468075 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_repair_replication.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_repair_replication.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_RepairReplication.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_RepairReplication.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_reprotect.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_reprotect.py index 9312eac5aaa7f..596108fa5f9d9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_reprotect.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_reprotect.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_Reprotect.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_Reprotect.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_resolve_health_errors.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_resolve_health_errors.py index de20f4ce9f6d3..576d7e66da03d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_resolve_health_errors.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_resolve_health_errors.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_ResolveHealthErrors.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_ResolveHealthErrors.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_switch_provider.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_switch_provider.py index a7314950b3969..85ca7b3dd80f6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_switch_provider.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_switch_provider.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_SwitchProvider.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_SwitchProvider.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover.py index be363576d8d8f..28814d39f1343 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_TestFailover.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_TestFailover.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover_cleanup.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover_cleanup.py index b530b6c0e0559..d5ea7e5d1f3ec 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover_cleanup.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_test_failover_cleanup.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_TestFailoverCleanup.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_TestFailoverCleanup.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_unplanned_failover.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_unplanned_failover.py index c2a9da62f993b..417e354ab4218 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_unplanned_failover.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_unplanned_failover.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_UnplannedFailover.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_UnplannedFailover.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update.py index 06068651995a3..8be445ea9a5bd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update.py @@ -62,6 +62,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_Update.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_Update.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_appliance.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_appliance.py index 8e0193be2540b..ee7a1a8154f79 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_appliance.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_appliance.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_UpdateAppliance.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_UpdateAppliance.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_mobility_service.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_mobility_service.py index 5a7de9276c424..745c67b3182cf 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_mobility_service.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protected_items_update_mobility_service.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectedItems_UpdateMobilityService.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectedItems_UpdateMobilityService.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_create.py index 4746c48dd4448..ae0446f3a0f51 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_create.py @@ -46,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainerMappings_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainerMappings_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_delete.py index dee919811f21e..c2c3a3c9b8d9c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_delete.py @@ -31,15 +31,14 @@ def main(): resource_name="vault1", ) - response = client.replication_protection_container_mappings.begin_delete( + client.replication_protection_container_mappings.begin_delete( fabric_name="cloud1", protection_container_name="cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", mapping_name="cloud1protectionprofile1", removal_input={"properties": {"providerSpecificInput": {}}}, ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainerMappings_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainerMappings_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_get.py index b09471e920007..d8a70d3d1a8c3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainerMappings_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainerMappings_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list.py index 39d83539828ac..564b5e2b58346 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainerMappings_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainerMappings_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list_by_replication_protection_containers.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list_by_replication_protection_containers.py index 96dc6cd2c0818..df5201d6357b6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list_by_replication_protection_containers.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_list_by_replication_protection_containers.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainerMappings_ListByReplicationProtectionContainers.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainerMappings_ListByReplicationProtectionContainers.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_purge.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_purge.py index 8c7e046016329..9d7b53b58c236 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_purge.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_purge.py @@ -31,14 +31,13 @@ def main(): resource_name="vault1", ) - response = client.replication_protection_container_mappings.begin_purge( + client.replication_protection_container_mappings.begin_purge( fabric_name="cloud1", protection_container_name="cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", mapping_name="cloud1protectionprofile1", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainerMappings_Purge.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainerMappings_Purge.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_update.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_update.py index 20c312ae395e9..e71d4c66ff840 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_update.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_container_mappings_update.py @@ -48,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainerMappings_Update.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainerMappings_Update.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_create.py index 1cd87e15db008..795a9ccd6c159 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_create.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainers_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainers_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_delete.py index 50a0d8d0175c7..a5f80114a2570 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_delete.py @@ -31,13 +31,12 @@ def main(): resource_name="vault1", ) - response = client.replication_protection_containers.begin_delete( + client.replication_protection_containers.begin_delete( fabric_name="cloud1", protection_container_name="cloud_6d224fc6-f326-5d35-96de-fbf51efb3179", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainers_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainers_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_discover_protectable_item.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_discover_protectable_item.py index b02c8a761d767..e413964c51d11 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_discover_protectable_item.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_discover_protectable_item.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainers_DiscoverProtectableItem.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainers_DiscoverProtectableItem.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_get.py index 935a36d1c0f94..439185b9830bf 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainers_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainers_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list.py index 5763e84972b11..bdae2032d32a3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainers_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainers_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list_by_replication_fabrics.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list_by_replication_fabrics.py index 84daa899a8f02..99e600eff48fd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list_by_replication_fabrics.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_list_by_replication_fabrics.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainers_ListByReplicationFabrics.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainers_ListByReplicationFabrics.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_switch_protection.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_switch_protection.py index 0e6cc0dfc6058..f09a529fbcfd4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_switch_protection.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_containers_switch_protection.py @@ -37,13 +37,13 @@ def main(): switch_input={ "properties": { "providerSpecificDetails": {"instanceType": "A2A"}, - "replicatedProtectedItemName": "a2aSwapOsVm", + "replicationProtectedItemName": "a2aSwapOsVm", } }, ).result() print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionContainers_SwitchProtection.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionContainers_SwitchProtection.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_create.py index 7af91caaa47fb..12749203cce5b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_create.py @@ -50,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionIntents_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionIntents_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_get.py index 4b06bc5a22b3b..b90344b813700 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionIntents_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionIntents_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_list.py index 83fb6282efa09..fbeb88fb333c4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_protection_intents_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationProtectionIntents_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationProtectionIntents_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_create.py index 4b468e9af7a3c..ef813a1e9d073 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_create.py @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_delete.py index a9f371060b1bf..833831cdb8b66 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_delete.py @@ -31,12 +31,11 @@ def main(): resource_name="vault1", ) - response = client.replication_recovery_plans.begin_delete( + client.replication_recovery_plans.begin_delete( recovery_plan_name="RPtest1", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_cancel.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_cancel.py index 6c5f1ad4a0618..f00e956890880 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_cancel.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_cancel.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_FailoverCancel.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_FailoverCancel.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_commit.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_commit.py index af5e54476c913..60b365cccf363 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_commit.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_failover_commit.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_FailoverCommit.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_FailoverCommit.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_get.py index f6be4fe5a6ceb..97094743da714 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_list.py index c63427b4883f9..330888a16c4ae 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_planned_failover.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_planned_failover.py index af7e0936e34b3..c06c7b2941adc 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_planned_failover.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_planned_failover.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_PlannedFailover.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_PlannedFailover.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_reprotect.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_reprotect.py index a7ad6558a32eb..f783a34661eb8 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_reprotect.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_reprotect.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_Reprotect.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_Reprotect.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover.py index 4b35e3e0028a5..7eb9cf99ce025 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_TestFailover.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_TestFailover.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover_cleanup.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover_cleanup.py index 6021cd4650179..120c53b001239 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover_cleanup.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_test_failover_cleanup.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_TestFailoverCleanup.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_TestFailoverCleanup.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_unplanned_failover.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_unplanned_failover.py index 53c7b4d900621..846d4bbf18372 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_unplanned_failover.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_unplanned_failover.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_UnplannedFailover.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_UnplannedFailover.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_update.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_update.py index b8e3b88d43748..00886ef2a1a95 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_update.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_plans_update.py @@ -77,6 +77,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryPlans_Update.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryPlans_Update.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_create.py index 1c2438216136a..0f3de82191b84 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_create.py @@ -57,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryServicesProviders_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryServicesProviders_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_delete.py index 80fdfc09e39c8..e295846d9cdaf 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_delete.py @@ -31,13 +31,12 @@ def main(): resource_name="vault1", ) - response = client.replication_recovery_services_providers.begin_delete( + client.replication_recovery_services_providers.begin_delete( fabric_name="cloud1", provider_name="241641e6-ee7b-4ee4-8141-821fadda43fa", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryServicesProviders_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryServicesProviders_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_get.py index 0caa4bbc4f7f3..d2fc8180eabc0 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryServicesProviders_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryServicesProviders_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list.py index 21aac66123d92..bf005da559e0c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryServicesProviders_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryServicesProviders_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list_by_replication_fabrics.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list_by_replication_fabrics.py index 70503ad5d7505..7463213e9ee08 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list_by_replication_fabrics.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_list_by_replication_fabrics.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryServicesProviders_ListByReplicationFabrics.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryServicesProviders_ListByReplicationFabrics.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_purge.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_purge.py index 3f063dc1a697d..c7e0baf1be36e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_purge.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_purge.py @@ -31,13 +31,12 @@ def main(): resource_name="vault1", ) - response = client.replication_recovery_services_providers.begin_purge( + client.replication_recovery_services_providers.begin_purge( fabric_name="cloud1", provider_name="241641e6-ee7b-4ee4-8141-821fadda43fa", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryServicesProviders_Purge.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryServicesProviders_Purge.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_refresh_provider.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_refresh_provider.py index 0642188a4562c..6259318ae9abd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_refresh_provider.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_recovery_services_providers_refresh_provider.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationRecoveryServicesProviders_RefreshProvider.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationRecoveryServicesProviders_RefreshProvider.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_create.py index 32a549ced3e25..bb5e599ec5406 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_create.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassificationMappings_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassificationMappings_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_delete.py index 354c536c3e48e..ddeb1ae980217 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_delete.py @@ -31,14 +31,13 @@ def main(): resource_name="vault1", ) - response = client.replication_storage_classification_mappings.begin_delete( + client.replication_storage_classification_mappings.begin_delete( fabric_name="2a48e3770ac08aa2be8bfbd94fcfb1cbf2dcc487b78fb9d3bd778304441b06a0", storage_classification_name="8891569e-aaef-4a46-a4a0-78c14f2d7b09", storage_classification_mapping_name="testStorageMapping", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassificationMappings_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassificationMappings_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_get.py index 89313548c32bf..b75f3311689c5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_get.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassificationMappings_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassificationMappings_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list.py index ec467cb9b043c..6cad5536ac4d6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassificationMappings_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassificationMappings_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list_by_replication_storage_classifications.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list_by_replication_storage_classifications.py index fd6597b5ca1bd..8d2acab9946c6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list_by_replication_storage_classifications.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classification_mappings_list_by_replication_storage_classifications.py @@ -39,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassificationMappings_ListByReplicationStorageClassifications.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassificationMappings_ListByReplicationStorageClassifications.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_get.py index ee2bcee8c2581..0ea88d2f56115 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassifications_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassifications_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list.py index 2a143b300dd0e..a309d51f525c3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassifications_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassifications_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list_by_replication_fabrics.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list_by_replication_fabrics.py index 3134176a3bac7..909488df5f01c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list_by_replication_fabrics.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_storage_classifications_list_by_replication_fabrics.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationStorageClassifications_ListByReplicationFabrics.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationStorageClassifications_ListByReplicationFabrics.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_get.py index a95cd4ef3e87f..738c66db0a98c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_get.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationVaultHealth_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationVaultHealth_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_refresh.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_refresh.py index 63324f9edd483..42bc472c37516 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_refresh.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_health_refresh.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationVaultHealth_Refresh.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationVaultHealth_Refresh.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_create.py index e7b8585acc5f7..2d66df2d1b7c5 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_create.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_create.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationVaultSetting_Create.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationVaultSetting_Create.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_get.py index 24326b1a6379b..b800b0398c345 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationVaultSetting_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationVaultSetting_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_list.py index c9424b3545279..703592c8c09a2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replication_vault_setting_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationVaultSetting_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationVaultSetting_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_create.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_create.py deleted file mode 100644 index 01fd8839796db..0000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_create.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.recoveryservicessiterecovery import SiteRecoveryManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-recoveryservicessiterecovery -# USAGE - python replicationv_centers_create.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = SiteRecoveryManagementClient( - credential=DefaultAzureCredential(), - subscription_id="7c943c1b-5122-4097-90c8-861411bdd574", - resource_group_name="MadhaviVRG", - resource_name="MadhaviVault", - ) - - response = client.replicationv_centers.begin_create( - fabric_name="MadhaviFabric", - vcenter_name="esx-78", - add_v_center_request={ - "properties": { - "friendlyName": "esx-78", - "ipAddress": "inmtest78", - "port": "443", - "processServerId": "5A720CAB-39CB-F445-BD1662B0B33164B5", - "runAsAccountId": "2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationvCenters_Create.json -if __name__ == "__main__": - main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_delete.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_delete.py index 98013c5d1b929..b48127c63ff5e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_delete.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_delete.py @@ -31,13 +31,12 @@ def main(): resource_name="MadhaviVault", ) - response = client.replicationv_centers.begin_delete( + client.replicationv_centers.begin_delete( fabric_name="MadhaviFabric", vcenter_name="esx-78", ).result() - print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationvCenters_Delete.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationvCenters_Delete.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_get.py index 9387a25795d01..d8eb5a9a9c12b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationvCenters_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationvCenters_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list.py index 9f4b622a63583..1e609712182ee 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationvCenters_List.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationvCenters_List.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list_by_replication_fabrics.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list_by_replication_fabrics.py index 57b58d4542654..e7f9309d9ffd6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list_by_replication_fabrics.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_list_by_replication_fabrics.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationvCenters_ListByReplicationFabrics.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/ReplicationvCenters_ListByReplicationFabrics.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_update.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_update.py deleted file mode 100644 index e8f6c5aa9c2f7..0000000000000 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/replicationv_centers_update.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.recoveryservicessiterecovery import SiteRecoveryManagementClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-recoveryservicessiterecovery -# USAGE - python replicationv_centers_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = SiteRecoveryManagementClient( - credential=DefaultAzureCredential(), - subscription_id="7c943c1b-5122-4097-90c8-861411bdd574", - resource_group_name="MadhaviVRG", - resource_name="MadhaviVault", - ) - - response = client.replicationv_centers.begin_update( - fabric_name="MadhaviFabric", - vcenter_name="esx-78", - update_v_center_request={"properties": {"ipAddress": "10.150.109.25"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/ReplicationvCenters_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/supported_operating_systems_get.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/supported_operating_systems_get.py index c892be43c911a..af05296db8684 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/supported_operating_systems_get.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/supported_operating_systems_get.py @@ -35,6 +35,6 @@ def main(): print(response) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/SupportedOperatingSystems_Get.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/SupportedOperatingSystems_Get.json if __name__ == "__main__": main() diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/target_compute_sizes_list_by_replication_protected_items.py b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/target_compute_sizes_list_by_replication_protected_items.py index 115fd900ab093..8c84206ab34c3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/target_compute_sizes_list_by_replication_protected_items.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/generated_samples/target_compute_sizes_list_by_replication_protected_items.py @@ -40,6 +40,6 @@ def main(): print(item) -# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2022-10-01/examples/TargetComputeSizes_ListByReplicationProtectedItems.json +# x-ms-original-file: specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-04-01/examples/TargetComputeSizes_ListByReplicationProtectedItems.json if __name__ == "__main__": main()