diff --git a/sdk/automation/azure-mgmt-automation/_meta.json b/sdk/automation/azure-mgmt-automation/_meta.json index 7bf91d868f55..ffbb071dbeb9 100644 --- a/sdk/automation/azure-mgmt-automation/_meta.json +++ b/sdk/automation/azure-mgmt-automation/_meta.json @@ -1,11 +1,11 @@ { - "commit": "23b62d4e4dab07dccda851cfe50f6c6afb705a3b", + "commit": "1edfad6fb7e54ebee03d5b54665965780e70cb62", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.2.7", + "@autorest/python@6.4.7", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/automation/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/automation/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.4.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/automation/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py index 04362ae49337..4192a63df8b7 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_automation_client.py @@ -201,7 +201,7 @@ def __init__( **kwargs: Any ) -> None: self._config = AutomationClientConfiguration(credential=credential, subscription_id=subscription_id, **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) @@ -321,5 +321,5 @@ def __enter__(self) -> "AutomationClient": 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/automation/azure-mgmt-automation/azure/mgmt/automation/_serialization.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_serialization.py index 2c170e28dbca..842ae727fbbc 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_serialization.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_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/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py index 2bd6526d54d6..c36b8463f33a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_vendor.py @@ -6,7 +6,7 @@ # -------------------------------------------------------------------------- from abc import ABC -from typing import TYPE_CHECKING +from typing import List, TYPE_CHECKING, cast from azure.core.pipeline.transport import HttpRequest @@ -33,7 +33,8 @@ 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/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py index 73aef742777f..e5754a47ce68 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.0b3" +VERSION = "1.0.0b1" diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py index 4a916016e428..2247d9dc9d96 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/_automation_client.py @@ -201,7 +201,7 @@ def __init__( **kwargs: Any ) -> None: self._config = AutomationClientConfiguration(credential=credential, subscription_id=subscription_id, **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) @@ -321,5 +321,5 @@ async def __aenter__(self) -> "AutomationClient": 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py index 48d5318457f7..a3a5307cc9d0 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_activity_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -31,10 +30,6 @@ from ...operations._activity_operations import build_get_request, build_list_by_module_request from .._vendor import AutomationClientMixinABC -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]] @@ -69,6 +64,9 @@ async def get( ) -> _models.Activity: """Retrieve the activity in the module identified by module name and activity name. + .. seealso:: + - http://aka.ms/azureautomationsdk/activityoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -93,7 +91,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Activity] = kwargs.pop("cls", None) request = build_get_request( @@ -110,8 +108,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 @@ -138,6 +137,9 @@ def list_by_module( ) -> AsyncIterable["_models.Activity"]: """Retrieve a list of activities in the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/activityoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -152,7 +154,7 @@ def list_by_module( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ActivityListResult] = kwargs.pop("cls", None) error_map = { @@ -196,8 +198,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py index 3615ea66bc8f..893bc0d86899 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_agent_registration_information_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ...operations._agent_registration_information_operations import build_get_request, build_regenerate_key_request from .._vendor import AutomationClientMixinABC -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]] @@ -62,6 +57,9 @@ async def get( ) -> _models.AgentRegistration: """Retrieve the automation agent registration information. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -82,9 +80,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None) request = build_get_request( @@ -99,8 +95,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 @@ -133,6 +130,9 @@ async def regenerate_key( ) -> _models.AgentRegistration: """Regenerate a primary or secondary agent registration key. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -160,6 +160,9 @@ async def regenerate_key( ) -> _models.AgentRegistration: """Regenerate a primary or secondary agent registration key. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -185,12 +188,15 @@ async def regenerate_key( ) -> _models.AgentRegistration: """Regenerate a primary or secondary agent registration key. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str - :param parameters: The name of the agent registration key to be regenerated. Is either a model - type or a IO type. Required. + :param parameters: The name of the agent registration key to be regenerated. Is either a + AgentRegistrationRegenerateKeyParameter type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.AgentRegistrationRegenerateKeyParameter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -211,9 +217,7 @@ async def regenerate_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None) @@ -240,8 +244,9 @@ async def regenerate_key( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py index d6ddc08bfb00..9e56e2e6a0be 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_account_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -38,10 +37,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +72,9 @@ async def update( ) -> _models.AutomationAccount: """Update an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -104,6 +102,9 @@ async def update( ) -> _models.AutomationAccount: """Update an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -129,12 +130,15 @@ async def update( ) -> _models.AutomationAccount: """Update an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str - :param parameters: Parameters supplied to the update automation account. Is either a model type - or a IO type. Required. + :param parameters: Parameters supplied to the update automation account. Is either a + AutomationAccountUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.AutomationAccountUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -155,7 +159,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None) @@ -182,8 +186,9 @@ async def update( 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 @@ -216,6 +221,9 @@ async def create_or_update( ) -> _models.AutomationAccount: """Create or update automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -243,6 +251,9 @@ async def create_or_update( ) -> _models.AutomationAccount: """Create or update automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -268,12 +279,15 @@ async def create_or_update( ) -> _models.AutomationAccount: """Create or update automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param parameters: Parameters supplied to the create or update automation account. Is either a - model type or a IO type. Required. + AutomationAccountCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.AutomationAccountCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -294,7 +308,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None) @@ -321,8 +335,9 @@ async def create_or_update( 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 @@ -353,6 +368,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -373,7 +391,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -388,8 +406,9 @@ async def delete( # 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 @@ -412,6 +431,9 @@ async def get( ) -> _models.AutomationAccount: """Get information about an Automation Account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -432,7 +454,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None) request = build_get_request( @@ -447,8 +469,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 @@ -475,6 +498,9 @@ def list_by_resource_group( ) -> AsyncIterable["_models.AutomationAccount"]: """Retrieve a list of accounts within a given resource group. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -486,7 +512,7 @@ def list_by_resource_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None) error_map = { @@ -528,8 +554,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 @@ -561,7 +588,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.AutomationAccount"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None) error_map = { @@ -602,8 +629,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_operations.py index ef0c01c9f234..2d6343ba19cb 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_automation_client_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ...operations._automation_client_operations import build_convert_graph_runbook_content_request from .._vendor import AutomationClientMixinABC -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,8 +101,8 @@ async def convert_graph_runbook_content( :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str - :param parameters: Input data describing the graphical runbook. Is either a model type or a IO - type. Required. + :param parameters: Input data describing the graphical runbook. Is either a + GraphicalRunbookContent type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.GraphicalRunbookContent or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -128,7 +123,7 @@ async def convert_graph_runbook_content( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GraphicalRunbookContent] = kwargs.pop("cls", None) @@ -155,8 +150,9 @@ async def convert_graph_runbook_content( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = False pipeline_response: PipelineResponse = await self._client._pipeline.run( # type: ignore # pylint: disable=protected-access - request, stream=False, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py index 5379dc31ca25..e52992af7511 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_certificate_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -92,7 +90,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -108,8 +106,9 @@ async def delete( # 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 @@ -132,6 +131,9 @@ async def get( ) -> _models.Certificate: """Retrieve the certificate identified by certificate name. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -154,7 +156,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Certificate] = kwargs.pop("cls", None) request = build_get_request( @@ -170,8 +172,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 @@ -205,6 +208,9 @@ async def create_or_update( ) -> _models.Certificate: """Create a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -237,6 +243,9 @@ async def create_or_update( ) -> _models.Certificate: """Create a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -267,6 +276,9 @@ async def create_or_update( ) -> _models.Certificate: """Create a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -275,7 +287,7 @@ async def create_or_update( Required. :type certificate_name: str :param parameters: The parameters supplied to the create or update certificate operation. Is - either a model type or a IO type. Required. + either a CertificateCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CertificateCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -296,7 +308,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Certificate] = kwargs.pop("cls", None) @@ -324,8 +336,9 @@ async def create_or_update( 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 @@ -363,6 +376,9 @@ async def update( ) -> _models.Certificate: """Update a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -393,6 +409,9 @@ async def update( ) -> _models.Certificate: """Update a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -421,6 +440,9 @@ async def update( ) -> _models.Certificate: """Update a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -428,7 +450,7 @@ async def update( :param certificate_name: The parameters supplied to the update certificate operation. Required. :type certificate_name: str :param parameters: The parameters supplied to the update certificate operation. Is either a - model type or a IO type. Required. + CertificateUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CertificateUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -449,7 +471,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Certificate] = kwargs.pop("cls", None) @@ -477,8 +499,9 @@ async def update( 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 @@ -505,6 +528,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Certificate"]: """Retrieve a list of certificates. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -517,7 +543,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.CertificateListResult] = kwargs.pop("cls", None) error_map = { @@ -560,8 +586,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py index 2a8289659e0f..fa980ba6ca60 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -92,7 +90,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -108,8 +106,9 @@ async def delete( # 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 @@ -132,6 +131,9 @@ async def get( ) -> _models.Connection: """Retrieve the connection identified by connection name. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -154,7 +156,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Connection] = kwargs.pop("cls", None) request = build_get_request( @@ -170,8 +172,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 @@ -205,6 +208,9 @@ async def create_or_update( ) -> _models.Connection: """Create or update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -237,6 +243,9 @@ async def create_or_update( ) -> _models.Connection: """Create or update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -267,6 +276,9 @@ async def create_or_update( ) -> _models.Connection: """Create or update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -275,7 +287,7 @@ async def create_or_update( Required. :type connection_name: str :param parameters: The parameters supplied to the create or update connection operation. Is - either a model type or a IO type. Required. + either a ConnectionCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ConnectionCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -296,7 +308,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Connection] = kwargs.pop("cls", None) @@ -324,8 +336,9 @@ async def create_or_update( 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 @@ -363,6 +376,9 @@ async def update( ) -> _models.Connection: """Update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -393,6 +409,9 @@ async def update( ) -> _models.Connection: """Update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -421,6 +440,9 @@ async def update( ) -> _models.Connection: """Update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -428,7 +450,7 @@ async def update( :param connection_name: The parameters supplied to the update a connection operation. Required. :type connection_name: str :param parameters: The parameters supplied to the update a connection operation. Is either a - model type or a IO type. Required. + ConnectionUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ConnectionUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -449,7 +471,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Connection] = kwargs.pop("cls", None) @@ -477,8 +499,9 @@ async def update( 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 @@ -505,6 +528,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Connection"]: """Retrieve a list of connections. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -517,7 +543,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -560,8 +586,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py index e51ac98d5238..beed6fc707eb 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_connection_type_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,10 +35,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -69,6 +64,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -91,7 +89,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -107,8 +105,9 @@ async def delete( # 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 @@ -131,6 +130,9 @@ async def get( ) -> _models.ConnectionType: """Retrieve the connection type identified by connection type name. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -153,7 +155,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None) request = build_get_request( @@ -169,8 +171,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 @@ -204,6 +207,9 @@ async def create_or_update( ) -> _models.ConnectionType: """Create a connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -236,6 +242,9 @@ async def create_or_update( ) -> _models.ConnectionType: """Create a connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -266,6 +275,9 @@ async def create_or_update( ) -> _models.ConnectionType: """Create a connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -274,7 +286,7 @@ async def create_or_update( operation. Required. :type connection_type_name: str :param parameters: The parameters supplied to the create or update connection type operation. - Is either a model type or a IO type. Required. + Is either a ConnectionTypeCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ConnectionTypeCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -295,7 +307,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None) @@ -323,8 +335,9 @@ async def create_or_update( 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 @@ -351,6 +364,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.ConnectionType"]: """Retrieve a list of connection types. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -363,7 +379,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ConnectionTypeListResult] = kwargs.pop("cls", None) error_map = { @@ -406,8 +422,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py index 75800d5637d1..7776b0652935 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_credential_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -92,7 +90,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -108,8 +106,9 @@ async def delete( # 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 @@ -132,6 +131,9 @@ async def get( ) -> _models.Credential: """Retrieve the credential identified by credential name. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -154,7 +156,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Credential] = kwargs.pop("cls", None) request = build_get_request( @@ -170,8 +172,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 @@ -205,6 +208,9 @@ async def create_or_update( ) -> _models.Credential: """Create a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -237,6 +243,9 @@ async def create_or_update( ) -> _models.Credential: """Create a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -267,6 +276,9 @@ async def create_or_update( ) -> _models.Credential: """Create a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -275,7 +287,7 @@ async def create_or_update( Required. :type credential_name: str :param parameters: The parameters supplied to the create or update credential operation. Is - either a model type or a IO type. Required. + either a CredentialCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CredentialCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -296,7 +308,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Credential] = kwargs.pop("cls", None) @@ -324,8 +336,9 @@ async def create_or_update( 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 @@ -363,6 +376,9 @@ async def update( ) -> _models.Credential: """Update a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -393,6 +409,9 @@ async def update( ) -> _models.Credential: """Update a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -421,6 +440,9 @@ async def update( ) -> _models.Credential: """Update a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -428,7 +450,7 @@ async def update( :param credential_name: The parameters supplied to the Update credential operation. Required. :type credential_name: str :param parameters: The parameters supplied to the Update credential operation. Is either a - model type or a IO type. Required. + CredentialUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CredentialUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -449,7 +471,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Credential] = kwargs.pop("cls", None) @@ -477,8 +499,9 @@ async def update( 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 @@ -505,6 +528,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Credential"]: """Retrieve a list of credentials. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -517,7 +543,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.CredentialListResult] = kwargs.pop("cls", None) error_map = { @@ -560,8 +586,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_operations.py index 1035080d3af2..c0ddf73062a3 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_deleted_automation_accounts_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 ( @@ -29,10 +28,6 @@ from ...operations._deleted_automation_accounts_operations import build_list_by_subscription_request from .._vendor import AutomationClientMixinABC -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]] @@ -76,7 +71,7 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomation _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-01-31"] = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31")) cls: ClsType[_models.DeletedAutomationAccountListResult] = kwargs.pop("cls", None) request = build_list_by_subscription_request( @@ -89,8 +84,9 @@ async def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomation 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py index 46bf8b413117..a3ad39224a49 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_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, IO, Optional, TypeVar, Union, cast, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -38,10 +37,6 @@ ) from .._vendor import AutomationClientMixinABC -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 @@ async def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None) @@ -114,8 +107,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 @@ -149,6 +143,9 @@ async def begin_create( ) -> AsyncLROPoller[_models.DscCompilationJob]: """Creates the Dsc compilation job of the configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -187,6 +184,9 @@ async def begin_create( ) -> AsyncLROPoller[_models.DscCompilationJob]: """Creates the Dsc compilation job of the configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -223,6 +223,9 @@ async def begin_create( ) -> AsyncLROPoller[_models.DscCompilationJob]: """Creates the Dsc compilation job of the configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -230,7 +233,7 @@ async def begin_create( :param compilation_job_name: The DSC configuration Id. Required. :type compilation_job_name: str :param parameters: The parameters supplied to the create compilation job operation. Is either a - model type or a IO type. Required. + DscCompilationJobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -251,9 +254,7 @@ async def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -305,6 +306,9 @@ async def get( ) -> _models.DscCompilationJob: """Retrieve the Dsc configuration compilation job identified by job id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dsccompilationjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -327,9 +331,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None) request = build_get_request( @@ -345,8 +347,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 @@ -373,6 +376,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.DscCompilationJob"]: """Retrieve a list of dsc compilation jobs. + .. seealso:: + - http://aka.ms/azureautomationsdk/compilationjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -388,9 +394,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscCompilationJobListResult] = kwargs.pop("cls", None) error_map = { @@ -434,8 +438,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 @@ -458,6 +463,9 @@ async def get_stream( ) -> _models.JobStream: """Retrieve the job stream identified by job stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -482,9 +490,7 @@ async def get_stream( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.JobStream] = kwargs.pop("cls", None) request = build_get_stream_request( @@ -501,8 +507,9 @@ async def get_stream( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py index cf2858b8ec2c..796255b03c74 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_compilation_job_stream_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 ( @@ -29,10 +28,6 @@ from ...operations._dsc_compilation_job_stream_operations import build_list_by_job_request from .._vendor import AutomationClientMixinABC -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]] @@ -62,6 +57,9 @@ async def list_by_job( ) -> _models.JobStreamListResult: """Retrieve all the job streams for the compilation Job. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -84,9 +82,7 @@ async def list_by_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None) request = build_list_by_job_request( @@ -102,8 +98,9 @@ async def list_by_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 diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py index 8235b0d6417f..024e3b85437b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_configuration_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, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -38,10 +37,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -71,6 +66,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the dsc configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -93,7 +91,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -109,8 +107,9 @@ async def delete( # 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 @@ -133,6 +132,9 @@ async def get( ) -> _models.DscConfiguration: """Retrieve the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -155,7 +157,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None) request = build_get_request( @@ -171,8 +173,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 @@ -206,6 +209,9 @@ async def create_or_update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -236,6 +242,9 @@ async def create_or_update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -264,14 +273,17 @@ async def create_or_update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param configuration_name: The create or update parameters for configuration. Required. :type configuration_name: str - :param parameters: The create or update parameters for configuration. Is either a model type or - a string type. Required. + :param parameters: The create or update parameters for configuration. Is either a + DscConfigurationCreateOrUpdateParameters type or a str type. Required. :type parameters: ~azure.mgmt.automation.models.DscConfigurationCreateOrUpdateParameters or str :keyword content_type: Body Parameter content-type. Known values are: 'application/json', 'text/plain; charset=utf-8'. Default value is None. @@ -292,7 +304,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None) @@ -320,8 +332,9 @@ async def create_or_update( 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,6 +372,9 @@ async def update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -389,6 +405,9 @@ async def update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -417,14 +436,17 @@ async def update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param configuration_name: The create or update parameters for configuration. Required. :type configuration_name: str - :param parameters: The create or update parameters for configuration. Is either a model type or - a string type. Default value is None. + :param parameters: The create or update parameters for configuration. Is either a + DscConfigurationUpdateParameters type or a str type. Default value is None. :type parameters: ~azure.mgmt.automation.models.DscConfigurationUpdateParameters or str :keyword content_type: Body Parameter content-type. Known values are: 'application/json', 'text/plain; charset=utf-8'. Default value is None. @@ -445,7 +467,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None) @@ -479,8 +501,9 @@ async def update( 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 @@ -507,6 +530,9 @@ async def get_content( ) -> AsyncIterator[bytes]: """Retrieve the configuration script identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -529,7 +555,7 @@ async def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) request = build_get_content_request( @@ -545,8 +571,9 @@ async def get_content( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -579,6 +606,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.DscConfiguration"]: """Retrieve a list of configurations. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -599,7 +629,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscConfigurationListResult] = kwargs.pop("cls", None) error_map = { @@ -646,8 +676,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py index 9f8e09ce19bf..1e4cba98d984 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_configuration_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, IO, Optional, TypeVar, Union, cast, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -38,10 +37,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -71,6 +66,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the Dsc node configurations by node configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -93,7 +91,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -109,8 +107,9 @@ async def delete( # 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 @@ -133,6 +132,9 @@ async def get( ) -> _models.DscNodeConfiguration: """Retrieve the Dsc node configurations by node configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -155,7 +157,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscNodeConfiguration] = kwargs.pop("cls", None) request = build_get_request( @@ -171,8 +173,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 @@ -212,7 +215,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DscNodeConfiguration]] = kwargs.pop("cls", None) @@ -240,8 +243,9 @@ async def _create_or_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 @@ -274,9 +278,12 @@ async def begin_create_or_update( *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.DscNodeConfiguration]: """Create the node configuration identified by node configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -312,9 +319,12 @@ async def begin_create_or_update( *, content_type: str = "application/json", **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.DscNodeConfiguration]: """Create the node configuration identified by node configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -348,17 +358,20 @@ async def begin_create_or_update( node_configuration_name: str, parameters: Union[_models.DscNodeConfigurationCreateOrUpdateParameters, IO], **kwargs: Any - ) -> AsyncLROPoller[None]: + ) -> AsyncLROPoller[_models.DscNodeConfiguration]: """Create the node configuration identified by node configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param node_configuration_name: The Dsc node configuration name. Required. :type node_configuration_name: str - :param parameters: The create or update parameters for configuration. Is either a model type or - a IO type. Required. + :param parameters: The create or update parameters for configuration. Is either a + DscNodeConfigurationCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.DscNodeConfigurationCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -380,7 +393,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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) @@ -439,6 +452,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.DscNodeConfiguration"]: """Retrieve a list of dsc node configurations. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -461,7 +477,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscNodeConfigurationListResult] = kwargs.pop("cls", None) error_map = { @@ -508,8 +524,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py index 90db769927b8..90afa989995c 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_dsc_node_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,10 +35,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -69,6 +64,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the dsc node identified by node id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -91,9 +89,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -109,8 +105,9 @@ async def delete( # 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 @@ -133,6 +130,9 @@ async def get( ) -> _models.DscNode: """Retrieve the dsc node identified by node id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -155,9 +155,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNode] = kwargs.pop("cls", None) request = build_get_request( @@ -173,8 +171,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 @@ -208,6 +207,9 @@ async def update( ) -> _models.DscNode: """Update the dsc node. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -238,6 +240,9 @@ async def update( ) -> _models.DscNode: """Update the dsc node. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -266,6 +271,9 @@ async def update( ) -> _models.DscNode: """Update the dsc node. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -273,7 +281,7 @@ async def update( :param node_id: Parameters supplied to the update dsc node. Required. :type node_id: str :param dsc_node_update_parameters: Parameters supplied to the update dsc node. Is either a - model type or a IO type. Required. + DscNodeUpdateParameters type or a IO type. Required. :type dsc_node_update_parameters: ~azure.mgmt.automation.models.DscNodeUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -294,9 +302,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscNode] = kwargs.pop("cls", None) @@ -324,8 +330,9 @@ async def update( 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,6 +366,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.DscNode"]: """Retrieve a list of dsc nodes. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -379,9 +389,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNodeListResult] = kwargs.pop("cls", None) error_map = { @@ -428,8 +436,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py index bf24b786c68e..7c316ced632b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_fields_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -30,10 +29,6 @@ from ...operations._fields_operations import build_list_by_type_request from .._vendor import AutomationClientMixinABC -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]] @@ -63,6 +58,9 @@ def list_by_type( ) -> AsyncIterable["_models.TypeField"]: """Retrieve a list of fields of a given type identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/typefieldoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -79,7 +77,7 @@ def list_by_type( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None) error_map = { @@ -124,8 +122,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py index f806c6b894b2..8e9a764e7737 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_worker_group_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -74,6 +69,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -96,7 +94,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -112,8 +110,9 @@ async def delete( # 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 @@ -140,6 +139,9 @@ async def get( ) -> _models.HybridRunbookWorkerGroup: """Retrieve a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -162,7 +164,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None) request = build_get_request( @@ -178,8 +180,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 @@ -213,6 +216,9 @@ async def create( ) -> _models.HybridRunbookWorkerGroup: """Create a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -245,6 +251,9 @@ async def create( ) -> _models.HybridRunbookWorkerGroup: """Create a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -276,6 +285,9 @@ async def create( ) -> _models.HybridRunbookWorkerGroup: """Create a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -283,7 +295,8 @@ async def create( :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required. :type hybrid_runbook_worker_group_name: str :param hybrid_runbook_worker_group_creation_parameters: The create or update parameters for - hybrid runbook worker group. Is either a model type or a IO type. Required. + hybrid runbook worker group. Is either a HybridRunbookWorkerGroupCreateOrUpdateParameters type + or a IO type. Required. :type hybrid_runbook_worker_group_creation_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerGroupCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -305,7 +318,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None) @@ -335,8 +348,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 @@ -374,6 +388,9 @@ async def update( ) -> _models.HybridRunbookWorkerGroup: """Update a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -406,6 +423,9 @@ async def update( ) -> _models.HybridRunbookWorkerGroup: """Update a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -437,6 +457,9 @@ async def update( ) -> _models.HybridRunbookWorkerGroup: """Update a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -444,7 +467,7 @@ async def update( :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required. :type hybrid_runbook_worker_group_name: str :param hybrid_runbook_worker_group_updation_parameters: The hybrid runbook worker group. Is - either a model type or a IO type. Required. + either a HybridRunbookWorkerGroupCreateOrUpdateParameters type or a IO type. Required. :type hybrid_runbook_worker_group_updation_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerGroupCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -466,7 +489,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None) @@ -496,8 +519,9 @@ async def update( 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 @@ -524,6 +548,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.HybridRunbookWorkerGroup"]: """Retrieve a list of hybrid runbook worker groups. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -540,7 +567,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorkerGroupsListResult] = kwargs.pop("cls", None) error_map = { @@ -584,8 +611,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_operations.py index 250602e6afec..f950b121184d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_hybrid_runbook_workers_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +70,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -99,7 +97,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -116,8 +114,9 @@ async def delete( # 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 @@ -145,6 +144,9 @@ async def get( ) -> _models.HybridRunbookWorker: """Retrieve a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -169,7 +171,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None) request = build_get_request( @@ -186,8 +188,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 @@ -222,6 +225,9 @@ async def create( ) -> _models.HybridRunbookWorker: """Create a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -257,6 +263,9 @@ async def create( ) -> _models.HybridRunbookWorker: """Create a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -289,6 +298,9 @@ async def create( ) -> _models.HybridRunbookWorker: """Create a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -298,7 +310,7 @@ async def create( :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required. :type hybrid_runbook_worker_id: str :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid - runbook worker. Is either a model type or a IO type. Required. + runbook worker. Is either a HybridRunbookWorkerCreateParameters type or a IO type. Required. :type hybrid_runbook_worker_creation_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -320,7 +332,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None) @@ -351,8 +363,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 @@ -391,6 +404,9 @@ async def move( # pylint: disable=inconsistent-return-statements ) -> None: """Move a hybrid worker to a different group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -426,6 +442,9 @@ async def move( # pylint: disable=inconsistent-return-statements ) -> None: """Move a hybrid worker to a different group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -458,6 +477,9 @@ async def move( # pylint: disable=inconsistent-return-statements ) -> None: """Move a hybrid worker to a different group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -467,7 +489,7 @@ async def move( # pylint: disable=inconsistent-return-statements :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required. :type hybrid_runbook_worker_id: str :param hybrid_runbook_worker_move_parameters: The hybrid runbook worker move parameters. Is - either a model type or a IO type. Required. + either a HybridRunbookWorkerMoveParameters type or a IO type. Required. :type hybrid_runbook_worker_move_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerMoveParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -489,7 +511,7 @@ async def move( # 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -518,8 +540,9 @@ async def move( # 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 @@ -547,6 +570,9 @@ def list_by_hybrid_runbook_worker_group( ) -> AsyncIterable["_models.HybridRunbookWorker"]: """Retrieve a list of hybrid runbook workers. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -564,7 +590,7 @@ def list_by_hybrid_runbook_worker_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorkersListResult] = kwargs.pop("cls", None) error_map = { @@ -609,8 +635,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py index 294a6b54fe5f..2b327d04f9ec 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -40,10 +39,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +73,9 @@ async def get_output( ) -> str: """Retrieve the job output identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -102,7 +100,7 @@ async def get_output( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[str] = kwargs.pop("cls", None) request = build_get_output_request( @@ -119,8 +117,9 @@ async def get_output( 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 @@ -151,6 +150,9 @@ async def get_runbook_content( ) -> str: """Retrieve the runbook content of the job identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -175,7 +177,7 @@ async def get_runbook_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[str] = kwargs.pop("cls", None) request = build_get_runbook_content_request( @@ -192,8 +194,9 @@ async def get_runbook_content( 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 @@ -224,6 +227,9 @@ async def suspend( # pylint: disable=inconsistent-return-statements ) -> None: """Suspend the job identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -248,7 +254,7 @@ async def suspend( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_suspend_request( @@ -265,8 +271,9 @@ async def suspend( # 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 @@ -294,6 +301,9 @@ async def stop( # pylint: disable=inconsistent-return-statements ) -> None: """Stop the job identified by jobName. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -318,7 +328,7 @@ async def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -335,8 +345,9 @@ async def stop( # 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 @@ -364,6 +375,9 @@ async def get( ) -> _models.Job: """Retrieve the job identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -388,7 +402,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Job] = kwargs.pop("cls", None) request = build_get_request( @@ -405,8 +419,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 @@ -441,6 +456,9 @@ async def create( ) -> _models.Job: """Create a job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -474,6 +492,9 @@ async def create( ) -> _models.Job: """Create a job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -505,14 +526,17 @@ async def create( ) -> _models.Job: """Create a job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param job_name: The job name. Required. :type job_name: str - :param parameters: The parameters supplied to the create job operation. Is either a model type - or a IO type. Required. + :param parameters: The parameters supplied to the create job operation. Is either a + JobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.JobCreateParameters or IO :param client_request_id: Identifies this specific client request. Default value is None. :type client_request_id: str @@ -535,7 +559,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) @@ -564,8 +588,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 @@ -597,6 +622,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.JobCollectionItem"]: """Retrieve a list of jobs. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -614,7 +642,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobListResultV2] = kwargs.pop("cls", None) error_map = { @@ -659,8 +687,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 @@ -688,6 +717,9 @@ async def resume( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the job identified by jobName. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -712,7 +744,7 @@ async def resume( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resume_request( @@ -729,8 +761,9 @@ async def resume( # 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 diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py index 1b87fe2cc35c..6125d0243d4c 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_schedule_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -36,10 +35,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -69,6 +64,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the job schedule identified by job schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -91,7 +89,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -107,8 +105,9 @@ async def delete( # 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 @@ -131,6 +130,9 @@ async def get( ) -> _models.JobSchedule: """Retrieve the job schedule identified by job schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -153,7 +155,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None) request = build_get_request( @@ -169,8 +171,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 @@ -204,6 +207,9 @@ async def create( ) -> _models.JobSchedule: """Create a job schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -234,6 +240,9 @@ async def create( ) -> _models.JobSchedule: """Create a job schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,6 +271,9 @@ async def create( ) -> _models.JobSchedule: """Create a job schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -269,7 +281,7 @@ async def create( :param job_schedule_id: The job schedule name. Required. :type job_schedule_id: str :param parameters: The parameters supplied to the create job schedule operation. Is either a - model type or a IO type. Required. + JobScheduleCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.JobScheduleCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -290,7 +302,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None) @@ -318,8 +330,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 @@ -346,6 +359,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.JobSchedule"]: """Retrieve a list of job schedules. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -360,7 +376,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobScheduleListResult] = kwargs.pop("cls", None) error_map = { @@ -404,8 +420,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py index b815bac87793..ee54c65ba8e3 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_job_stream_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -31,10 +30,6 @@ from ...operations._job_stream_operations import build_get_request, build_list_by_job_request from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def get( ) -> _models.JobStream: """Retrieve the job stream identified by job stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -96,7 +94,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStream] = kwargs.pop("cls", None) request = build_get_request( @@ -114,8 +112,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 @@ -148,6 +147,9 @@ def list_by_job( ) -> AsyncIterable["_models.JobStream"]: """Retrieve a list of jobs streams identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -166,7 +168,7 @@ def list_by_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None) error_map = { @@ -212,8 +214,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py index 8f4a8d9484f8..eb6ff4ae211b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_keys_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 ( @@ -29,10 +28,6 @@ from ...operations._keys_operations import build_list_by_automation_account_request from .._vendor import AutomationClientMixinABC -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,7 +77,7 @@ async def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.KeyListResult] = kwargs.pop("cls", None) request = build_list_by_automation_account_request( @@ -97,8 +92,9 @@ async def list_by_automation_account( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py index c383a374464f..dd26c55dde44 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_linked_workspace_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 ( @@ -29,10 +28,6 @@ from ...operations._linked_workspace_operations import build_get_request from .._vendor import AutomationClientMixinABC -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]] @@ -62,6 +57,9 @@ async def get( ) -> _models.LinkedWorkspace: """Retrieve the linked workspace for the account id. + .. seealso:: + - http://aka.ms/azureautomationsdk/linkedworkspaceoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -82,7 +80,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.LinkedWorkspace] = kwargs.pop("cls", None) request = build_get_request( @@ -97,8 +95,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py index f6de70a18d40..0d496e05f05b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_module_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the module by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -92,7 +90,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -108,8 +106,9 @@ async def delete( # 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 @@ -132,6 +131,9 @@ async def get( ) -> _models.Module: """Retrieve the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -154,7 +156,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Module] = kwargs.pop("cls", None) request = build_get_request( @@ -170,8 +172,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 @@ -205,6 +208,9 @@ async def create_or_update( ) -> _models.Module: """Create or Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -235,6 +241,9 @@ async def create_or_update( ) -> _models.Module: """Create or Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -263,14 +272,17 @@ async def create_or_update( ) -> _models.Module: """Create or Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param module_name: The name of module. Required. :type module_name: str - :param parameters: The create or update parameters for module. Is either a model type or a IO - type. Required. + :param parameters: The create or update parameters for module. Is either a + ModuleCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ModuleCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -291,7 +303,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -319,8 +331,9 @@ async def create_or_update( 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,6 +371,9 @@ async def update( ) -> _models.Module: """Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -388,6 +404,9 @@ async def update( ) -> _models.Module: """Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -416,14 +435,17 @@ async def update( ) -> _models.Module: """Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param module_name: The name of module. Required. :type module_name: str - :param parameters: The update parameters for module. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for module. Is either a ModuleUpdateParameters type or + a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ModuleUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -444,7 +466,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -472,8 +494,9 @@ async def update( 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 @@ -500,6 +523,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Module"]: """Retrieve a list of modules. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -512,7 +538,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None) error_map = { @@ -555,8 +581,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py index 9c3773f1b89b..bcc54110347d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_count_information_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ...operations._node_count_information_operations import build_get_request from .._vendor import AutomationClientMixinABC -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]] @@ -66,6 +61,9 @@ async def get( ) -> _models.NodeCounts: """Retrieve counts for Dsc Nodes. + .. seealso:: + - http://aka.ms/azureautomationsdk/nodecounts + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -89,9 +87,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.NodeCounts] = kwargs.pop("cls", None) request = build_get_request( @@ -107,8 +103,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py index f69a5d6d25f4..8651b9434401 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_node_reports_operations.py @@ -39,10 +39,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -78,6 +74,9 @@ def list_by_node( ) -> AsyncIterable["_models.DscNodeReport"]: """Retrieve the Dsc node report list by node id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodereportoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -94,9 +93,7 @@ def list_by_node( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNodeReportListResult] = kwargs.pop("cls", None) error_map = { @@ -141,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 @@ -165,6 +163,9 @@ async def get( ) -> _models.DscNodeReport: """Retrieve the Dsc node report data by node id and report id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodereportoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -189,9 +190,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNodeReport] = kwargs.pop("cls", None) request = build_get_request( @@ -208,8 +207,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 @@ -236,6 +236,9 @@ async def get_content( ) -> JSON: """Retrieve the Dsc node reports by node id and report id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodereportoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -260,9 +263,7 @@ async def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[JSON] = kwargs.pop("cls", None) request = build_get_content_request( @@ -279,8 +280,9 @@ async def get_content( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py index 2a5725fd5a63..7c08d067db37 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_object_data_types_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -33,10 +32,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -66,6 +61,9 @@ def list_fields_by_module_and_type( ) -> AsyncIterable["_models.TypeField"]: """Retrieve a list of fields of a given type identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/objectdatatypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -82,7 +80,7 @@ def list_fields_by_module_and_type( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None) error_map = { @@ -127,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 @@ -151,6 +150,9 @@ def list_fields_by_type( ) -> AsyncIterable["_models.TypeField"]: """Retrieve a list of fields of a given type across all accessible modules. + .. seealso:: + - http://aka.ms/azureautomationsdk/objectdatatypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -165,7 +167,7 @@ def list_fields_by_type( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None) error_map = { @@ -209,8 +211,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py index 3599d8fec14d..5538301a9500 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -30,10 +29,6 @@ from ...operations._operations import build_list_request from .._vendor import AutomationClientMixinABC -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]] @@ -69,7 +64,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -109,8 +104,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py index 5325585a9f77..747249bba4de 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_endpoint_connections_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, IO, Optional, TypeVar, Union, cast, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -38,10 +37,6 @@ ) from .._vendor import AutomationClientMixinABC -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_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -130,8 +123,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( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -197,8 +189,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 @@ -237,9 +230,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -267,8 +258,9 @@ async def _create_or_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 @@ -386,7 +378,7 @@ async def begin_create_or_update( :type automation_account_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: Is either a model type or a IO type. Required. + :param parameters: Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -408,9 +400,7 @@ async def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -474,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["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -492,8 +480,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 @@ -541,9 +530,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py index b31120697d9a..77a506dc644d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_private_link_resources_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -30,10 +29,6 @@ from ...operations._private_link_resources_operations import build_automation_request from .._vendor import AutomationClientMixinABC -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]] @@ -76,9 +71,7 @@ def automation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -121,8 +114,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py index 7422ff40e17e..27f48c423071 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python2_package_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the python 2 package by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -92,7 +90,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -108,8 +106,9 @@ async def delete( # 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 @@ -132,6 +131,9 @@ async def get( ) -> _models.Module: """Retrieve the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -154,7 +156,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Module] = kwargs.pop("cls", None) request = build_get_request( @@ -170,8 +172,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 @@ -205,6 +208,9 @@ async def create_or_update( ) -> _models.Module: """Create or Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -235,6 +241,9 @@ async def create_or_update( ) -> _models.Module: """Create or Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -263,14 +272,17 @@ async def create_or_update( ) -> _models.Module: """Create or Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The create or update parameters for python package. Is either a model type - or a IO type. Required. + :param parameters: The create or update parameters for python package. Is either a + PythonPackageCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -291,7 +303,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -319,8 +331,9 @@ async def create_or_update( 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,6 +371,9 @@ async def update( ) -> _models.Module: """Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -388,6 +404,9 @@ async def update( ) -> _models.Module: """Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -416,14 +435,17 @@ async def update( ) -> _models.Module: """Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The update parameters for python package. Is either a model type or a IO - type. Required. + :param parameters: The update parameters for python package. Is either a + PythonPackageUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -444,7 +466,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -472,8 +494,9 @@ async def update( 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 @@ -500,6 +523,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Module"]: """Retrieve a list of python 2 packages. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -512,7 +538,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None) error_map = { @@ -555,8 +581,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_operations.py index eb2d17821588..81532313d09c 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_python3_package_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the python 3 package by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -92,7 +90,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -108,8 +106,9 @@ async def delete( # 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 @@ -132,6 +131,9 @@ async def get( ) -> _models.Module: """Retrieve the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -154,7 +156,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Module] = kwargs.pop("cls", None) request = build_get_request( @@ -170,8 +172,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 @@ -205,6 +208,9 @@ async def create_or_update( ) -> _models.Module: """Create or Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -235,6 +241,9 @@ async def create_or_update( ) -> _models.Module: """Create or Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -263,14 +272,17 @@ async def create_or_update( ) -> _models.Module: """Create or Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The create or update parameters for python package. Is either a model type - or a IO type. Required. + :param parameters: The create or update parameters for python package. Is either a + PythonPackageCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -291,7 +303,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -319,8 +331,9 @@ async def create_or_update( 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,6 +371,9 @@ async def update( ) -> _models.Module: """Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -388,6 +404,9 @@ async def update( ) -> _models.Module: """Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -416,14 +435,17 @@ async def update( ) -> _models.Module: """Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The update parameters for python package. Is either a model type or a IO - type. Required. + :param parameters: The update parameters for python package. Is either a + PythonPackageUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -444,7 +466,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -472,8 +494,9 @@ async def update( 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 @@ -500,6 +523,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Module"]: """Retrieve a list of python 3 packages. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -512,7 +538,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None) error_map = { @@ -555,8 +581,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py index f2bab4dec2f3..9d79d122de2a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_draft_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, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast from azure.core.exceptions import ( @@ -36,10 +35,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -69,6 +64,9 @@ async def get_content( ) -> AsyncIterator[bytes]: """Retrieve the content of runbook draft identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -91,7 +89,7 @@ async def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) request = build_get_content_request( @@ -107,8 +105,9 @@ async def get_content( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -147,7 +146,7 @@ async def _replace_content_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[AsyncIterator[bytes]]] = kwargs.pop("cls", None) @@ -168,8 +167,9 @@ async def _replace_content_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -207,6 +207,9 @@ async def begin_replace_content( ) -> AsyncLROPoller[AsyncIterator[bytes]]: """Replaces the runbook draft content. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -231,7 +234,7 @@ async def begin_replace_content( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -286,6 +289,9 @@ async def get( ) -> _models.RunbookDraft: """Retrieve the runbook draft identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -308,7 +314,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.RunbookDraft] = kwargs.pop("cls", None) request = build_get_request( @@ -324,8 +330,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 @@ -352,6 +359,9 @@ async def undo_edit( ) -> _models.RunbookDraftUndoEditResult: """Undo draft edit to last known published state identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -374,7 +384,7 @@ async def undo_edit( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.RunbookDraftUndoEditResult] = kwargs.pop("cls", None) request = build_undo_edit_request( @@ -390,8 +400,9 @@ async def undo_edit( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py index 055eb0da6ab7..eb160d33c8a9 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_runbook_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, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -41,10 +40,6 @@ ) from .._vendor import AutomationClientMixinABC -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,7 +77,7 @@ async def _publish_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_publish_request( @@ -98,8 +93,9 @@ async def _publish_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 @@ -125,6 +121,9 @@ async def begin_publish( ) -> AsyncLROPoller[None]: """Publish runbook draft. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -146,7 +145,7 @@ async def begin_publish( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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) @@ -193,6 +192,9 @@ async def get_content( ) -> AsyncIterator[bytes]: """Retrieve the content of runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -215,7 +217,7 @@ async def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) request = build_get_content_request( @@ -231,8 +233,9 @@ async def get_content( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -258,6 +261,9 @@ async def get( ) -> _models.Runbook: """Retrieve the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -280,7 +286,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Runbook] = kwargs.pop("cls", None) request = build_get_request( @@ -296,8 +302,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 @@ -331,6 +338,9 @@ async def create_or_update( ) -> _models.Runbook: """Create the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -362,6 +372,9 @@ async def create_or_update( ) -> _models.Runbook: """Create the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -391,6 +404,9 @@ async def create_or_update( ) -> _models.Runbook: """Create the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -398,7 +414,8 @@ async def create_or_update( :param runbook_name: The runbook name. Required. :type runbook_name: str :param parameters: The create or update parameters for runbook. Provide either content link for - a published runbook or draft, not both. Is either a model type or a IO type. Required. + a published runbook or draft, not both. Is either a RunbookCreateOrUpdateParameters type or a + IO type. Required. :type parameters: ~azure.mgmt.automation.models.RunbookCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -419,7 +436,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Runbook] = kwargs.pop("cls", None) @@ -447,8 +464,9 @@ async def create_or_update( 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 @@ -486,6 +504,9 @@ async def update( ) -> _models.Runbook: """Update the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -516,6 +537,9 @@ async def update( ) -> _models.Runbook: """Update the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -544,14 +568,17 @@ async def update( ) -> _models.Runbook: """Update the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param runbook_name: The runbook name. Required. :type runbook_name: str - :param parameters: The update parameters for runbook. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for runbook. Is either a RunbookUpdateParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.RunbookUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -572,7 +599,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Runbook] = kwargs.pop("cls", None) @@ -600,8 +627,9 @@ async def update( 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 @@ -628,6 +656,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the runbook by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -650,7 +681,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -666,8 +697,9 @@ async def delete( # 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 @@ -690,6 +722,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Runbook"]: """Retrieve a list of runbooks. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -702,7 +737,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.RunbookListResult] = kwargs.pop("cls", None) error_map = { @@ -745,8 +780,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py index 7a3e4d38c12e..201851e45161 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_schedule_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +72,9 @@ async def create_or_update( ) -> Optional[_models.Schedule]: """Create a schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -108,6 +106,9 @@ async def create_or_update( ) -> Optional[_models.Schedule]: """Create a schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -137,6 +138,9 @@ async def create_or_update( ) -> Optional[_models.Schedule]: """Create a schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -144,7 +148,7 @@ async def create_or_update( :param schedule_name: The schedule name. Required. :type schedule_name: str :param parameters: The parameters supplied to the create or update schedule operation. Is - either a model type or a IO type. Required. + either a ScheduleCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ScheduleCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -165,7 +169,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Schedule]] = kwargs.pop("cls", None) @@ -193,8 +197,9 @@ async def create_or_update( 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,6 +238,9 @@ async def update( ) -> _models.Schedule: """Update the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -263,6 +271,9 @@ async def update( ) -> _models.Schedule: """Update the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -291,14 +302,17 @@ async def update( ) -> _models.Schedule: """Update the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param schedule_name: The schedule name. Required. :type schedule_name: str - :param parameters: The parameters supplied to the update schedule operation. Is either a model - type or a IO type. Required. + :param parameters: The parameters supplied to the update schedule operation. Is either a + ScheduleUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ScheduleUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -319,7 +333,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Schedule] = kwargs.pop("cls", None) @@ -347,8 +361,9 @@ async def update( 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 @@ -375,6 +390,9 @@ async def get( ) -> _models.Schedule: """Retrieve the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -397,7 +415,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Schedule] = kwargs.pop("cls", None) request = build_get_request( @@ -413,8 +431,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 @@ -441,6 +460,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -463,7 +485,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -479,8 +501,9 @@ async def delete( # 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 @@ -503,6 +526,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Schedule"]: """Retrieve a list of schedules. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -515,7 +541,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ScheduleListResult] = kwargs.pop("cls", None) error_map = { @@ -558,8 +584,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py index 5f715eec7678..2bac4e745d51 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_machine_runs_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 ( @@ -32,10 +31,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ async def get_by_id( ) -> _models.SoftwareUpdateConfigurationMachineRun: """Get a single software update configuration machine run by Id. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -95,7 +93,7 @@ async def get_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationMachineRun] = kwargs.pop("cls", None) request = build_get_by_id_request( @@ -112,8 +110,9 @@ async def get_by_id( 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 @@ -147,6 +146,9 @@ async def list( ) -> _models.SoftwareUpdateConfigurationMachineRunListResult: """Return list of software update configuration machine runs. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -178,7 +180,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationMachineRunListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -197,8 +199,9 @@ async def list( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py index 2e5dfb1846ab..1958bb04c584 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configuration_runs_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 ( @@ -29,10 +28,6 @@ from ...operations._software_update_configuration_runs_operations import build_get_by_id_request, build_list_request from .._vendor import AutomationClientMixinABC -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]] @@ -67,6 +62,9 @@ async def get_by_id( ) -> _models.SoftwareUpdateConfigurationRun: """Get a single software update configuration Run by Id. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationrunoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -92,7 +90,7 @@ async def get_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationRun] = kwargs.pop("cls", None) request = build_get_by_id_request( @@ -109,8 +107,9 @@ async def get_by_id( 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 @@ -144,6 +143,9 @@ async def list( ) -> _models.SoftwareUpdateConfigurationRunListResult: """Return list of software update configuration runs. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -175,7 +177,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationRunListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -194,8 +196,9 @@ async def list( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py index 38d44d4fb817..9491dc8c5152 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_software_update_configurations_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -34,10 +33,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +70,9 @@ async def create( ) -> _models.SoftwareUpdateConfiguration: """Create a new software update configuration with the name given in the URI. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -109,6 +107,9 @@ async def create( ) -> _models.SoftwareUpdateConfiguration: """Create a new software update configuration with the name given in the URI. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -141,6 +142,9 @@ async def create( ) -> _models.SoftwareUpdateConfiguration: """Create a new software update configuration with the name given in the URI. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -148,7 +152,8 @@ async def create( :param software_update_configuration_name: The name of the software update configuration to be created. Required. :type software_update_configuration_name: str - :param parameters: Request body. Is either a model type or a IO type. Required. + :param parameters: Request body. Is either a SoftwareUpdateConfiguration type or a IO type. + Required. :type parameters: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration or IO :param client_request_id: Identifies this specific client request. Default value is None. :type client_request_id: str @@ -171,7 +176,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None) @@ -200,8 +205,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 @@ -237,6 +243,9 @@ async def get_by_name( ) -> _models.SoftwareUpdateConfiguration: """Get a single software update configuration by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,7 +271,7 @@ async def get_by_name( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None) request = build_get_by_name_request( @@ -279,8 +288,9 @@ async def get_by_name( 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 @@ -312,6 +322,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """delete a specific software update configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -337,7 +350,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -354,8 +367,9 @@ async def delete( # 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 @@ -383,6 +397,9 @@ async def list( ) -> _models.SoftwareUpdateConfigurationListResult: """Get all software update configurations for the account. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -407,7 +424,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.SoftwareUpdateConfigurationListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -424,8 +441,9 @@ async def list( 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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py index 4b0b4776ffe5..2c6255d405d8 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +72,9 @@ async def create_or_update( ) -> _models.SourceControl: """Create a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -108,6 +106,9 @@ async def create_or_update( ) -> _models.SourceControl: """Create a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -137,6 +138,9 @@ async def create_or_update( ) -> _models.SourceControl: """Create a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -144,7 +148,7 @@ async def create_or_update( :param source_control_name: The source control name. Required. :type source_control_name: str :param parameters: The parameters supplied to the create or update source control operation. Is - either a model type or a IO type. Required. + either a SourceControlCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.SourceControlCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -165,7 +169,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None) @@ -193,8 +197,9 @@ async def create_or_update( 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 @@ -232,6 +237,9 @@ async def update( ) -> _models.SourceControl: """Update a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,6 +270,9 @@ async def update( ) -> _models.SourceControl: """Update a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -290,6 +301,9 @@ async def update( ) -> _models.SourceControl: """Update a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -297,7 +311,7 @@ async def update( :param source_control_name: The source control name. Required. :type source_control_name: str :param parameters: The parameters supplied to the update source control operation. Is either a - model type or a IO type. Required. + SourceControlUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.SourceControlUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -318,7 +332,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None) @@ -346,8 +360,9 @@ async def update( 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 @@ -374,6 +389,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -396,7 +414,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -412,8 +430,9 @@ async def delete( # 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 @@ -436,6 +455,9 @@ async def get( ) -> _models.SourceControl: """Retrieve the source control identified by source control name. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -458,7 +480,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None) request = build_get_request( @@ -474,8 +496,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 @@ -502,6 +525,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.SourceControl"]: """Retrieve a list of source controls. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -516,7 +542,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlListResult] = kwargs.pop("cls", None) error_map = { @@ -560,8 +586,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py index 51cee98812a5..c528c47cafed 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -35,10 +34,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -76,6 +71,9 @@ async def create( ) -> _models.SourceControlSyncJob: """Creates the sync job for a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -110,6 +108,9 @@ async def create( ) -> _models.SourceControlSyncJob: """Creates the sync job for a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -142,6 +143,9 @@ async def create( ) -> _models.SourceControlSyncJob: """Creates the sync job for a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -151,7 +155,7 @@ async def create( :param source_control_sync_job_id: The source control sync job id. Required. :type source_control_sync_job_id: str :param parameters: The parameters supplied to the create source control sync job operation. Is - either a model type or a IO type. Required. + either a SourceControlSyncJobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.SourceControlSyncJobCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -172,7 +176,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SourceControlSyncJob] = kwargs.pop("cls", None) @@ -201,8 +205,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 @@ -234,6 +239,9 @@ async def get( ) -> _models.SourceControlSyncJobById: """Retrieve the source control sync job identified by job id. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -258,7 +266,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobById] = kwargs.pop("cls", None) request = build_get_request( @@ -275,8 +283,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 @@ -308,6 +317,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.SourceControlSyncJob"]: """Retrieve a list of source control sync jobs. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -326,7 +338,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobListResult] = kwargs.pop("cls", None) error_map = { @@ -371,8 +383,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py index 42a2a6839152..94c9f5c59112 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_source_control_sync_job_streams_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -31,10 +30,6 @@ from ...operations._source_control_sync_job_streams_operations import build_get_request, build_list_by_sync_job_request from .._vendor import AutomationClientMixinABC -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]] @@ -70,6 +65,9 @@ def list_by_sync_job( ) -> AsyncIterable["_models.SourceControlSyncJobStream"]: """Retrieve a list of sync job streams identified by sync job id. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -90,7 +88,7 @@ def list_by_sync_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobStreamsListBySyncJob] = kwargs.pop("cls", None) error_map = { @@ -136,8 +134,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 @@ -166,6 +165,9 @@ async def get( ) -> _models.SourceControlSyncJobStreamById: """Retrieve a sync job stream identified by stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -192,7 +194,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobStreamById] = kwargs.pop("cls", None) request = build_get_request( @@ -210,8 +212,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py index 5ef85ee1ce1f..2fa6cdbaed82 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_statistics_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -30,10 +29,6 @@ from ...operations._statistics_operations import build_list_by_automation_account_request from .._vendor import AutomationClientMixinABC -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]] @@ -63,6 +58,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Statistics"]: """Retrieve the statistics for the account. + .. seealso:: + - http://aka.ms/azureautomationsdk/statisticsoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -77,7 +75,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.StatisticsListResult] = kwargs.pop("cls", None) error_map = { @@ -121,8 +119,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py index fabe9d8f9a29..864358af05e5 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -35,10 +34,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +70,9 @@ async def create( ) -> _models.TestJob: """Create a test job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -105,6 +103,9 @@ async def create( ) -> _models.TestJob: """Create a test job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -133,14 +134,17 @@ async def create( ) -> _models.TestJob: """Create a test job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param runbook_name: The parameters supplied to the create test job operation. Required. :type runbook_name: str - :param parameters: The parameters supplied to the create test job operation. Is either a model - type or a IO type. Required. + :param parameters: The parameters supplied to the create test job operation. Is either a + TestJobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.TestJobCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -161,7 +165,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestJob] = kwargs.pop("cls", None) @@ -189,8 +193,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 @@ -217,6 +222,9 @@ async def get( ) -> _models.TestJob: """Retrieve the test job for the specified runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -239,7 +247,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TestJob] = kwargs.pop("cls", None) request = build_get_request( @@ -255,8 +263,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 @@ -283,6 +292,9 @@ async def resume( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the test job. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -305,7 +317,7 @@ async def resume( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resume_request( @@ -321,8 +333,9 @@ async def resume( # 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 @@ -345,6 +358,9 @@ async def stop( # pylint: disable=inconsistent-return-statements ) -> None: """Stop the test job. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -367,7 +383,7 @@ async def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -383,8 +399,9 @@ async def stop( # 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 @@ -407,6 +424,9 @@ async def suspend( # pylint: disable=inconsistent-return-statements ) -> None: """Suspend the test job. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -429,7 +449,7 @@ async def suspend( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_suspend_request( @@ -445,8 +465,9 @@ async def suspend( # 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 diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py index 51075a4a0d03..3a55ca87c143 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_test_job_streams_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -31,10 +30,6 @@ from ...operations._test_job_streams_operations import build_get_request, build_list_by_test_job_request from .._vendor import AutomationClientMixinABC -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]] @@ -69,6 +64,9 @@ async def get( ) -> _models.JobStream: """Retrieve a test job stream of the test job identified by runbook name and stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -93,7 +91,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStream] = kwargs.pop("cls", None) request = build_get_request( @@ -110,8 +108,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 @@ -143,6 +142,9 @@ def list_by_test_job( ) -> AsyncIterable["_models.JobStream"]: """Retrieve a list of test job streams identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -159,7 +161,7 @@ def list_by_test_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None) error_map = { @@ -204,8 +206,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py index 52a873ca2ef7..fba06abde76a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_usages_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 from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -30,10 +29,6 @@ from ...operations._usages_operations import build_list_by_automation_account_request from .._vendor import AutomationClientMixinABC -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]] @@ -63,6 +58,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Usage"]: """Retrieve the usage for the account id. + .. seealso:: + - http://aka.ms/azureautomationsdk/usageoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -75,7 +73,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None) error_map = { @@ -118,8 +116,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py index bb54df1bd302..4c3526136cf0 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_variable_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +72,9 @@ async def create_or_update( ) -> _models.Variable: """Create a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -108,6 +106,9 @@ async def create_or_update( ) -> _models.Variable: """Create a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -137,6 +138,9 @@ async def create_or_update( ) -> _models.Variable: """Create a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -144,7 +148,7 @@ async def create_or_update( :param variable_name: The variable name. Required. :type variable_name: str :param parameters: The parameters supplied to the create or update variable operation. Is - either a model type or a IO type. Required. + either a VariableCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.VariableCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -165,7 +169,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Variable] = kwargs.pop("cls", None) @@ -193,8 +197,9 @@ async def create_or_update( 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 @@ -232,6 +237,9 @@ async def update( ) -> _models.Variable: """Update a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,6 +270,9 @@ async def update( ) -> _models.Variable: """Update a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -290,14 +301,17 @@ async def update( ) -> _models.Variable: """Update a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param variable_name: The variable name. Required. :type variable_name: str - :param parameters: The parameters supplied to the update variable operation. Is either a model - type or a IO type. Required. + :param parameters: The parameters supplied to the update variable operation. Is either a + VariableUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.VariableUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -318,7 +332,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Variable] = kwargs.pop("cls", None) @@ -346,8 +360,9 @@ async def update( 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 @@ -374,6 +389,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -396,7 +414,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -412,8 +430,9 @@ async def delete( # 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 @@ -436,6 +455,9 @@ async def get( ) -> _models.Variable: """Retrieve the variable identified by variable name. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -458,7 +480,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Variable] = kwargs.pop("cls", None) request = build_get_request( @@ -474,8 +496,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 @@ -502,6 +525,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Variable"]: """Retrieve a list of variables. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -514,7 +540,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -557,8 +583,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py index 4dea29785374..13ac4d01d37f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_watcher_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -39,10 +38,6 @@ ) from .._vendor import AutomationClientMixinABC -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,6 +74,9 @@ async def create_or_update( ) -> _models.Watcher: """Create the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -109,6 +107,9 @@ async def create_or_update( ) -> _models.Watcher: """Create the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -137,14 +138,17 @@ async def create_or_update( ) -> _models.Watcher: """Create the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param watcher_name: The watcher name. Required. :type watcher_name: str - :param parameters: The create or update parameters for watcher. Is either a model type or a IO - type. Required. + :param parameters: The create or update parameters for watcher. Is either a Watcher type or a + IO type. Required. :type parameters: ~azure.mgmt.automation.models.Watcher or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -165,9 +169,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Watcher] = kwargs.pop("cls", None) @@ -195,8 +197,9 @@ async def create_or_update( 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 @@ -227,6 +230,9 @@ async def get( ) -> _models.Watcher: """Retrieve the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -249,9 +255,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.Watcher] = kwargs.pop("cls", None) request = build_get_request( @@ -267,8 +271,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 @@ -302,6 +307,9 @@ async def update( ) -> _models.Watcher: """Update the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -332,6 +340,9 @@ async def update( ) -> _models.Watcher: """Update the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -360,14 +371,17 @@ async def update( ) -> _models.Watcher: """Update the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param watcher_name: The watcher name. Required. :type watcher_name: str - :param parameters: The update parameters for watcher. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for watcher. Is either a WatcherUpdateParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.WatcherUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -388,9 +402,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Watcher] = kwargs.pop("cls", None) @@ -418,8 +430,9 @@ async def update( 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 @@ -446,6 +459,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the watcher by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -468,9 +484,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -486,8 +500,9 @@ async def delete( # 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 @@ -510,6 +525,9 @@ async def start( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -532,9 +550,7 @@ async def start( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -550,8 +566,9 @@ async def start( # 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 @@ -574,6 +591,9 @@ async def stop( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -596,9 +616,7 @@ async def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -614,8 +632,9 @@ async def stop( # 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 @@ -638,6 +657,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Watcher"]: """Retrieve a list of watchers. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -652,9 +674,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.WatcherListResult] = kwargs.pop("cls", None) error_map = { @@ -698,8 +718,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/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py index ef4c7b057bff..c84638efed9f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/aio/operations/_webhook_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, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -38,10 +37,6 @@ ) from .._vendor import AutomationClientMixinABC -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]] @@ -69,6 +64,9 @@ def __init__(self, *args, **kwargs) -> None: async def generate_uri(self, resource_group_name: str, automation_account_name: str, **kwargs: Any) -> str: """Generates a Uri for use in creating a webhook. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -89,7 +87,7 @@ async def generate_uri(self, resource_group_name: str, automation_account_name: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[str] = kwargs.pop("cls", None) request = build_generate_uri_request( @@ -104,8 +102,9 @@ async def generate_uri(self, resource_group_name: str, automation_account_name: 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 @@ -132,6 +131,9 @@ async def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the webhook by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -154,7 +156,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -170,8 +172,9 @@ async def delete( # 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 @@ -194,6 +197,9 @@ async def get( ) -> _models.Webhook: """Retrieve the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -216,7 +222,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) request = build_get_request( @@ -232,8 +238,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 @@ -267,6 +274,9 @@ async def create_or_update( ) -> _models.Webhook: """Create the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -297,6 +307,9 @@ async def create_or_update( ) -> _models.Webhook: """Create the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -325,14 +338,17 @@ async def create_or_update( ) -> _models.Webhook: """Create the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param webhook_name: The webhook name. Required. :type webhook_name: str - :param parameters: The create or update parameters for webhook. Is either a model type or a IO - type. Required. + :param parameters: The create or update parameters for webhook. Is either a + WebhookCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.WebhookCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -353,7 +369,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) @@ -381,8 +397,9 @@ async def create_or_update( 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 @@ -420,6 +437,9 @@ async def update( ) -> _models.Webhook: """Update the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -450,6 +470,9 @@ async def update( ) -> _models.Webhook: """Update the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -478,14 +501,17 @@ async def update( ) -> _models.Webhook: """Update the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param webhook_name: The webhook name. Required. :type webhook_name: str - :param parameters: The update parameters for webhook. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for webhook. Is either a WebhookUpdateParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.WebhookUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -506,7 +532,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) @@ -534,8 +560,9 @@ async def update( 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 @@ -562,6 +589,9 @@ def list_by_automation_account( ) -> AsyncIterable["_models.Webhook"]: """Retrieve a list of webhooks. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -576,7 +606,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[_models.WebhookListResult] = kwargs.pop("cls", None) error_map = { @@ -620,8 +650,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/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py index f1305838c80d..d1b234768c1e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_automation_client_enums.py @@ -141,6 +141,7 @@ class HttpStatusCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): SERVICE_UNAVAILABLE = "ServiceUnavailable" GATEWAY_TIMEOUT = "GatewayTimeout" HTTP_VERSION_NOT_SUPPORTED = "HttpVersionNotSupported" + CONTINUE_ENUM = "Continue" class JobProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -279,8 +280,8 @@ class ScheduleFrequency(str, Enum, metaclass=CaseInsensitiveEnumMeta): HOUR = "Hour" WEEK = "Week" MONTH = "Month" - #: The minimum allowed interval for Minute schedules is 15 minutes. MINUTE = "Minute" + """The minimum allowed interval for Minute schedules is 15 minutes.""" class SkuNameEnum(str, Enum, metaclass=CaseInsensitiveEnumMeta): diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py index eab718b16728..55ff5316a54d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/models/_models_py3.py @@ -76,8 +76,8 @@ def __init__( creation_time: Optional[datetime.datetime] = None, last_modified_time: Optional[datetime.datetime] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: Gets or sets the id of the resource. :paramtype id: str @@ -119,7 +119,9 @@ class ActivityListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Activity"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Activity"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of activities. :paramtype value: list[~azure.mgmt.automation.models.Activity] @@ -145,7 +147,7 @@ class ActivityOutputType(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the activity output type. :paramtype name: str @@ -218,8 +220,8 @@ def __init__( value_from_remaining_arguments: Optional[bool] = None, description: Optional[str] = None, validation_set: Optional[List["_models.ActivityParameterValidationSet"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the activity parameter. :paramtype name: str @@ -281,8 +283,12 @@ class ActivityParameterSet(_serialization.Model): } def __init__( - self, *, name: Optional[str] = None, parameters: Optional[List["_models.ActivityParameter"]] = None, **kwargs - ): + self, + *, + name: Optional[str] = None, + parameters: Optional[List["_models.ActivityParameter"]] = None, + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the activity parameter set. :paramtype name: str @@ -305,7 +311,7 @@ class ActivityParameterValidationSet(_serialization.Model): "member_value": {"key": "memberValue", "type": "str"}, } - def __init__(self, *, member_value: Optional[str] = None, **kwargs): + def __init__(self, *, member_value: Optional[str] = None, **kwargs: Any) -> None: """ :keyword member_value: Gets or sets the name of the activity parameter validation set member. :paramtype member_value: str @@ -338,8 +344,8 @@ def __init__( week_days: Optional[List[str]] = None, month_days: Optional[List[int]] = None, monthly_occurrences: Optional[List["_models.AdvancedScheduleMonthlyOccurrence"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword week_days: Days of the week that the job should execute on. :paramtype week_days: list[str] @@ -373,8 +379,12 @@ class AdvancedScheduleMonthlyOccurrence(_serialization.Model): } def __init__( - self, *, occurrence: Optional[int] = None, day: Optional[Union[str, "_models.ScheduleDay"]] = None, **kwargs - ): + self, + *, + occurrence: Optional[int] = None, + day: Optional[Union[str, "_models.ScheduleDay"]] = None, + **kwargs: Any + ) -> None: """ :keyword occurrence: Occurrence of the week within the month. Must be between 1 and 5. :paramtype occurrence: int @@ -415,8 +425,8 @@ def __init__( endpoint: Optional[str] = None, keys: Optional["_models.AgentRegistrationKeys"] = None, id: Optional[str] = None, # pylint: disable=redefined-builtin - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword dsc_meta_configuration: Gets or sets the dsc meta configuration. :paramtype dsc_meta_configuration: str @@ -448,7 +458,7 @@ class AgentRegistrationKeys(_serialization.Model): "secondary": {"key": "secondary", "type": "str"}, } - def __init__(self, *, primary: Optional[str] = None, secondary: Optional[str] = None, **kwargs): + def __init__(self, *, primary: Optional[str] = None, secondary: Optional[str] = None, **kwargs: Any) -> None: """ :keyword primary: Gets or sets the primary key. :paramtype primary: str @@ -478,7 +488,7 @@ class AgentRegistrationRegenerateKeyParameter(_serialization.Model): "key_name": {"key": "keyName", "type": "str"}, } - def __init__(self, *, key_name: Union[str, "_models.AgentRegistrationKeyName"], **kwargs): + def __init__(self, *, key_name: Union[str, "_models.AgentRegistrationKeyName"], **kwargs: Any) -> None: """ :keyword key_name: Gets or sets the agent registration key name - primary or secondary. Required. Known values are: "primary" and "secondary". @@ -513,7 +523,7 @@ class Resource(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -552,7 +562,7 @@ class TrackedResource(Resource): "location": {"key": "location", "type": "str"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, **kwargs: Any) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -663,8 +673,8 @@ def __init__( public_network_access: Optional[bool] = None, disable_local_auth: Optional[bool] = None, automation_hybrid_service_url: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -757,8 +767,8 @@ def __init__( encryption: Optional["_models.EncryptionProperties"] = None, public_network_access: Optional[bool] = None, disable_local_auth: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets name of the resource. :paramtype name: str @@ -805,8 +815,12 @@ class AutomationAccountListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.AutomationAccount"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.AutomationAccount"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets list of accounts. :paramtype value: list[~azure.mgmt.automation.models.AutomationAccount] @@ -862,8 +876,8 @@ def __init__( encryption: Optional["_models.EncryptionProperties"] = None, public_network_access: Optional[bool] = None, disable_local_auth: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the resource. :paramtype name: str @@ -918,8 +932,8 @@ def __init__( scope: Optional[List[str]] = None, locations: Optional[List[str]] = None, tag_settings: Optional["_models.TagSettingsProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword scope: List of Subscription or Resource Group ARM Ids. :paramtype scope: list[str] @@ -959,7 +973,7 @@ class ProxyResource(Resource): "type": {"key": "type", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) @@ -1012,7 +1026,7 @@ class Certificate(ProxyResource): "description": {"key": "properties.description", "type": "str"}, } - def __init__(self, *, description: Optional[str] = None, **kwargs): + def __init__(self, *, description: Optional[str] = None, **kwargs: Any) -> None: """ :keyword description: Gets or sets the description. :paramtype description: str @@ -1064,8 +1078,8 @@ def __init__( description: Optional[str] = None, thumbprint: Optional[str] = None, is_exportable: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the certificate. Required. :paramtype name: str @@ -1101,8 +1115,8 @@ class CertificateListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Certificate"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.Certificate"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of certificates. :paramtype value: list[~azure.mgmt.automation.models.Certificate] @@ -1128,7 +1142,7 @@ class CertificateUpdateParameters(_serialization.Model): "description": {"key": "properties.description", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, description: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, description: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the certificate. :paramtype name: str @@ -1188,8 +1202,8 @@ def __init__( *, connection_type: Optional["_models.ConnectionTypeAssociationProperty"] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword connection_type: Gets or sets the connectionType of the connection. :paramtype connection_type: ~azure.mgmt.automation.models.ConnectionTypeAssociationProperty @@ -1238,8 +1252,8 @@ def __init__( connection_type: "_models.ConnectionTypeAssociationProperty", description: Optional[str] = None, field_definition_values: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the connection. Required. :paramtype name: str @@ -1273,8 +1287,8 @@ class ConnectionListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Connection"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.Connection"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of connection. :paramtype value: list[~azure.mgmt.automation.models.Connection] @@ -1334,8 +1348,8 @@ def __init__( is_global: Optional[bool] = None, last_modified_time: Optional[datetime.datetime] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword is_global: Gets or sets a Boolean value to indicate if the connection type is global. :paramtype is_global: bool @@ -1366,7 +1380,7 @@ class ConnectionTypeAssociationProperty(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the connection type. :paramtype name: str @@ -1405,8 +1419,8 @@ def __init__( name: str, field_definitions: Dict[str, "_models.FieldDefinition"], is_global: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the connection type. Required. :paramtype name: str @@ -1437,8 +1451,8 @@ class ConnectionTypeListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.ConnectionType"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.ConnectionType"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of connection types. :paramtype value: list[~azure.mgmt.automation.models.ConnectionType] @@ -1473,8 +1487,8 @@ def __init__( name: Optional[str] = None, description: Optional[str] = None, field_definition_values: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the connection. :paramtype name: str @@ -1510,7 +1524,7 @@ class ContentHash(_serialization.Model): "value": {"key": "value", "type": "str"}, } - def __init__(self, *, algorithm: str, value: str, **kwargs): + def __init__(self, *, algorithm: str, value: str, **kwargs: Any) -> None: """ :keyword algorithm: Gets or sets the content hash algorithm used to hash the content. Required. :paramtype algorithm: str @@ -1545,8 +1559,8 @@ def __init__( uri: Optional[str] = None, content_hash: Optional["_models.ContentHash"] = None, version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword uri: Gets or sets the uri of the runbook content. :paramtype uri: str @@ -1589,8 +1603,8 @@ def __init__( type: Optional[Union[str, "_models.ContentSourceType"]] = None, value: Optional[str] = None, version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword hash: Gets or sets the hash. :paramtype hash: ~azure.mgmt.automation.models.ContentHash @@ -1650,7 +1664,7 @@ class Credential(ProxyResource): "description": {"key": "properties.description", "type": "str"}, } - def __init__(self, *, description: Optional[str] = None, **kwargs): + def __init__(self, *, description: Optional[str] = None, **kwargs: Any) -> None: """ :keyword description: Gets or sets the description. :paramtype description: str @@ -1690,7 +1704,9 @@ class CredentialCreateOrUpdateParameters(_serialization.Model): "description": {"key": "properties.description", "type": "str"}, } - def __init__(self, *, name: str, user_name: str, password: str, description: Optional[str] = None, **kwargs): + def __init__( + self, *, name: str, user_name: str, password: str, description: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the credential. Required. :paramtype name: str @@ -1723,8 +1739,8 @@ class CredentialListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.Credential"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.Credential"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of credentials. :paramtype value: list[~azure.mgmt.automation.models.Credential] @@ -1763,8 +1779,8 @@ def __init__( user_name: Optional[str] = None, password: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the credential. :paramtype name: str @@ -1830,8 +1846,8 @@ def __init__( automation_account_resource_id: Optional[str] = None, automation_account_id: Optional[str] = None, location_properties_location: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The resource id. :paramtype id: str @@ -1870,7 +1886,7 @@ class DeletedAutomationAccountListResult(_serialization.Model): "value": {"key": "value", "type": "[DeletedAutomationAccount]"}, } - def __init__(self, *, value: Optional[List["_models.DeletedAutomationAccount"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.DeletedAutomationAccount"]] = None, **kwargs: Any) -> None: """ :keyword value: Gets or sets the list of deleted automation accounts. :paramtype value: list[~azure.mgmt.automation.models.DeletedAutomationAccount] @@ -1893,7 +1909,7 @@ class Dimension(_serialization.Model): "display_name": {"key": "displayName", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, display_name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, display_name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: The name of the dimension. :paramtype name: str @@ -1993,8 +2009,8 @@ def __init__( status: Optional[Union[str, "_models.JobStatus"]] = None, status_details: Optional[str] = None, parameters: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword configuration: Gets or sets the configuration. :paramtype configuration: ~azure.mgmt.automation.models.DscConfigurationAssociationProperty @@ -2072,8 +2088,8 @@ def __init__( tags: Optional[Dict[str, str]] = None, parameters: Optional[Dict[str, str]] = None, increment_node_configuration_build: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets name of the resource. :paramtype name: str @@ -2113,8 +2129,12 @@ class DscCompilationJobListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.DscCompilationJob"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.DscCompilationJob"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of Dsc Compilation jobs. :paramtype value: list[~azure.mgmt.automation.models.DscCompilationJob] @@ -2208,8 +2228,8 @@ def __init__( last_modified_time: Optional[datetime.datetime] = None, node_configuration_count: Optional[int] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -2265,7 +2285,7 @@ class DscConfigurationAssociationProperty(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the Dsc configuration. :paramtype name: str @@ -2323,8 +2343,8 @@ def __init__( log_progress: Optional[bool] = None, parameters: Optional[Dict[str, "_models.DscConfigurationParameter"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets name of the resource. :paramtype name: str @@ -2377,8 +2397,8 @@ def __init__( value: Optional[List["_models.DscConfiguration"]] = None, next_link: Optional[str] = None, total_count: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of configurations. :paramtype value: list[~azure.mgmt.automation.models.DscConfiguration] @@ -2421,8 +2441,8 @@ def __init__( is_mandatory: Optional[bool] = None, position: Optional[int] = None, default_value: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: Gets or sets the type of the parameter. :paramtype type: str @@ -2480,8 +2500,8 @@ def __init__( source: Optional["_models.ContentSource"] = None, parameters: Optional[Dict[str, "_models.DscConfigurationParameter"]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets name of the resource. :paramtype name: str @@ -2551,8 +2571,8 @@ def __init__( certificate_id: Optional[str] = None, refresh_frequency_mins: Optional[int] = None, allow_module_overwrite: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword configuration_mode_frequency_mins: Gets or sets the ConfigurationModeFrequencyMins value of the meta configuration. @@ -2658,8 +2678,8 @@ def __init__( total_count: Optional[int] = None, extension_handler: Optional[List["_models.DscNodeExtensionHandlerAssociationProperty"]] = None, name_properties_node_configuration_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword last_seen: Gets or sets the last seen time of the node. :paramtype last_seen: ~datetime.datetime @@ -2750,8 +2770,8 @@ def __init__( source: Optional[str] = None, node_count: Optional[int] = None, increment_node_configuration_build: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword last_modified_time: Gets or sets the last modified time. :paramtype last_modified_time: ~datetime.datetime @@ -2808,8 +2828,8 @@ def __init__( source: Optional["_models.ContentSource"] = None, configuration: Optional["_models.DscConfigurationAssociationProperty"] = None, increment_node_configuration_build: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Name of the node configuration. :paramtype name: str @@ -2854,8 +2874,8 @@ def __init__( value: Optional[List["_models.DscNodeConfiguration"]] = None, next_link: Optional[str] = None, total_count: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of Dsc node configurations. :paramtype value: list[~azure.mgmt.automation.models.DscNodeConfiguration] @@ -2884,7 +2904,7 @@ class DscNodeExtensionHandlerAssociationProperty(_serialization.Model): "version": {"key": "version", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, version: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, version: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the extension handler. :paramtype name: str @@ -2919,8 +2939,8 @@ def __init__( value: Optional[List["_models.DscNode"]] = None, next_link: Optional[str] = None, total_count: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of dsc nodes. :paramtype value: list[~azure.mgmt.automation.models.DscNode] @@ -3023,8 +3043,8 @@ def __init__( i_pv6_addresses: Optional[List[str]] = None, number_of_resources: Optional[int] = None, raw_errors: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword end_time: Gets or sets the end time of the node report. :paramtype end_time: ~datetime.datetime @@ -3103,8 +3123,8 @@ class DscNodeReportListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.DscNodeReport"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.DscNodeReport"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of dsc node reports. :paramtype value: list[~azure.mgmt.automation.models.DscNodeReport] @@ -3135,8 +3155,8 @@ def __init__( *, node_id: Optional[str] = None, properties: Optional["_models.DscNodeUpdateParametersProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword node_id: Gets or sets the id of the dsc node. :paramtype node_id: str @@ -3159,7 +3179,7 @@ class DscNodeUpdateParametersProperties(_serialization.Model): "name": {"key": "nodeConfiguration.name", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the dsc node configuration. :paramtype name: str @@ -3203,8 +3223,8 @@ def __init__( error_message: Optional[str] = None, locale: Optional[str] = None, error_details: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword error_source: Gets or sets the source of the error. :paramtype error_source: str @@ -3280,8 +3300,8 @@ def __init__( status: Optional[str] = None, duration_in_seconds: Optional[float] = None, start_date: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword resource_id: Gets or sets the ID of the resource. :paramtype resource_id: str @@ -3329,7 +3349,7 @@ class DscReportResourceNavigation(_serialization.Model): "resource_id": {"key": "resourceId", "type": "str"}, } - def __init__(self, *, resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword resource_id: Gets or sets the ID of the resource to navigate to. :paramtype resource_id: str @@ -3362,8 +3382,8 @@ def __init__( key_vault_properties: Optional["_models.KeyVaultProperties"] = None, key_source: Optional[Union[str, "_models.EncryptionKeySourceType"]] = None, identity: Optional["_models.EncryptionPropertiesIdentity"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword key_vault_properties: Key vault properties. :paramtype key_vault_properties: ~azure.mgmt.automation.models.KeyVaultProperties @@ -3392,7 +3412,7 @@ class EncryptionPropertiesIdentity(_serialization.Model): "user_assigned_identity": {"key": "userAssignedIdentity", "type": "object"}, } - def __init__(self, *, user_assigned_identity: Optional[JSON] = None, **kwargs): + def __init__(self, *, user_assigned_identity: Optional[JSON] = None, **kwargs: Any) -> None: """ :keyword user_assigned_identity: The user identity used for CMK. It will be an ARM resource id in the form: @@ -3417,7 +3437,7 @@ class ErrorResponse(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None: """ :keyword code: Error code. :paramtype code: str @@ -3452,7 +3472,9 @@ class FieldDefinition(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, type: str, is_encrypted: Optional[bool] = None, is_optional: Optional[bool] = None, **kwargs): + def __init__( + self, *, type: str, is_encrypted: Optional[bool] = None, is_optional: Optional[bool] = None, **kwargs: Any + ) -> None: """ :keyword is_encrypted: Gets or sets the isEncrypted flag of the connection field definition. :paramtype is_encrypted: bool @@ -3486,8 +3508,8 @@ def __init__( *, raw_content: Optional["_models.RawGraphicalRunbookContent"] = None, graph_runbook_json: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword raw_content: Raw graphical Runbook content. :paramtype raw_content: ~azure.mgmt.automation.models.RawGraphicalRunbookContent @@ -3555,8 +3577,8 @@ def __init__( vm_resource_id: Optional[str] = None, worker_type: Optional[Union[str, "_models.WorkerType"]] = None, worker_name: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword ip: Gets or sets the assigned machine IP address. :paramtype ip: str @@ -3595,7 +3617,7 @@ class HybridRunbookWorkerCreateParameters(_serialization.Model): "vm_resource_id": {"key": "properties.vmResourceId", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, vm_resource_id: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, vm_resource_id: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the resource. :paramtype name: str @@ -3647,8 +3669,8 @@ def __init__( *, group_type: Optional[Union[str, "_models.GroupTypeEnum"]] = None, credential: Optional["_models.RunAsCredentialAssociationProperty"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword group_type: Type of the HybridWorkerGroup. Known values are: "User" and "System". :paramtype group_type: str or ~azure.mgmt.automation.models.GroupTypeEnum @@ -3680,8 +3702,8 @@ def __init__( *, name: Optional[str] = None, credential: Optional["_models.RunAsCredentialAssociationProperty"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the resource. :paramtype name: str @@ -3712,8 +3734,8 @@ def __init__( *, value: Optional[List["_models.HybridRunbookWorkerGroup"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of hybrid runbook worker groups. :paramtype value: list[~azure.mgmt.automation.models.HybridRunbookWorkerGroup] @@ -3736,7 +3758,7 @@ class HybridRunbookWorkerMoveParameters(_serialization.Model): "hybrid_runbook_worker_group_name": {"key": "hybridRunbookWorkerGroupName", "type": "str"}, } - def __init__(self, *, hybrid_runbook_worker_group_name: Optional[str] = None, **kwargs): + def __init__(self, *, hybrid_runbook_worker_group_name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword hybrid_runbook_worker_group_name: Gets or sets the target hybrid runbook worker group. :paramtype hybrid_runbook_worker_group_name: str @@ -3760,8 +3782,12 @@ class HybridRunbookWorkersListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.HybridRunbookWorker"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.HybridRunbookWorker"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of hybrid runbook workers. :paramtype value: list[~azure.mgmt.automation.models.HybridRunbookWorker] @@ -3809,8 +3835,8 @@ def __init__( *, type: Optional[Union[str, "_models.ResourceIdentityType"]] = None, user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentitiesProperties"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: The identity type. Known values are: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", and "None". @@ -3916,8 +3942,8 @@ def __init__( last_status_modified_time: Optional[datetime.datetime] = None, parameters: Optional[Dict[str, str]] = None, provisioning_state: Optional[Union[str, "_models.JobProvisioningState"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword runbook: Gets or sets the runbook. :paramtype runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty @@ -4031,7 +4057,7 @@ class JobCollectionItem(ProxyResource): # pylint: disable=too-many-instance-att "run_on": {"key": "properties.runOn", "type": "str"}, } - def __init__(self, *, run_on: Optional[str] = None, **kwargs): + def __init__(self, *, run_on: Optional[str] = None, **kwargs: Any) -> None: """ :keyword run_on: Specifies the runOn group name where the job was executed. :paramtype run_on: str @@ -4072,8 +4098,8 @@ def __init__( runbook: Optional["_models.RunbookAssociationProperty"] = None, parameters: Optional[Dict[str, str]] = None, run_on: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword runbook: Gets or sets the runbook. :paramtype runbook: ~azure.mgmt.automation.models.RunbookAssociationProperty @@ -4109,7 +4135,7 @@ class JobListResultV2(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.JobCollectionItem"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.JobCollectionItem"]] = None, **kwargs: Any) -> None: """ :keyword value: List of jobs. :paramtype value: list[~azure.mgmt.automation.models.JobCollectionItem] @@ -4136,7 +4162,7 @@ class JobNavigation(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -4190,8 +4216,8 @@ def __init__( runbook: Optional["_models.RunbookAssociationProperty"] = None, run_on: Optional[str] = None, parameters: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword job_schedule_id: Gets or sets the id of job schedule. :paramtype job_schedule_id: str @@ -4249,8 +4275,8 @@ def __init__( runbook: "_models.RunbookAssociationProperty", run_on: Optional[str] = None, parameters: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword schedule: Gets or sets the schedule. Required. :paramtype schedule: ~azure.mgmt.automation.models.ScheduleAssociationProperty @@ -4283,8 +4309,8 @@ class JobScheduleListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.JobSchedule"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.JobSchedule"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of job schedules. :paramtype value: list[~azure.mgmt.automation.models.JobSchedule] @@ -4336,8 +4362,8 @@ def __init__( stream_text: Optional[str] = None, summary: Optional[str] = None, value: Optional[Dict[str, JSON]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: Gets or sets the id of the resource. :paramtype id: str @@ -4379,7 +4405,9 @@ class JobStreamListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.JobStream"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.JobStream"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: A list of job streams. :paramtype value: list[~azure.mgmt.automation.models.JobStream] @@ -4416,7 +4444,7 @@ class Key(_serialization.Model): "value": {"key": "Value", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.key_name = None @@ -4435,7 +4463,7 @@ class KeyListResult(_serialization.Model): "keys": {"key": "keys", "type": "[Key]"}, } - def __init__(self, *, keys: Optional[List["_models.Key"]] = None, **kwargs): + def __init__(self, *, keys: Optional[List["_models.Key"]] = None, **kwargs: Any) -> None: """ :keyword keys: Lists the automation keys. :paramtype keys: list[~azure.mgmt.automation.models.Key] @@ -4467,8 +4495,8 @@ def __init__( keyvault_uri: Optional[str] = None, key_name: Optional[str] = None, key_version: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword keyvault_uri: The URI of the key vault key used to encrypt data. :paramtype keyvault_uri: str @@ -4500,7 +4528,7 @@ class LinkedWorkspace(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.id = None @@ -4535,8 +4563,8 @@ def __init__( excluded_package_name_masks: Optional[List[str]] = None, included_package_name_masks: Optional[List[str]] = None, reboot_setting: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword included_package_classifications: Update classifications included in the software update configuration. Known values are: "Unclassified", "Critical", "Security", and "Other". @@ -4579,8 +4607,8 @@ def __init__( name: Optional[str] = None, display_name: Optional[str] = None, blob_duration: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the specification. :paramtype name: str @@ -4630,8 +4658,8 @@ def __init__( unit: Optional[str] = None, aggregation_type: Optional[str] = None, dimensions: Optional[List["_models.Dimension"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: The name of the metric. :paramtype name: str @@ -4743,8 +4771,8 @@ def __init__( last_modified_time: Optional[datetime.datetime] = None, description: Optional[str] = None, is_composite: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -4827,8 +4855,8 @@ def __init__( name: Optional[str] = None, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets name of the resource. :paramtype name: str @@ -4860,7 +4888,7 @@ class ModuleErrorInfo(_serialization.Model): "message": {"key": "message", "type": "str"}, } - def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs): + def __init__(self, *, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any) -> None: """ :keyword code: Gets or sets the error code. :paramtype code: str @@ -4886,7 +4914,9 @@ class ModuleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Module"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Module"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of modules. :paramtype value: list[~azure.mgmt.automation.models.Module] @@ -4925,8 +4955,8 @@ def __init__( location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, content_link: Optional["_models.ContentLink"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets name of the resource. :paramtype name: str @@ -4959,8 +4989,8 @@ class NodeCount(_serialization.Model): } def __init__( - self, *, name: Optional[str] = None, properties: Optional["_models.NodeCountProperties"] = None, **kwargs - ): + self, *, name: Optional[str] = None, properties: Optional["_models.NodeCountProperties"] = None, **kwargs: Any + ) -> None: """ :keyword name: Gets the name of a count type. :paramtype name: str @@ -4983,7 +5013,7 @@ class NodeCountProperties(_serialization.Model): "count": {"key": "count", "type": "int"}, } - def __init__(self, *, count: Optional[int] = None, **kwargs): + def __init__(self, *, count: Optional[int] = None, **kwargs: Any) -> None: """ :keyword count: Gets the count for the name. :paramtype count: int @@ -5007,8 +5037,8 @@ class NodeCounts(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.NodeCount"]] = None, total_count: Optional[int] = None, **kwargs - ): + self, *, value: Optional[List["_models.NodeCount"]] = None, total_count: Optional[int] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets an array of counts. :paramtype value: list[~azure.mgmt.automation.models.NodeCount] @@ -5034,7 +5064,9 @@ class NonAzureQueryProperties(_serialization.Model): "workspace_id": {"key": "workspaceId", "type": "str"}, } - def __init__(self, *, function_alias: Optional[str] = None, workspace_id: Optional[str] = None, **kwargs): + def __init__( + self, *, function_alias: Optional[str] = None, workspace_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword function_alias: Log Analytics Saved Search name. :paramtype function_alias: str @@ -5077,8 +5109,8 @@ def __init__( display: Optional["_models.OperationDisplay"] = None, origin: Optional[str] = None, service_specification: Optional["_models.OperationPropertiesFormatServiceSpecification"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Operation name: {provider}/{resource}/{operation}. :paramtype name: str @@ -5124,8 +5156,8 @@ def __init__( resource: Optional[str] = None, operation: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword provider: Service provider: Microsoft.Automation. :paramtype provider: str @@ -5154,7 +5186,7 @@ class OperationListResult(_serialization.Model): "value": {"key": "value", "type": "[Operation]"}, } - def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Operation"]] = None, **kwargs: Any) -> None: """ :keyword value: List of Automation operations supported by the Automation resource provider. :paramtype value: list[~azure.mgmt.automation.models.Operation] @@ -5182,8 +5214,8 @@ def __init__( *, metric_specifications: Optional[List["_models.MetricSpecification"]] = None, log_specifications: Optional[List["_models.LogSpecification"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword metric_specifications: Operation service specification. :paramtype metric_specifications: list[~azure.mgmt.automation.models.MetricSpecification] @@ -5240,8 +5272,8 @@ def __init__( private_endpoint: Optional["_models.PrivateEndpointProperty"] = None, group_ids: Optional[List[str]] = None, private_link_service_connection_state: Optional["_models.PrivateLinkServiceConnectionStateProperty"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword private_endpoint: Private endpoint which the connection belongs to. :paramtype private_endpoint: ~azure.mgmt.automation.models.PrivateEndpointProperty @@ -5269,7 +5301,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateEndpointConnection]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private endpoint connections. :paramtype value: list[~azure.mgmt.automation.models.PrivateEndpointConnection] @@ -5289,7 +5321,7 @@ class PrivateEndpointProperty(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, *, id: Optional[str] = None, **kwargs): # pylint: disable=redefined-builtin + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ :keyword id: Resource id of the private endpoint. :paramtype id: str @@ -5331,7 +5363,7 @@ class PrivateLinkResource(ProxyResource): "required_members": {"key": "properties.requiredMembers", "type": "[str]"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.group_id = None @@ -5349,7 +5381,7 @@ class PrivateLinkResourceListResult(_serialization.Model): "value": {"key": "value", "type": "[PrivateLinkResource]"}, } - def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private link resources. :paramtype value: list[~azure.mgmt.automation.models.PrivateLinkResource] @@ -5382,7 +5414,7 @@ class PrivateLinkServiceConnectionStateProperty(_serialization.Model): "actions_required": {"key": "actionsRequired", "type": "str"}, } - def __init__(self, *, status: Optional[str] = None, description: Optional[str] = None, **kwargs): + def __init__(self, *, status: Optional[str] = None, description: Optional[str] = None, **kwargs: Any) -> None: """ :keyword status: The private link service connection status. :paramtype status: str @@ -5415,7 +5447,9 @@ class PythonPackageCreateParameters(_serialization.Model): "content_link": {"key": "properties.contentLink", "type": "ContentLink"}, } - def __init__(self, *, content_link: "_models.ContentLink", tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__( + self, *, content_link: "_models.ContentLink", tags: Optional[Dict[str, str]] = None, **kwargs: Any + ) -> None: """ :keyword tags: Gets or sets the tags attached to the resource. :paramtype tags: dict[str, str] @@ -5438,7 +5472,7 @@ class PythonPackageUpdateParameters(_serialization.Model): "tags": {"key": "tags", "type": "{str}"}, } - def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs): + def __init__(self, *, tags: Optional[Dict[str, str]] = None, **kwargs: Any) -> None: """ :keyword tags: Gets or sets the tags attached to the resource. :paramtype tags: dict[str, str] @@ -5471,8 +5505,8 @@ def __init__( schema_version: Optional[str] = None, runbook_definition: Optional[str] = None, runbook_type: Optional[Union[str, "_models.GraphRunbookType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword schema_version: Schema version of the serializer. :paramtype schema_version: str @@ -5499,7 +5533,7 @@ class RunAsCredentialAssociationProperty(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the credential. :paramtype name: str @@ -5612,8 +5646,8 @@ def __init__( creation_time: Optional[datetime.datetime] = None, last_modified_time: Optional[datetime.datetime] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Resource tags. :paramtype tags: dict[str, str] @@ -5686,7 +5720,7 @@ class RunbookAssociationProperty(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the runbook. :paramtype name: str @@ -5712,7 +5746,7 @@ class RunbookCreateOrUpdateDraftParameters(_serialization.Model): "runbook_content": {"key": "runbookContent", "type": "str"}, } - def __init__(self, *, runbook_content: str, **kwargs): + def __init__(self, *, runbook_content: str, **kwargs: Any) -> None: """ :keyword runbook_content: Content of the Runbook. Required. :paramtype runbook_content: str @@ -5765,8 +5799,8 @@ def __init__( log_progress: Optional[bool] = None, description: Optional[str] = None, log_activity_trace: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword log_verbose: Gets or sets verbose log option. :paramtype log_verbose: bool @@ -5851,8 +5885,8 @@ def __init__( publish_content_link: Optional["_models.ContentLink"] = None, description: Optional[str] = None, log_activity_trace: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the resource. :paramtype name: str @@ -5925,8 +5959,8 @@ def __init__( last_modified_time: Optional[datetime.datetime] = None, parameters: Optional[Dict[str, "_models.RunbookParameter"]] = None, output_types: Optional[List[str]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword in_edit: Gets or sets whether runbook is in edit mode. :paramtype in_edit: bool @@ -5962,7 +5996,7 @@ class RunbookDraftUndoEditResult(_serialization.Model): "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", - and "HttpVersionNotSupported". + "HttpVersionNotSupported", and "Continue". :vartype status_code: str or ~azure.mgmt.automation.models.HttpStatusCode :ivar request_id: :vartype request_id: str @@ -5978,8 +6012,8 @@ def __init__( *, status_code: Optional[Union[str, "_models.HttpStatusCode"]] = None, request_id: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword status_code: Known values are: "Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", @@ -5990,7 +6024,7 @@ def __init__( "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", - and "HttpVersionNotSupported". + "HttpVersionNotSupported", and "Continue". :paramtype status_code: str or ~azure.mgmt.automation.models.HttpStatusCode :keyword request_id: :paramtype request_id: str @@ -6014,7 +6048,9 @@ class RunbookListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Runbook"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Runbook"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of runbooks. :paramtype value: list[~azure.mgmt.automation.models.Runbook] @@ -6054,8 +6090,8 @@ def __init__( is_mandatory: Optional[bool] = None, position: Optional[int] = None, default_value: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword type: Gets or sets the type of the parameter. :paramtype type: str @@ -6113,8 +6149,8 @@ def __init__( log_verbose: Optional[bool] = None, log_progress: Optional[bool] = None, log_activity_trace: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the resource. :paramtype name: str @@ -6226,8 +6262,8 @@ def __init__( creation_time: Optional[datetime.datetime] = None, last_modified_time: Optional[datetime.datetime] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword start_time: Gets or sets the start time of the schedule. :paramtype start_time: ~datetime.datetime @@ -6285,7 +6321,7 @@ class ScheduleAssociationProperty(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the Schedule. :paramtype name: str @@ -6346,8 +6382,8 @@ def __init__( interval: Optional[Any] = None, time_zone: Optional[str] = None, advanced_schedule: Optional["_models.AdvancedSchedule"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the Schedule. Required. :paramtype name: str @@ -6392,7 +6428,9 @@ class ScheduleListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Schedule"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Schedule"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of schedules. :paramtype value: list[~azure.mgmt.automation.models.Schedule] @@ -6427,8 +6465,8 @@ def __init__( name: Optional[str] = None, description: Optional[str] = None, is_enabled: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the Schedule. :paramtype name: str @@ -6473,8 +6511,8 @@ def __init__( name: Union[str, "_models.SkuNameEnum"], family: Optional[str] = None, capacity: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the SKU name of the account. Required. Known values are: "Free" and "Basic". @@ -6560,8 +6598,8 @@ def __init__( schedule_info: "_models.SUCScheduleProperties", error: Optional["_models.ErrorResponse"] = None, tasks: Optional["_models.SoftwareUpdateConfigurationTasks"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword update_configuration: update specific properties for the Software update configuration. Required. @@ -6648,8 +6686,8 @@ def __init__( frequency: Optional[Union[str, "_models.ScheduleFrequency"]] = None, start_time: Optional[datetime.datetime] = None, next_run: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword update_configuration: Update specific properties of the software update configuration. :paramtype update_configuration: ~azure.mgmt.automation.models.UpdateConfiguration @@ -6687,7 +6725,9 @@ class SoftwareUpdateConfigurationListResult(_serialization.Model): "value": {"key": "value", "type": "[SoftwareUpdateConfigurationCollectionItem]"}, } - def __init__(self, *, value: Optional[List["_models.SoftwareUpdateConfigurationCollectionItem"]] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.SoftwareUpdateConfigurationCollectionItem"]] = None, **kwargs: Any + ) -> None: """ :keyword value: outer object returned when listing all software update configurations. :paramtype value: list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationCollectionItem] @@ -6788,8 +6828,8 @@ def __init__( software_update_configuration: Optional["_models.UpdateConfigurationNavigation"] = None, job: Optional["_models.JobNavigation"] = None, error: Optional["_models.ErrorResponse"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword software_update_configuration: software update configuration triggered this run. :paramtype software_update_configuration: @@ -6839,8 +6879,8 @@ def __init__( *, value: Optional[List["_models.SoftwareUpdateConfigurationMachineRun"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: outer object returned when listing all software update configuration machine runs. @@ -6933,8 +6973,8 @@ def __init__( *, software_update_configuration: Optional["_models.UpdateConfigurationNavigation"] = None, tasks: Optional["_models.SoftwareUpdateConfigurationRunTasks"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword software_update_configuration: software update configuration triggered this run. :paramtype software_update_configuration: @@ -6979,8 +7019,8 @@ def __init__( *, value: Optional[List["_models.SoftwareUpdateConfigurationRun"]] = None, next_link: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: outer object returned when listing all software update configuration runs. :paramtype value: list[~azure.mgmt.automation.models.SoftwareUpdateConfigurationRun] @@ -7010,8 +7050,8 @@ class SoftwareUpdateConfigurationRunTaskProperties(_serialization.Model): } def __init__( - self, *, status: Optional[str] = None, source: Optional[str] = None, job_id: Optional[str] = None, **kwargs - ): + self, *, status: Optional[str] = None, source: Optional[str] = None, job_id: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword status: The status of the task. :paramtype status: str @@ -7045,8 +7085,8 @@ def __init__( *, pre_task: Optional["_models.SoftwareUpdateConfigurationRunTaskProperties"] = None, post_task: Optional["_models.SoftwareUpdateConfigurationRunTaskProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword pre_task: Pre task properties. :paramtype pre_task: ~azure.mgmt.automation.models.SoftwareUpdateConfigurationRunTaskProperties @@ -7078,8 +7118,8 @@ def __init__( *, pre_task: Optional["_models.TaskProperties"] = None, post_task: Optional["_models.TaskProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword pre_task: Pre task properties. :paramtype pre_task: ~azure.mgmt.automation.models.TaskProperties @@ -7157,8 +7197,8 @@ def __init__( description: Optional[str] = None, creation_time: Optional[datetime.datetime] = None, last_modified_time: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword repo_url: The repo url of the source control. :paramtype repo_url: str @@ -7245,8 +7285,8 @@ def __init__( source_type: Optional[Union[str, "_models.SourceType"]] = None, security_token: Optional["_models.SourceControlSecurityTokenProperties"] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword repo_url: The repo url of the source control. :paramtype repo_url: str @@ -7293,8 +7333,8 @@ class SourceControlListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.SourceControl"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, *, value: Optional[List["_models.SourceControl"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: The list of source controls. :paramtype value: list[~azure.mgmt.automation.models.SourceControl] @@ -7335,8 +7375,8 @@ def __init__( access_token: Optional[str] = None, refresh_token: Optional[str] = None, token_type: Optional[Union[str, "_models.TokenType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword access_token: The access token. :paramtype access_token: str @@ -7405,8 +7445,8 @@ def __init__( source_control_sync_job_id: Optional[str] = None, provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, sync_type: Optional[Union[str, "_models.SyncType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword source_control_sync_job_id: The source control sync job id. :paramtype source_control_sync_job_id: str @@ -7477,8 +7517,8 @@ def __init__( provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None, sync_type: Optional[Union[str, "_models.SyncType"]] = None, exception: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: The id of the job. :paramtype id: str @@ -7521,7 +7561,7 @@ class SourceControlSyncJobCreateParameters(_serialization.Model): "commit_id": {"key": "properties.commitId", "type": "str"}, } - def __init__(self, *, commit_id: str, **kwargs): + def __init__(self, *, commit_id: str, **kwargs: Any) -> None: """ :keyword commit_id: The commit id of the source control sync job. If not syncing to a commitId, enter an empty string. Required. @@ -7546,8 +7586,12 @@ class SourceControlSyncJobListResult(_serialization.Model): } def __init__( - self, *, value: Optional[List["_models.SourceControlSyncJob"]] = None, next_link: Optional[str] = None, **kwargs - ): + self, + *, + value: Optional[List["_models.SourceControlSyncJob"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword value: The list of source control sync jobs. :paramtype value: list[~azure.mgmt.automation.models.SourceControlSyncJob] @@ -7595,8 +7639,8 @@ def __init__( source_control_sync_job_stream_id: Optional[str] = None, summary: Optional[str] = None, stream_type: Optional[Union[str, "_models.StreamType"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword source_control_sync_job_stream_id: The sync job stream id. :paramtype source_control_sync_job_stream_id: str @@ -7657,8 +7701,8 @@ def __init__( stream_type: Optional[Union[str, "_models.StreamType"]] = None, stream_text: Optional[str] = None, value: Optional[Dict[str, JSON]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword source_control_sync_job_stream_id: The sync job stream id. :paramtype source_control_sync_job_stream_id: str @@ -7701,7 +7745,7 @@ class SourceControlSyncJobStreamsListBySyncJob(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.SourceControlSyncJobStream"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.SourceControlSyncJobStream"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of source control sync job streams. :paramtype value: list[~azure.mgmt.automation.models.SourceControlSyncJobStream] @@ -7746,8 +7790,8 @@ def __init__( publish_runbook: Optional[bool] = None, security_token: Optional["_models.SourceControlSecurityTokenProperties"] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword branch: The repo branch of the source control. :paramtype branch: str @@ -7804,7 +7848,7 @@ class Statistics(_serialization.Model): "id": {"key": "id", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.counter_property = None @@ -7825,7 +7869,7 @@ class StatisticsListResult(_serialization.Model): "value": {"key": "value", "type": "[Statistics]"}, } - def __init__(self, *, value: Optional[List["_models.Statistics"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Statistics"]] = None, **kwargs: Any) -> None: """ :keyword value: Gets or sets a list of statistics. :paramtype value: list[~azure.mgmt.automation.models.Statistics] @@ -7907,8 +7951,8 @@ def __init__( creation_time: Optional[datetime.datetime] = None, last_modified_time: Optional[datetime.datetime] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword start_time: Gets or sets the start time of the schedule. :paramtype start_time: ~datetime.datetime @@ -7992,8 +8036,8 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword created_by: The identity that created the resource. :paramtype created_by: str @@ -8039,8 +8083,8 @@ def __init__( *, tags: Optional[Dict[str, List[str]]] = None, filter_operator: Optional[Union[str, "_models.TagOperators"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword tags: Dictionary of tags with its list of values. :paramtype tags: dict[str, list[str]] @@ -8072,8 +8116,8 @@ def __init__( *, azure_queries: Optional[List["_models.AzureQueryProperties"]] = None, non_azure_queries: Optional[List["_models.NonAzureQueryProperties"]] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword azure_queries: List of Azure queries in the software update configuration. :paramtype azure_queries: list[~azure.mgmt.automation.models.AzureQueryProperties] @@ -8099,7 +8143,9 @@ class TaskProperties(_serialization.Model): "source": {"key": "source", "type": "str"}, } - def __init__(self, *, parameters: Optional[Dict[str, str]] = None, source: Optional[str] = None, **kwargs): + def __init__( + self, *, parameters: Optional[Dict[str, str]] = None, source: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword parameters: Gets or sets the parameters of the task. :paramtype parameters: dict[str, str] @@ -8167,8 +8213,8 @@ def __init__( last_status_modified_time: Optional[datetime.datetime] = None, parameters: Optional[Dict[str, str]] = None, log_activity_trace: Optional[int] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword creation_time: Gets or sets the creation time of the test job. :paramtype creation_time: ~datetime.datetime @@ -8223,7 +8269,9 @@ class TestJobCreateParameters(_serialization.Model): "run_on": {"key": "runOn", "type": "str"}, } - def __init__(self, *, parameters: Optional[Dict[str, str]] = None, run_on: Optional[str] = None, **kwargs): + def __init__( + self, *, parameters: Optional[Dict[str, str]] = None, run_on: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword parameters: Gets or sets the parameters of the test job. :paramtype parameters: dict[str, str] @@ -8250,7 +8298,7 @@ class TypeField(_serialization.Model): "type": {"key": "type", "type": "str"}, } - def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs): + def __init__(self, *, name: Optional[str] = None, type: Optional[str] = None, **kwargs: Any) -> None: """ :keyword name: Gets or sets the name of the field. :paramtype name: str @@ -8273,7 +8321,7 @@ class TypeFieldListResult(_serialization.Model): "value": {"key": "value", "type": "[TypeField]"}, } - def __init__(self, *, value: Optional[List["_models.TypeField"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.TypeField"]] = None, **kwargs: Any) -> None: """ :keyword value: Gets or sets a list of fields. :paramtype value: list[~azure.mgmt.automation.models.TypeField] @@ -8331,8 +8379,8 @@ def __init__( azure_virtual_machines: Optional[List[str]] = None, non_azure_computer_names: Optional[List[str]] = None, targets: Optional["_models.TargetProperties"] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword operating_system: operating system of target machines. Required. Known values are: "Windows" and "Linux". @@ -8381,7 +8429,7 @@ class UpdateConfigurationNavigation(_serialization.Model): "name": {"key": "name", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.name = None @@ -8422,8 +8470,8 @@ def __init__( current_value: Optional[float] = None, limit: Optional[int] = None, throttle_status: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword id: Gets or sets the id of the resource. :paramtype id: str @@ -8461,7 +8509,7 @@ class UsageCounterName(_serialization.Model): "localized_value": {"key": "localizedValue", "type": "str"}, } - def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs): + def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs: Any) -> None: """ :keyword value: Gets or sets the usage counter name. :paramtype value: str @@ -8484,7 +8532,7 @@ class UsageListResult(_serialization.Model): "value": {"key": "value", "type": "[Usage]"}, } - def __init__(self, *, value: Optional[List["_models.Usage"]] = None, **kwargs): + def __init__(self, *, value: Optional[List["_models.Usage"]] = None, **kwargs: Any) -> None: """ :keyword value: Gets or sets usage. :paramtype value: list[~azure.mgmt.automation.models.Usage] @@ -8514,7 +8562,7 @@ class UserAssignedIdentitiesProperties(_serialization.Model): "client_id": {"key": "clientId", "type": "str"}, } - def __init__(self, **kwargs): + def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) self.principal_id = None @@ -8569,8 +8617,8 @@ def __init__( creation_time: Optional[datetime.datetime] = None, last_modified_time: Optional[datetime.datetime] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword value: Gets or sets the value of the variable. :paramtype value: str @@ -8624,8 +8672,8 @@ def __init__( value: Optional[str] = None, description: Optional[str] = None, is_encrypted: Optional[bool] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the variable. Required. :paramtype name: str @@ -8657,7 +8705,9 @@ class VariableListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Variable"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Variable"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of variables. :paramtype value: list[~azure.mgmt.automation.models.Variable] @@ -8687,8 +8737,13 @@ class VariableUpdateParameters(_serialization.Model): } def __init__( - self, *, name: Optional[str] = None, value: Optional[str] = None, description: Optional[str] = None, **kwargs - ): + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + description: Optional[str] = None, + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the variable. :paramtype name: str @@ -8781,8 +8836,8 @@ def __init__( script_parameters: Optional[Dict[str, str]] = None, script_run_on: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword etag: Gets or sets the etag of the resource. :paramtype etag: str @@ -8833,7 +8888,9 @@ class WatcherListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Watcher"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Watcher"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of watchers. :paramtype value: list[~azure.mgmt.automation.models.Watcher] @@ -8860,7 +8917,9 @@ class WatcherUpdateParameters(_serialization.Model): "execution_frequency_in_seconds": {"key": "properties.executionFrequencyInSeconds", "type": "int"}, } - def __init__(self, *, name: Optional[str] = None, execution_frequency_in_seconds: Optional[int] = None, **kwargs): + def __init__( + self, *, name: Optional[str] = None, execution_frequency_in_seconds: Optional[int] = None, **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the resource. :paramtype name: str @@ -8946,8 +9005,8 @@ def __init__( last_modified_time: Optional[datetime.datetime] = None, last_modified_by: Optional[str] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword is_enabled: Gets or sets the value of the enabled flag of the webhook. :paramtype is_enabled: bool @@ -9032,8 +9091,8 @@ def __init__( parameters: Optional[Dict[str, str]] = None, runbook: Optional["_models.RunbookAssociationProperty"] = None, run_on: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the webhook. Required. :paramtype name: str @@ -9074,7 +9133,9 @@ class WebhookListResult(_serialization.Model): "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, *, value: Optional[List["_models.Webhook"]] = None, next_link: Optional[str] = None, **kwargs): + def __init__( + self, *, value: Optional[List["_models.Webhook"]] = None, next_link: Optional[str] = None, **kwargs: Any + ) -> None: """ :keyword value: Gets or sets a list of webhooks. :paramtype value: list[~azure.mgmt.automation.models.Webhook] @@ -9117,8 +9178,8 @@ def __init__( run_on: Optional[str] = None, parameters: Optional[Dict[str, str]] = None, description: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword name: Gets or sets the name of the webhook. :paramtype name: str @@ -9170,8 +9231,8 @@ def __init__( excluded_kb_numbers: Optional[List[str]] = None, included_kb_numbers: Optional[List[str]] = None, reboot_setting: Optional[str] = None, - **kwargs - ): + **kwargs: Any + ) -> None: """ :keyword included_update_classifications: Update classification included in the software update configuration. A comma separated string with required values. Known values are: "Unclassified", diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py index 7838406aef1b..5b9513195563 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_activity_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,7 +81,7 @@ def build_list_by_module_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -144,6 +139,9 @@ def get( ) -> _models.Activity: """Retrieve the activity in the module identified by module name and activity name. + .. seealso:: + - http://aka.ms/azureautomationsdk/activityoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -168,7 +166,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Activity] = kwargs.pop("cls", None) request = build_get_request( @@ -185,8 +183,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 @@ -213,6 +212,9 @@ def list_by_module( ) -> Iterable["_models.Activity"]: """Retrieve a list of activities in the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/activityoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -227,7 +229,7 @@ def list_by_module( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ActivityListResult] = kwargs.pop("cls", None) error_map = { @@ -271,8 +273,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py index d87013f69d5a..ce7f7b2f4b58 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_agent_registration_information_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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,9 +40,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,9 +73,7 @@ def build_regenerate_key_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -135,6 +126,9 @@ def __init__(self, *args, **kwargs): def get(self, resource_group_name: str, automation_account_name: str, **kwargs: Any) -> _models.AgentRegistration: """Retrieve the automation agent registration information. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -155,9 +149,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None) request = build_get_request( @@ -172,8 +164,9 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs: 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,6 +199,9 @@ def regenerate_key( ) -> _models.AgentRegistration: """Regenerate a primary or secondary agent registration key. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -233,6 +229,9 @@ def regenerate_key( ) -> _models.AgentRegistration: """Regenerate a primary or secondary agent registration key. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -258,12 +257,15 @@ def regenerate_key( ) -> _models.AgentRegistration: """Regenerate a primary or secondary agent registration key. + .. seealso:: + - http://aka.ms/azureautomationsdk/agentregistrationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str - :param parameters: The name of the agent registration key to be regenerated. Is either a model - type or a IO type. Required. + :param parameters: The name of the agent registration key to be regenerated. Is either a + AgentRegistrationRegenerateKeyParameter type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.AgentRegistrationRegenerateKeyParameter or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -284,9 +286,7 @@ def regenerate_key( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AgentRegistration] = kwargs.pop("cls", None) @@ -313,8 +313,9 @@ def regenerate_key( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py index 3820d0877719..1318f04ce4ee 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_account_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -82,7 +77,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -118,7 +113,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -182,7 +177,7 @@ def build_list_by_resource_group_request(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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -212,7 +207,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -265,6 +260,9 @@ def update( ) -> _models.AutomationAccount: """Update an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -292,6 +290,9 @@ def update( ) -> _models.AutomationAccount: """Update an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -317,12 +318,15 @@ def update( ) -> _models.AutomationAccount: """Update an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str - :param parameters: Parameters supplied to the update automation account. Is either a model type - or a IO type. Required. + :param parameters: Parameters supplied to the update automation account. Is either a + AutomationAccountUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.AutomationAccountUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -343,7 +347,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None) @@ -370,8 +374,9 @@ def update( 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 @@ -404,6 +409,9 @@ def create_or_update( ) -> _models.AutomationAccount: """Create or update automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -431,6 +439,9 @@ def create_or_update( ) -> _models.AutomationAccount: """Create or update automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -456,12 +467,15 @@ def create_or_update( ) -> _models.AutomationAccount: """Create or update automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param parameters: Parameters supplied to the create or update automation account. Is either a - model type or a IO type. Required. + AutomationAccountCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.AutomationAccountCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -482,7 +496,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None) @@ -509,8 +523,9 @@ def create_or_update( 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 @@ -541,6 +556,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete an automation account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -561,7 +579,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -576,8 +594,9 @@ def delete( # 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 @@ -598,6 +617,9 @@ def delete( # pylint: disable=inconsistent-return-statements def get(self, resource_group_name: str, automation_account_name: str, **kwargs: Any) -> _models.AutomationAccount: """Get information about an Automation Account. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -618,7 +640,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.AutomationAccount] = kwargs.pop("cls", None) request = build_get_request( @@ -633,8 +655,9 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs: 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 @@ -659,6 +682,9 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs: def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Iterable["_models.AutomationAccount"]: """Retrieve a list of accounts within a given resource group. + .. seealso:: + - http://aka.ms/azureautomationsdk/automationaccountoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -669,7 +695,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None) error_map = { @@ -711,8 +737,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 @@ -743,7 +770,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.AutomationAccount"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.AutomationAccountListResult] = kwargs.pop("cls", None) error_map = { @@ -784,8 +811,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_operations.py index cdfd540f5d97..260e85c832c4 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_automation_client_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_convert_graph_runbook_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -144,8 +139,8 @@ def convert_graph_runbook_content( :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str - :param parameters: Input data describing the graphical runbook. Is either a model type or a IO - type. Required. + :param parameters: Input data describing the graphical runbook. Is either a + GraphicalRunbookContent type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.GraphicalRunbookContent or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -166,7 +161,7 @@ def convert_graph_runbook_content( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GraphicalRunbookContent] = kwargs.pop("cls", None) @@ -193,8 +188,9 @@ def convert_graph_runbook_content( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py index 163a32be6348..7507ebc21a5f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_certificate_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,6 +235,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,7 +260,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -278,8 +276,9 @@ def delete( # 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 @@ -302,6 +301,9 @@ def get( ) -> _models.Certificate: """Retrieve the certificate identified by certificate name. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -324,7 +326,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Certificate] = kwargs.pop("cls", None) request = build_get_request( @@ -340,8 +342,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 @@ -375,6 +378,9 @@ def create_or_update( ) -> _models.Certificate: """Create a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -407,6 +413,9 @@ def create_or_update( ) -> _models.Certificate: """Create a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -437,6 +446,9 @@ def create_or_update( ) -> _models.Certificate: """Create a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -445,7 +457,7 @@ def create_or_update( Required. :type certificate_name: str :param parameters: The parameters supplied to the create or update certificate operation. Is - either a model type or a IO type. Required. + either a CertificateCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CertificateCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -466,7 +478,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Certificate] = kwargs.pop("cls", None) @@ -494,8 +506,9 @@ def create_or_update( 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 @@ -533,6 +546,9 @@ def update( ) -> _models.Certificate: """Update a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -563,6 +579,9 @@ def update( ) -> _models.Certificate: """Update a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -591,6 +610,9 @@ def update( ) -> _models.Certificate: """Update a certificate. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -598,7 +620,7 @@ def update( :param certificate_name: The parameters supplied to the update certificate operation. Required. :type certificate_name: str :param parameters: The parameters supplied to the update certificate operation. Is either a - model type or a IO type. Required. + CertificateUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CertificateUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -619,7 +641,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Certificate] = kwargs.pop("cls", None) @@ -647,8 +669,9 @@ def update( 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,6 +698,9 @@ def list_by_automation_account( ) -> Iterable["_models.Certificate"]: """Retrieve a list of certificates. + .. seealso:: + - http://aka.ms/azureautomationsdk/certificateoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -687,7 +713,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.CertificateListResult] = kwargs.pop("cls", None) error_map = { @@ -730,8 +756,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py index 408ac1066f5d..b6acdf34e9e3 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,6 +235,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,7 +260,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -278,8 +276,9 @@ def delete( # 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 @@ -302,6 +301,9 @@ def get( ) -> _models.Connection: """Retrieve the connection identified by connection name. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -324,7 +326,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Connection] = kwargs.pop("cls", None) request = build_get_request( @@ -340,8 +342,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 @@ -375,6 +378,9 @@ def create_or_update( ) -> _models.Connection: """Create or update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -407,6 +413,9 @@ def create_or_update( ) -> _models.Connection: """Create or update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -437,6 +446,9 @@ def create_or_update( ) -> _models.Connection: """Create or update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -445,7 +457,7 @@ def create_or_update( Required. :type connection_name: str :param parameters: The parameters supplied to the create or update connection operation. Is - either a model type or a IO type. Required. + either a ConnectionCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ConnectionCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -466,7 +478,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Connection] = kwargs.pop("cls", None) @@ -494,8 +506,9 @@ def create_or_update( 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 @@ -533,6 +546,9 @@ def update( ) -> _models.Connection: """Update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -563,6 +579,9 @@ def update( ) -> _models.Connection: """Update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -591,6 +610,9 @@ def update( ) -> _models.Connection: """Update a connection. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -598,7 +620,7 @@ def update( :param connection_name: The parameters supplied to the update a connection operation. Required. :type connection_name: str :param parameters: The parameters supplied to the update a connection operation. Is either a - model type or a IO type. Required. + ConnectionUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ConnectionUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -619,7 +641,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Connection] = kwargs.pop("cls", None) @@ -647,8 +669,9 @@ def update( 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,6 +698,9 @@ def list_by_automation_account( ) -> Iterable["_models.Connection"]: """Retrieve a list of connections. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectionoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -687,7 +713,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -730,8 +756,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py index e0e5c3a1146e..30a4d93127e2 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_connection_type_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -88,7 +83,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -126,7 +121,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -163,7 +158,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -215,6 +210,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -237,7 +235,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -253,8 +251,9 @@ def delete( # 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 @@ -277,6 +276,9 @@ def get( ) -> _models.ConnectionType: """Retrieve the connection type identified by connection type name. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -299,7 +301,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None) request = build_get_request( @@ -315,8 +317,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 @@ -350,6 +353,9 @@ def create_or_update( ) -> _models.ConnectionType: """Create a connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -382,6 +388,9 @@ def create_or_update( ) -> _models.ConnectionType: """Create a connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -412,6 +421,9 @@ def create_or_update( ) -> _models.ConnectionType: """Create a connection type. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -420,7 +432,7 @@ def create_or_update( operation. Required. :type connection_type_name: str :param parameters: The parameters supplied to the create or update connection type operation. - Is either a model type or a IO type. Required. + Is either a ConnectionTypeCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ConnectionTypeCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -441,7 +453,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ConnectionType] = kwargs.pop("cls", None) @@ -469,8 +481,9 @@ def create_or_update( 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 @@ -497,6 +510,9 @@ def list_by_automation_account( ) -> Iterable["_models.ConnectionType"]: """Retrieve a list of connection types. + .. seealso:: + - http://aka.ms/azureautomationsdk/connectiontypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -509,7 +525,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ConnectionTypeListResult] = kwargs.pop("cls", None) error_map = { @@ -552,8 +568,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py index 375027ade7c8..0c875f949209 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_credential_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,6 +235,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,7 +260,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -278,8 +276,9 @@ def delete( # 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 @@ -302,6 +301,9 @@ def get( ) -> _models.Credential: """Retrieve the credential identified by credential name. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -324,7 +326,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Credential] = kwargs.pop("cls", None) request = build_get_request( @@ -340,8 +342,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 @@ -375,6 +378,9 @@ def create_or_update( ) -> _models.Credential: """Create a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -407,6 +413,9 @@ def create_or_update( ) -> _models.Credential: """Create a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -437,6 +446,9 @@ def create_or_update( ) -> _models.Credential: """Create a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -445,7 +457,7 @@ def create_or_update( Required. :type credential_name: str :param parameters: The parameters supplied to the create or update credential operation. Is - either a model type or a IO type. Required. + either a CredentialCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CredentialCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -466,7 +478,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Credential] = kwargs.pop("cls", None) @@ -494,8 +506,9 @@ def create_or_update( 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 @@ -533,6 +546,9 @@ def update( ) -> _models.Credential: """Update a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -563,6 +579,9 @@ def update( ) -> _models.Credential: """Update a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -591,6 +610,9 @@ def update( ) -> _models.Credential: """Update a credential. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -598,7 +620,7 @@ def update( :param credential_name: The parameters supplied to the Update credential operation. Required. :type credential_name: str :param parameters: The parameters supplied to the Update credential operation. Is either a - model type or a IO type. Required. + CredentialUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.CredentialUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -619,7 +641,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Credential] = kwargs.pop("cls", None) @@ -647,8 +669,9 @@ def update( 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,6 +698,9 @@ def list_by_automation_account( ) -> Iterable["_models.Credential"]: """Retrieve a list of credentials. + .. seealso:: + - http://aka.ms/azureautomationsdk/credentialoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -687,7 +713,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.CredentialListResult] = kwargs.pop("cls", None) error_map = { @@ -730,8 +756,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_operations.py index d6ac5231db4d..4ec94ffc80a3 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_deleted_automation_accounts_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 AutomationClientMixinABC, _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]] @@ -43,7 +38,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-01-31"] = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -104,7 +99,7 @@ def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomationAccoun _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-01-31"] = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-01-31")) cls: ClsType[_models.DeletedAutomationAccountListResult] = kwargs.pop("cls", None) request = build_list_by_subscription_request( @@ -117,8 +112,9 @@ def list_by_subscription(self, **kwargs: Any) -> _models.DeletedAutomationAccoun 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py index b8d498a822ea..2ab9e334dcdf 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_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, IO, Iterable, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -31,10 +30,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -52,9 +47,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -95,9 +88,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,9 +127,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,9 +167,7 @@ def build_get_stream_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -247,9 +234,7 @@ def _create_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None) @@ -277,8 +262,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 @@ -312,6 +298,9 @@ def begin_create( ) -> LROPoller[_models.DscCompilationJob]: """Creates the Dsc compilation job of the configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -350,6 +339,9 @@ def begin_create( ) -> LROPoller[_models.DscCompilationJob]: """Creates the Dsc compilation job of the configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -386,6 +378,9 @@ def begin_create( ) -> LROPoller[_models.DscCompilationJob]: """Creates the Dsc compilation job of the configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscconfigurationcompilejoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -393,7 +388,7 @@ def begin_create( :param compilation_job_name: The DSC configuration Id. Required. :type compilation_job_name: str :param parameters: The parameters supplied to the create compilation job operation. Is either a - model type or a IO type. Required. + DscCompilationJobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.DscCompilationJobCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -414,9 +409,7 @@ def begin_create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -468,6 +461,9 @@ def get( ) -> _models.DscCompilationJob: """Retrieve the Dsc configuration compilation job identified by job id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dsccompilationjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -490,9 +486,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscCompilationJob] = kwargs.pop("cls", None) request = build_get_request( @@ -508,8 +502,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 @@ -536,6 +531,9 @@ def list_by_automation_account( ) -> Iterable["_models.DscCompilationJob"]: """Retrieve a list of dsc compilation jobs. + .. seealso:: + - http://aka.ms/azureautomationsdk/compilationjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -550,9 +548,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscCompilationJobListResult] = kwargs.pop("cls", None) error_map = { @@ -596,8 +592,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 @@ -620,6 +617,9 @@ def get_stream( ) -> _models.JobStream: """Retrieve the job stream identified by job stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -644,9 +644,7 @@ def get_stream( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.JobStream] = kwargs.pop("cls", None) request = build_get_stream_request( @@ -663,8 +661,9 @@ def get_stream( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py index 7e4fd8be18a1..d8fd92791b80 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_compilation_job_stream_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 AutomationClientMixinABC, _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,9 +40,7 @@ def build_list_by_job_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,6 +93,9 @@ def list_by_job( ) -> _models.JobStreamListResult: """Retrieve all the job streams for the compilation Job. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -122,9 +118,7 @@ def list_by_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None) request = build_list_by_job_request( @@ -140,8 +134,9 @@ def list_by_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 diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py index c32539930fd6..7ec697c30b19 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_configuration_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, Iterator, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_get_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "text/powershell") # Construct URL @@ -230,7 +225,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -290,6 +285,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the dsc configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -312,7 +310,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -328,8 +326,9 @@ def delete( # 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 @@ -352,6 +351,9 @@ def get( ) -> _models.DscConfiguration: """Retrieve the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -374,7 +376,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None) request = build_get_request( @@ -390,8 +392,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 @@ -425,6 +428,9 @@ def create_or_update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -455,6 +461,9 @@ def create_or_update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -483,14 +492,17 @@ def create_or_update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param configuration_name: The create or update parameters for configuration. Required. :type configuration_name: str - :param parameters: The create or update parameters for configuration. Is either a model type or - a string type. Required. + :param parameters: The create or update parameters for configuration. Is either a + DscConfigurationCreateOrUpdateParameters type or a str type. Required. :type parameters: ~azure.mgmt.automation.models.DscConfigurationCreateOrUpdateParameters or str :keyword content_type: Body Parameter content-type. Known values are: 'application/json', 'text/plain; charset=utf-8'. Default value is None. @@ -511,7 +523,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None) @@ -539,8 +551,9 @@ def create_or_update( 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 @@ -578,6 +591,9 @@ def update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -608,6 +624,9 @@ def update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -636,14 +655,17 @@ def update( ) -> _models.DscConfiguration: """Create the configuration identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param configuration_name: The create or update parameters for configuration. Required. :type configuration_name: str - :param parameters: The create or update parameters for configuration. Is either a model type or - a string type. Default value is None. + :param parameters: The create or update parameters for configuration. Is either a + DscConfigurationUpdateParameters type or a str type. Default value is None. :type parameters: ~azure.mgmt.automation.models.DscConfigurationUpdateParameters or str :keyword content_type: Body Parameter content-type. Known values are: 'application/json', 'text/plain; charset=utf-8'. Default value is None. @@ -664,7 +686,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscConfiguration] = kwargs.pop("cls", None) @@ -698,8 +720,9 @@ def update( 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 @@ -726,6 +749,9 @@ def get_content( ) -> Iterator[bytes]: """Retrieve the configuration script identified by configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -748,7 +774,7 @@ def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) request = build_get_content_request( @@ -764,8 +790,9 @@ def get_content( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -798,6 +825,9 @@ def list_by_automation_account( ) -> Iterable["_models.DscConfiguration"]: """Retrieve a list of configurations. + .. seealso:: + - http://aka.ms/azureautomationsdk/configurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -818,7 +848,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscConfigurationListResult] = kwargs.pop("cls", None) error_map = { @@ -865,8 +895,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py index 9d05b99c479b..863a57056db3 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_configuration_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, IO, Iterable, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -31,10 +30,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -52,7 +47,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +85,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -128,7 +123,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -173,7 +168,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -233,6 +228,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the Dsc node configurations by node configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -255,7 +253,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -271,8 +269,9 @@ def delete( # 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 @@ -295,6 +294,9 @@ def get( ) -> _models.DscNodeConfiguration: """Retrieve the Dsc node configurations by node configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -317,7 +319,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscNodeConfiguration] = kwargs.pop("cls", None) request = build_get_request( @@ -333,8 +335,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 @@ -374,7 +377,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.DscNodeConfiguration]] = kwargs.pop("cls", None) @@ -402,8 +405,9 @@ def _create_or_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 @@ -436,9 +440,12 @@ def begin_create_or_update( *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.DscNodeConfiguration]: """Create the node configuration identified by node configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -474,9 +481,12 @@ def begin_create_or_update( *, content_type: str = "application/json", **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.DscNodeConfiguration]: """Create the node configuration identified by node configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -510,17 +520,20 @@ def begin_create_or_update( node_configuration_name: str, parameters: Union[_models.DscNodeConfigurationCreateOrUpdateParameters, IO], **kwargs: Any - ) -> LROPoller[None]: + ) -> LROPoller[_models.DscNodeConfiguration]: """Create the node configuration identified by node configuration name. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param node_configuration_name: The Dsc node configuration name. Required. :type node_configuration_name: str - :param parameters: The create or update parameters for configuration. Is either a model type or - a IO type. Required. + :param parameters: The create or update parameters for configuration. Is either a + DscNodeConfigurationCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.DscNodeConfigurationCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -542,7 +555,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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) @@ -601,6 +614,9 @@ def list_by_automation_account( ) -> Iterable["_models.DscNodeConfiguration"]: """Retrieve a list of dsc node configurations. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeconfigurations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -622,7 +638,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.DscNodeConfigurationListResult] = kwargs.pop("cls", None) error_map = { @@ -669,8 +685,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py index b3a9240a65ac..15e77541f02f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_dsc_node_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,9 +41,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -82,9 +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["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,9 +109,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -165,9 +154,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -227,6 +214,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the dsc node identified by node id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -249,9 +239,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -267,8 +255,9 @@ def delete( # 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 @@ -291,6 +280,9 @@ def get( ) -> _models.DscNode: """Retrieve the dsc node identified by node id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -313,9 +305,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNode] = kwargs.pop("cls", None) request = build_get_request( @@ -331,8 +321,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 @@ -366,6 +357,9 @@ def update( ) -> _models.DscNode: """Update the dsc node. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -396,6 +390,9 @@ def update( ) -> _models.DscNode: """Update the dsc node. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -424,6 +421,9 @@ def update( ) -> _models.DscNode: """Update the dsc node. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -431,7 +431,7 @@ def update( :param node_id: Parameters supplied to the update dsc node. Required. :type node_id: str :param dsc_node_update_parameters: Parameters supplied to the update dsc node. Is either a - model type or a IO type. Required. + DscNodeUpdateParameters type or a IO type. Required. :type dsc_node_update_parameters: ~azure.mgmt.automation.models.DscNodeUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -452,9 +452,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DscNode] = kwargs.pop("cls", None) @@ -482,8 +480,9 @@ def update( 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 @@ -517,6 +516,9 @@ def list_by_automation_account( ) -> Iterable["_models.DscNode"]: """Retrieve a list of dsc nodes. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -537,9 +539,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNodeListResult] = kwargs.pop("cls", None) error_map = { @@ -586,8 +586,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py index 97511e77ab4f..d6a2775050df 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_fields_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,7 @@ def build_list_by_type_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,6 +100,9 @@ def list_by_type( ) -> Iterable["_models.TypeField"]: """Retrieve a list of fields of a given type identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/typefieldoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -121,7 +119,7 @@ def list_by_type( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None) error_map = { @@ -166,8 +164,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py index 50ecad63e97e..7b8aab925cdf 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_worker_group_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +85,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -130,7 +125,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -173,7 +168,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -217,7 +212,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -275,6 +270,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -297,7 +295,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -313,8 +311,9 @@ def delete( # 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 @@ -341,6 +340,9 @@ def get( ) -> _models.HybridRunbookWorkerGroup: """Retrieve a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -363,7 +365,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None) request = build_get_request( @@ -379,8 +381,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 @@ -414,6 +417,9 @@ def create( ) -> _models.HybridRunbookWorkerGroup: """Create a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -446,6 +452,9 @@ def create( ) -> _models.HybridRunbookWorkerGroup: """Create a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -477,6 +486,9 @@ def create( ) -> _models.HybridRunbookWorkerGroup: """Create a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -484,7 +496,8 @@ def create( :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required. :type hybrid_runbook_worker_group_name: str :param hybrid_runbook_worker_group_creation_parameters: The create or update parameters for - hybrid runbook worker group. Is either a model type or a IO type. Required. + hybrid runbook worker group. Is either a HybridRunbookWorkerGroupCreateOrUpdateParameters type + or a IO type. Required. :type hybrid_runbook_worker_group_creation_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerGroupCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -506,7 +519,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None) @@ -536,8 +549,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 @@ -575,6 +589,9 @@ def update( ) -> _models.HybridRunbookWorkerGroup: """Update a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -607,6 +624,9 @@ def update( ) -> _models.HybridRunbookWorkerGroup: """Update a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -638,6 +658,9 @@ def update( ) -> _models.HybridRunbookWorkerGroup: """Update a hybrid runbook worker group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -645,7 +668,7 @@ def update( :param hybrid_runbook_worker_group_name: The hybrid runbook worker group name. Required. :type hybrid_runbook_worker_group_name: str :param hybrid_runbook_worker_group_updation_parameters: The hybrid runbook worker group. Is - either a model type or a IO type. Required. + either a HybridRunbookWorkerGroupCreateOrUpdateParameters type or a IO type. Required. :type hybrid_runbook_worker_group_updation_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerGroupCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -667,7 +690,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HybridRunbookWorkerGroup] = kwargs.pop("cls", None) @@ -697,8 +720,9 @@ def update( 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 @@ -725,6 +749,9 @@ def list_by_automation_account( ) -> Iterable["_models.HybridRunbookWorkerGroup"]: """Retrieve a list of hybrid runbook worker groups. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkergroupoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -740,7 +767,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorkerGroupsListResult] = kwargs.pop("cls", None) error_map = { @@ -784,8 +811,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_operations.py index a5f04677e394..6524861bf0d8 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_hybrid_runbook_workers_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +88,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,7 +130,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,7 +175,7 @@ def build_move_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -226,7 +221,7 @@ def build_list_by_hybrid_runbook_worker_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -288,6 +283,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -312,7 +310,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -329,8 +327,9 @@ def delete( # 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 @@ -358,6 +357,9 @@ def get( ) -> _models.HybridRunbookWorker: """Retrieve a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -382,7 +384,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None) request = build_get_request( @@ -399,8 +401,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 @@ -435,6 +438,9 @@ def create( ) -> _models.HybridRunbookWorker: """Create a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -470,6 +476,9 @@ def create( ) -> _models.HybridRunbookWorker: """Create a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -502,6 +511,9 @@ def create( ) -> _models.HybridRunbookWorker: """Create a hybrid runbook worker. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -511,7 +523,7 @@ def create( :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required. :type hybrid_runbook_worker_id: str :param hybrid_runbook_worker_creation_parameters: The create or update parameters for hybrid - runbook worker. Is either a model type or a IO type. Required. + runbook worker. Is either a HybridRunbookWorkerCreateParameters type or a IO type. Required. :type hybrid_runbook_worker_creation_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -533,7 +545,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.HybridRunbookWorker] = kwargs.pop("cls", None) @@ -564,8 +576,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 @@ -604,6 +617,9 @@ def move( # pylint: disable=inconsistent-return-statements ) -> None: """Move a hybrid worker to a different group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -639,6 +655,9 @@ def move( # pylint: disable=inconsistent-return-statements ) -> None: """Move a hybrid worker to a different group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -671,6 +690,9 @@ def move( # pylint: disable=inconsistent-return-statements ) -> None: """Move a hybrid worker to a different group. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -680,7 +702,7 @@ def move( # pylint: disable=inconsistent-return-statements :param hybrid_runbook_worker_id: The hybrid runbook worker id. Required. :type hybrid_runbook_worker_id: str :param hybrid_runbook_worker_move_parameters: The hybrid runbook worker move parameters. Is - either a model type or a IO type. Required. + either a HybridRunbookWorkerMoveParameters type or a IO type. Required. :type hybrid_runbook_worker_move_parameters: ~azure.mgmt.automation.models.HybridRunbookWorkerMoveParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. @@ -702,7 +724,7 @@ def move( # 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) @@ -731,8 +753,9 @@ def move( # 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 @@ -760,6 +783,9 @@ def list_by_hybrid_runbook_worker_group( ) -> Iterable["_models.HybridRunbookWorker"]: """Retrieve a list of hybrid runbook workers. + .. seealso:: + - http://aka.ms/azureautomationsdk/hybridrunbookworkeroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -776,7 +802,7 @@ def list_by_hybrid_runbook_worker_group( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.HybridRunbookWorkersListResult] = kwargs.pop("cls", None) error_map = { @@ -821,8 +847,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py index 1f32175053c2..9dadf3f4ebfe 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -52,7 +47,7 @@ def build_get_output_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "text/plain") # Construct URL @@ -94,7 +89,7 @@ def build_get_runbook_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "text/powershell") # Construct URL @@ -136,7 +131,7 @@ def build_suspend_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,7 +173,7 @@ def build_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -220,7 +215,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -262,7 +257,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -307,7 +302,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -350,7 +345,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -410,6 +405,9 @@ def get_output( ) -> str: """Retrieve the job output identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -434,7 +432,7 @@ def get_output( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[str] = kwargs.pop("cls", None) request = build_get_output_request( @@ -451,8 +449,9 @@ def get_output( 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 @@ -483,6 +482,9 @@ def get_runbook_content( ) -> str: """Retrieve the runbook content of the job identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -507,7 +509,7 @@ def get_runbook_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[str] = kwargs.pop("cls", None) request = build_get_runbook_content_request( @@ -524,8 +526,9 @@ def get_runbook_content( 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 @@ -556,6 +559,9 @@ def suspend( # pylint: disable=inconsistent-return-statements ) -> None: """Suspend the job identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -580,7 +586,7 @@ def suspend( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_suspend_request( @@ -597,8 +603,9 @@ def suspend( # 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 @@ -626,6 +633,9 @@ def stop( # pylint: disable=inconsistent-return-statements ) -> None: """Stop the job identified by jobName. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -650,7 +660,7 @@ def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -667,8 +677,9 @@ def stop( # 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 @@ -696,6 +707,9 @@ def get( ) -> _models.Job: """Retrieve the job identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -720,7 +734,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Job] = kwargs.pop("cls", None) request = build_get_request( @@ -737,8 +751,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 @@ -773,6 +788,9 @@ def create( ) -> _models.Job: """Create a job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -806,6 +824,9 @@ def create( ) -> _models.Job: """Create a job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -837,14 +858,17 @@ def create( ) -> _models.Job: """Create a job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param job_name: The job name. Required. :type job_name: str - :param parameters: The parameters supplied to the create job operation. Is either a model type - or a IO type. Required. + :param parameters: The parameters supplied to the create job operation. Is either a + JobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.JobCreateParameters or IO :param client_request_id: Identifies this specific client request. Default value is None. :type client_request_id: str @@ -867,7 +891,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Job] = kwargs.pop("cls", None) @@ -896,8 +920,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 @@ -929,6 +954,9 @@ def list_by_automation_account( ) -> Iterable["_models.JobCollectionItem"]: """Retrieve a list of jobs. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -945,7 +973,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobListResultV2] = kwargs.pop("cls", None) error_map = { @@ -990,8 +1018,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 @@ -1019,6 +1048,9 @@ def resume( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the job identified by jobName. + .. seealso:: + - http://aka.ms/azureautomationsdk/joboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -1043,7 +1075,7 @@ def resume( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resume_request( @@ -1060,8 +1092,9 @@ def resume( # 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 diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py index b5dce81f200f..85a899c0aa4a 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_schedule_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -156,7 +151,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -210,6 +205,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the job schedule identified by job schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -232,7 +230,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -248,8 +246,9 @@ def delete( # 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 @@ -272,6 +271,9 @@ def get( ) -> _models.JobSchedule: """Retrieve the job schedule identified by job schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -294,7 +296,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None) request = build_get_request( @@ -310,8 +312,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 @@ -345,6 +348,9 @@ def create( ) -> _models.JobSchedule: """Create a job schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -375,6 +381,9 @@ def create( ) -> _models.JobSchedule: """Create a job schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -403,6 +412,9 @@ def create( ) -> _models.JobSchedule: """Create a job schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -410,7 +422,7 @@ def create( :param job_schedule_id: The job schedule name. Required. :type job_schedule_id: str :param parameters: The parameters supplied to the create job schedule operation. Is either a - model type or a IO type. Required. + JobScheduleCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.JobScheduleCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -431,7 +443,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.JobSchedule] = kwargs.pop("cls", None) @@ -459,8 +471,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 @@ -487,6 +500,9 @@ def list_by_automation_account( ) -> Iterable["_models.JobSchedule"]: """Retrieve a list of job schedules. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobscheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -501,7 +517,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobScheduleListResult] = kwargs.pop("cls", None) error_map = { @@ -545,8 +561,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py index 0052d87dde4d..7cae34c47760 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_job_stream_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +92,7 @@ def build_list_by_job_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -160,6 +155,9 @@ def get( ) -> _models.JobStream: """Retrieve the job stream identified by job stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -186,7 +184,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStream] = kwargs.pop("cls", None) request = build_get_request( @@ -204,8 +202,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 @@ -238,6 +237,9 @@ def list_by_job( ) -> Iterable["_models.JobStream"]: """Retrieve a list of jobs streams identified by job name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -256,7 +258,7 @@ def list_by_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None) error_map = { @@ -302,8 +304,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py index 65d3c2d4f59d..adbbeede5450 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_keys_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 AutomationClientMixinABC, _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_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -117,7 +112,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.KeyListResult] = kwargs.pop("cls", None) request = build_list_by_automation_account_request( @@ -132,8 +127,9 @@ def list_by_automation_account( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py index 3e65082d6b94..cd8df10b3b84 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_linked_workspace_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 AutomationClientMixinABC, _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( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -95,6 +90,9 @@ def __init__(self, *args, **kwargs): def get(self, resource_group_name: str, automation_account_name: str, **kwargs: Any) -> _models.LinkedWorkspace: """Retrieve the linked workspace for the account id. + .. seealso:: + - http://aka.ms/azureautomationsdk/linkedworkspaceoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -115,7 +113,7 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.LinkedWorkspace] = kwargs.pop("cls", None) request = build_get_request( @@ -130,8 +128,9 @@ def get(self, resource_group_name: str, automation_account_name: str, **kwargs: 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py index 2631b4144265..1042966d69af 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_module_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,6 +235,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the module by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,7 +260,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -278,8 +276,9 @@ def delete( # 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 @@ -302,6 +301,9 @@ def get( ) -> _models.Module: """Retrieve the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -324,7 +326,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Module] = kwargs.pop("cls", None) request = build_get_request( @@ -340,8 +342,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 @@ -375,6 +378,9 @@ def create_or_update( ) -> _models.Module: """Create or Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -405,6 +411,9 @@ def create_or_update( ) -> _models.Module: """Create or Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -433,14 +442,17 @@ def create_or_update( ) -> _models.Module: """Create or Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param module_name: The name of module. Required. :type module_name: str - :param parameters: The create or update parameters for module. Is either a model type or a IO - type. Required. + :param parameters: The create or update parameters for module. Is either a + ModuleCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ModuleCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -461,7 +473,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -489,8 +501,9 @@ def create_or_update( 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 @@ -528,6 +541,9 @@ def update( ) -> _models.Module: """Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -558,6 +574,9 @@ def update( ) -> _models.Module: """Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -586,14 +605,17 @@ def update( ) -> _models.Module: """Update the module identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param module_name: The name of module. Required. :type module_name: str - :param parameters: The update parameters for module. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for module. Is either a ModuleUpdateParameters type or + a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ModuleUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -614,7 +636,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -642,8 +664,9 @@ def update( 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 @@ -670,6 +693,9 @@ def list_by_automation_account( ) -> Iterable["_models.Module"]: """Retrieve a list of modules. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -682,7 +708,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None) error_map = { @@ -725,8 +751,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py index efe79673ab61..815b8fe5e428 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_count_information_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 from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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,9 +44,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,6 +101,9 @@ def get( ) -> _models.NodeCounts: """Retrieve counts for Dsc Nodes. + .. seealso:: + - http://aka.ms/azureautomationsdk/nodecounts + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -131,9 +127,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.NodeCounts] = kwargs.pop("cls", None) request = build_get_request( @@ -149,8 +143,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py index fa13f6eca28c..09d15616b565 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_node_reports_operations.py @@ -33,10 +33,6 @@ from collections.abc import MutableMapping else: from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports -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 JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,9 +53,7 @@ def build_list_by_node_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,9 +94,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +134,7 @@ def build_get_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -203,6 +193,9 @@ def list_by_node( ) -> Iterable["_models.DscNodeReport"]: """Retrieve the Dsc node report list by node id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodereportoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -219,9 +212,7 @@ def list_by_node( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNodeReportListResult] = kwargs.pop("cls", None) error_map = { @@ -266,8 +257,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 @@ -290,6 +282,9 @@ def get( ) -> _models.DscNodeReport: """Retrieve the Dsc node report data by node id and report id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodereportoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -314,9 +309,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.DscNodeReport] = kwargs.pop("cls", None) request = build_get_request( @@ -333,8 +326,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 @@ -361,6 +355,9 @@ def get_content( ) -> JSON: """Retrieve the Dsc node reports by node id and report id. + .. seealso:: + - http://aka.ms/azureautomationsdk/dscnodereportoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -385,9 +382,7 @@ def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[JSON] = kwargs.pop("cls", None) request = build_get_content_request( @@ -404,8 +399,9 @@ def get_content( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py index a0bd570f9776..5df814a389ca 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_object_data_types_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,7 @@ def build_list_fields_by_module_and_type_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -86,7 +81,7 @@ def build_list_fields_by_type_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -139,6 +134,9 @@ def list_fields_by_module_and_type( ) -> Iterable["_models.TypeField"]: """Retrieve a list of fields of a given type identified by module name. + .. seealso:: + - http://aka.ms/azureautomationsdk/objectdatatypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -155,7 +153,7 @@ def list_fields_by_module_and_type( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None) error_map = { @@ -200,8 +198,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 @@ -224,6 +223,9 @@ def list_fields_by_type( ) -> Iterable["_models.TypeField"]: """Retrieve a list of fields of a given type across all accessible modules. + .. seealso:: + - http://aka.ms/azureautomationsdk/objectdatatypeoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -238,7 +240,7 @@ def list_fields_by_type( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TypeFieldListResult] = kwargs.pop("cls", None) error_map = { @@ -282,8 +284,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py index 840ce5a7ac2d..3fce9c0fb57c 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _convert_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, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -90,7 +85,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { @@ -130,8 +125,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py index a74811f185c9..e41ba13807f8 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_endpoint_connections_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, IO, Iterable, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -31,10 +30,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -48,9 +43,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -87,9 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -129,9 +120,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -174,9 +163,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -244,9 +231,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { @@ -289,8 +274,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 @@ -338,9 +324,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -356,8 +340,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 @@ -396,9 +381,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -426,8 +409,9 @@ def _create_or_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 @@ -543,7 +527,7 @@ def begin_create_or_update( :type automation_account_name: str :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str - :param parameters: Is either a model type or a IO type. Required. + :param parameters: Is either a PrivateEndpointConnection type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -564,9 +548,7 @@ def begin_create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -630,9 +612,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["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -648,8 +628,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 @@ -697,9 +678,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) 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) diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py index 3c4845e592ff..d7b288aeb830 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_private_link_resources_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,9 +41,7 @@ def build_automation_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,9 +105,7 @@ def automation( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -157,8 +148,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py index 9637fdcdee3b..dc5c719967ef 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python2_package_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,6 +235,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the python 2 package by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,7 +260,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -278,8 +276,9 @@ def delete( # 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 @@ -302,6 +301,9 @@ def get( ) -> _models.Module: """Retrieve the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -324,7 +326,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Module] = kwargs.pop("cls", None) request = build_get_request( @@ -340,8 +342,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 @@ -375,6 +378,9 @@ def create_or_update( ) -> _models.Module: """Create or Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -405,6 +411,9 @@ def create_or_update( ) -> _models.Module: """Create or Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -433,14 +442,17 @@ def create_or_update( ) -> _models.Module: """Create or Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The create or update parameters for python package. Is either a model type - or a IO type. Required. + :param parameters: The create or update parameters for python package. Is either a + PythonPackageCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -461,7 +473,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -489,8 +501,9 @@ def create_or_update( 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 @@ -528,6 +541,9 @@ def update( ) -> _models.Module: """Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -558,6 +574,9 @@ def update( ) -> _models.Module: """Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -586,14 +605,17 @@ def update( ) -> _models.Module: """Update the python 2 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The update parameters for python package. Is either a model type or a IO - type. Required. + :param parameters: The update parameters for python package. Is either a + PythonPackageUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -614,7 +636,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -642,8 +664,9 @@ def update( 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 @@ -670,6 +693,9 @@ def list_by_automation_account( ) -> Iterable["_models.Module"]: """Retrieve a list of python 2 packages. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -682,7 +708,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None) error_map = { @@ -725,8 +751,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_operations.py index 8a972064ff1b..2b24cac68a3e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_python3_package_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -151,7 +146,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,6 +235,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the python 3 package by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -262,7 +260,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -278,8 +276,9 @@ def delete( # 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 @@ -302,6 +301,9 @@ def get( ) -> _models.Module: """Retrieve the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -324,7 +326,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Module] = kwargs.pop("cls", None) request = build_get_request( @@ -340,8 +342,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 @@ -375,6 +378,9 @@ def create_or_update( ) -> _models.Module: """Create or Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -405,6 +411,9 @@ def create_or_update( ) -> _models.Module: """Create or Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -433,14 +442,17 @@ def create_or_update( ) -> _models.Module: """Create or Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The create or update parameters for python package. Is either a model type - or a IO type. Required. + :param parameters: The create or update parameters for python package. Is either a + PythonPackageCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -461,7 +473,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -489,8 +501,9 @@ def create_or_update( 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 @@ -528,6 +541,9 @@ def update( ) -> _models.Module: """Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -558,6 +574,9 @@ def update( ) -> _models.Module: """Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -586,14 +605,17 @@ def update( ) -> _models.Module: """Update the python 3 package identified by package name. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param package_name: The name of python package. Required. :type package_name: str - :param parameters: The update parameters for python package. Is either a model type or a IO - type. Required. + :param parameters: The update parameters for python package. Is either a + PythonPackageUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.PythonPackageUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -614,7 +636,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Module] = kwargs.pop("cls", None) @@ -642,8 +664,9 @@ def update( 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 @@ -670,6 +693,9 @@ def list_by_automation_account( ) -> Iterable["_models.Module"]: """Retrieve a list of python 3 packages. + .. seealso:: + - http://aka.ms/azureautomationsdk/moduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -682,7 +708,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ModuleListResult] = kwargs.pop("cls", None) error_map = { @@ -725,8 +751,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py index 0168fc1dfd72..e6fe3f6664a1 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_draft_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, IO, Iterator, Optional, TypeVar, Union, cast from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_get_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "text/powershell") # Construct URL @@ -61,7 +56,7 @@ def build_get_content_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -87,7 +82,7 @@ def build_replace_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -102,7 +97,7 @@ def build_replace_content_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -124,7 +119,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,7 +133,7 @@ def build_get_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -158,7 +153,7 @@ def build_undo_edit_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -172,7 +167,7 @@ def build_undo_edit_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -211,6 +206,9 @@ def get_content( ) -> Iterator[bytes]: """Retrieve the content of runbook draft identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -233,7 +231,7 @@ def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) request = build_get_content_request( @@ -249,8 +247,9 @@ def get_content( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -289,7 +288,7 @@ def _replace_content_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[Iterator[bytes]]] = kwargs.pop("cls", None) @@ -310,8 +309,9 @@ def _replace_content_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -349,6 +349,9 @@ def begin_replace_content( ) -> LROPoller[Iterator[bytes]]: """Replaces the runbook draft content. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -373,7 +376,7 @@ def begin_replace_content( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -427,6 +430,9 @@ def get( ) -> _models.RunbookDraft: """Retrieve the runbook draft identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -449,7 +455,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.RunbookDraft] = kwargs.pop("cls", None) request = build_get_request( @@ -465,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 @@ -493,6 +500,9 @@ def undo_edit( ) -> _models.RunbookDraftUndoEditResult: """Undo draft edit to last known published state identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -515,7 +525,7 @@ def undo_edit( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.RunbookDraftUndoEditResult] = kwargs.pop("cls", None) request = build_undo_edit_request( @@ -531,8 +541,9 @@ def undo_edit( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py index 3b9098bee619..ff9852cb4377 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_runbook_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, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -31,10 +30,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -48,7 +43,7 @@ def build_publish_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -62,7 +57,7 @@ def build_publish_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -82,7 +77,7 @@ def build_get_content_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "text/powershell") # Construct URL @@ -96,7 +91,7 @@ def build_get_content_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -116,7 +111,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -130,7 +125,7 @@ def build_get_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -150,7 +145,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -165,7 +160,7 @@ def build_create_or_update_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -187,7 +182,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -202,7 +197,7 @@ def build_update_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -224,7 +219,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -238,7 +233,7 @@ def build_delete_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -258,7 +253,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -318,7 +313,7 @@ def _publish_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_publish_request( @@ -334,8 +329,9 @@ def _publish_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 @@ -361,6 +357,9 @@ def begin_publish( ) -> LROPoller[None]: """Publish runbook draft. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookdraftoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -382,7 +381,7 @@ def begin_publish( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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) @@ -429,6 +428,9 @@ def get_content( ) -> Iterator[bytes]: """Retrieve the content of runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -451,7 +453,7 @@ def get_content( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) request = build_get_content_request( @@ -467,8 +469,9 @@ def get_content( request = _convert_request(request) request.url = self._client.format_url(request.url) + _stream = True pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access - request, stream=True, **kwargs + request, stream=_stream, **kwargs ) response = pipeline_response.http_response @@ -494,6 +497,9 @@ def get( ) -> _models.Runbook: """Retrieve the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -516,7 +522,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Runbook] = kwargs.pop("cls", None) request = build_get_request( @@ -532,8 +538,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 @@ -567,6 +574,9 @@ def create_or_update( ) -> _models.Runbook: """Create the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -598,6 +608,9 @@ def create_or_update( ) -> _models.Runbook: """Create the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -627,6 +640,9 @@ def create_or_update( ) -> _models.Runbook: """Create the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -634,7 +650,8 @@ def create_or_update( :param runbook_name: The runbook name. Required. :type runbook_name: str :param parameters: The create or update parameters for runbook. Provide either content link for - a published runbook or draft, not both. Is either a model type or a IO type. Required. + a published runbook or draft, not both. Is either a RunbookCreateOrUpdateParameters type or a + IO type. Required. :type parameters: ~azure.mgmt.automation.models.RunbookCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -655,7 +672,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Runbook] = kwargs.pop("cls", None) @@ -683,8 +700,9 @@ def create_or_update( 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 @@ -722,6 +740,9 @@ def update( ) -> _models.Runbook: """Update the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -752,6 +773,9 @@ def update( ) -> _models.Runbook: """Update the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -780,14 +804,17 @@ def update( ) -> _models.Runbook: """Update the runbook identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param runbook_name: The runbook name. Required. :type runbook_name: str - :param parameters: The update parameters for runbook. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for runbook. Is either a RunbookUpdateParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.RunbookUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -808,7 +835,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Runbook] = kwargs.pop("cls", None) @@ -836,8 +863,9 @@ def update( 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 @@ -864,6 +892,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the runbook by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -886,7 +917,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -902,8 +933,9 @@ def delete( # 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 @@ -926,6 +958,9 @@ def list_by_automation_account( ) -> Iterable["_models.Runbook"]: """Retrieve a list of runbooks. + .. seealso:: + - http://aka.ms/azureautomationsdk/runbookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -938,7 +973,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.RunbookListResult] = kwargs.pop("cls", None) error_map = { @@ -981,8 +1016,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py index 7788fca6ce08..38a3894ea80e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_schedule_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -120,7 +115,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -154,7 +149,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -247,6 +242,9 @@ def create_or_update( ) -> Optional[_models.Schedule]: """Create a schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -278,6 +276,9 @@ def create_or_update( ) -> Optional[_models.Schedule]: """Create a schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -307,6 +308,9 @@ def create_or_update( ) -> Optional[_models.Schedule]: """Create a schedule. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -314,7 +318,7 @@ def create_or_update( :param schedule_name: The schedule name. Required. :type schedule_name: str :param parameters: The parameters supplied to the create or update schedule operation. Is - either a model type or a IO type. Required. + either a ScheduleCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ScheduleCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -335,7 +339,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.Schedule]] = kwargs.pop("cls", None) @@ -363,8 +367,9 @@ def create_or_update( 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 @@ -403,6 +408,9 @@ def update( ) -> _models.Schedule: """Update the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -433,6 +441,9 @@ def update( ) -> _models.Schedule: """Update the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -461,14 +472,17 @@ def update( ) -> _models.Schedule: """Update the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param schedule_name: The schedule name. Required. :type schedule_name: str - :param parameters: The parameters supplied to the update schedule operation. Is either a model - type or a IO type. Required. + :param parameters: The parameters supplied to the update schedule operation. Is either a + ScheduleUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.ScheduleUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -489,7 +503,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Schedule] = kwargs.pop("cls", None) @@ -517,8 +531,9 @@ def update( 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 @@ -545,6 +560,9 @@ def get( ) -> _models.Schedule: """Retrieve the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -567,7 +585,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Schedule] = kwargs.pop("cls", None) request = build_get_request( @@ -583,8 +601,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 @@ -611,6 +630,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the schedule identified by schedule name. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -633,7 +655,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -649,8 +671,9 @@ def delete( # 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 @@ -673,6 +696,9 @@ def list_by_automation_account( ) -> Iterable["_models.Schedule"]: """Retrieve a list of schedules. + .. seealso:: + - http://aka.ms/azureautomationsdk/scheduleoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -685,7 +711,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.ScheduleListResult] = kwargs.pop("cls", None) error_map = { @@ -728,8 +754,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py index 3ad108e767be..dce70651736d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_machine_runs_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 AutomationClientMixinABC, _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]] @@ -51,7 +46,7 @@ def build_get_by_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +92,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -162,6 +157,9 @@ def get_by_id( ) -> _models.SoftwareUpdateConfigurationMachineRun: """Get a single software update configuration machine run by Id. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -187,7 +185,7 @@ def get_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationMachineRun] = kwargs.pop("cls", None) request = build_get_by_id_request( @@ -204,8 +202,9 @@ def get_by_id( 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 @@ -239,6 +238,9 @@ def list( ) -> _models.SoftwareUpdateConfigurationMachineRunListResult: """Return list of software update configuration machine runs. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -270,7 +272,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationMachineRunListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -289,8 +291,9 @@ def list( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py index af550b9c2421..33778946dc3b 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configuration_runs_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 AutomationClientMixinABC, _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]] @@ -51,7 +46,7 @@ def build_get_by_id_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +92,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -162,6 +157,9 @@ def get_by_id( ) -> _models.SoftwareUpdateConfigurationRun: """Get a single software update configuration Run by Id. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationrunoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -187,7 +185,7 @@ def get_by_id( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationRun] = kwargs.pop("cls", None) request = build_get_by_id_request( @@ -204,8 +202,9 @@ def get_by_id( 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 @@ -239,6 +238,9 @@ def list( ) -> _models.SoftwareUpdateConfigurationRunListResult: """Return list of software update configuration runs. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -270,7 +272,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SoftwareUpdateConfigurationRunListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -289,8 +291,9 @@ def list( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py index 2fc4294217af..e5fddd532a24 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_software_update_configurations_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -98,7 +93,7 @@ def build_get_by_name_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,7 +137,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -186,7 +181,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -250,6 +245,9 @@ def create( ) -> _models.SoftwareUpdateConfiguration: """Create a new software update configuration with the name given in the URI. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -284,6 +282,9 @@ def create( ) -> _models.SoftwareUpdateConfiguration: """Create a new software update configuration with the name given in the URI. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -316,6 +317,9 @@ def create( ) -> _models.SoftwareUpdateConfiguration: """Create a new software update configuration with the name given in the URI. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -323,7 +327,8 @@ def create( :param software_update_configuration_name: The name of the software update configuration to be created. Required. :type software_update_configuration_name: str - :param parameters: Request body. Is either a model type or a IO type. Required. + :param parameters: Request body. Is either a SoftwareUpdateConfiguration type or a IO type. + Required. :type parameters: ~azure.mgmt.automation.models.SoftwareUpdateConfiguration or IO :param client_request_id: Identifies this specific client request. Default value is None. :type client_request_id: str @@ -346,7 +351,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None) @@ -375,8 +380,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 @@ -412,6 +418,9 @@ def get_by_name( ) -> _models.SoftwareUpdateConfiguration: """Get a single software update configuration by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -437,7 +446,7 @@ def get_by_name( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.SoftwareUpdateConfiguration] = kwargs.pop("cls", None) request = build_get_by_name_request( @@ -454,8 +463,9 @@ def get_by_name( 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 @@ -487,6 +497,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """delete a specific software update configuration. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -512,7 +525,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -529,8 +542,9 @@ def delete( # 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 @@ -558,6 +572,9 @@ def list( ) -> _models.SoftwareUpdateConfigurationListResult: """Get all software update configurations for the account. + .. seealso:: + - http://aka.ms/azureautomationsdk/softwareupdateconfigurationoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -582,7 +599,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.SoftwareUpdateConfigurationListResult] = kwargs.pop("cls", None) request = build_list_request( @@ -599,8 +616,9 @@ def list( 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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py index 8c58d2fc5e71..a73bee7d7c9f 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -91,7 +86,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -132,7 +127,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -170,7 +165,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -209,7 +204,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -270,6 +265,9 @@ def create_or_update( ) -> _models.SourceControl: """Create a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -301,6 +299,9 @@ def create_or_update( ) -> _models.SourceControl: """Create a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -330,6 +331,9 @@ def create_or_update( ) -> _models.SourceControl: """Create a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -337,7 +341,7 @@ def create_or_update( :param source_control_name: The source control name. Required. :type source_control_name: str :param parameters: The parameters supplied to the create or update source control operation. Is - either a model type or a IO type. Required. + either a SourceControlCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.SourceControlCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -358,7 +362,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None) @@ -386,8 +390,9 @@ def create_or_update( 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,6 +430,9 @@ def update( ) -> _models.SourceControl: """Update a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -455,6 +463,9 @@ def update( ) -> _models.SourceControl: """Update a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -483,6 +494,9 @@ def update( ) -> _models.SourceControl: """Update a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -490,7 +504,7 @@ def update( :param source_control_name: The source control name. Required. :type source_control_name: str :param parameters: The parameters supplied to the update source control operation. Is either a - model type or a IO type. Required. + SourceControlUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.SourceControlUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -511,7 +525,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None) @@ -539,8 +553,9 @@ def update( 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 @@ -567,6 +582,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -589,7 +607,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -605,8 +623,9 @@ def delete( # 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 @@ -629,6 +648,9 @@ def get( ) -> _models.SourceControl: """Retrieve the source control identified by source control name. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -651,7 +673,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControl] = kwargs.pop("cls", None) request = build_get_request( @@ -667,8 +689,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 @@ -695,6 +718,9 @@ def list_by_automation_account( ) -> Iterable["_models.SourceControl"]: """Retrieve a list of source controls. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontroloperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -709,7 +735,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlListResult] = kwargs.pop("cls", None) error_map = { @@ -753,8 +779,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py index 0c41e15aa9d1..88720952e590 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,7 +130,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -198,6 +193,9 @@ def create( ) -> _models.SourceControlSyncJob: """Creates the sync job for a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -232,6 +230,9 @@ def create( ) -> _models.SourceControlSyncJob: """Creates the sync job for a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -264,6 +265,9 @@ def create( ) -> _models.SourceControlSyncJob: """Creates the sync job for a source control. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -273,7 +277,7 @@ def create( :param source_control_sync_job_id: The source control sync job id. Required. :type source_control_sync_job_id: str :param parameters: The parameters supplied to the create source control sync job operation. Is - either a model type or a IO type. Required. + either a SourceControlSyncJobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.SourceControlSyncJobCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -294,7 +298,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SourceControlSyncJob] = kwargs.pop("cls", None) @@ -323,8 +327,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 @@ -356,6 +361,9 @@ def get( ) -> _models.SourceControlSyncJobById: """Retrieve the source control sync job identified by job id. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -380,7 +388,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobById] = kwargs.pop("cls", None) request = build_get_request( @@ -397,8 +405,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 @@ -430,6 +439,9 @@ def list_by_automation_account( ) -> Iterable["_models.SourceControlSyncJob"]: """Retrieve a list of source control sync jobs. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -447,7 +459,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobListResult] = kwargs.pop("cls", None) error_map = { @@ -492,8 +504,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py index 314e759b1941..d70a8732779d 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_source_control_sync_job_streams_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_sync_job_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) 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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -157,6 +152,9 @@ def list_by_sync_job( ) -> Iterable["_models.SourceControlSyncJobStream"]: """Retrieve a list of sync job streams identified by sync job id. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -176,7 +174,7 @@ def list_by_sync_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobStreamsListBySyncJob] = kwargs.pop("cls", None) error_map = { @@ -222,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 @@ -252,6 +251,9 @@ def get( ) -> _models.SourceControlSyncJobStreamById: """Retrieve a sync job stream identified by stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -278,7 +280,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.SourceControlSyncJobStreamById] = kwargs.pop("cls", None) request = build_get_request( @@ -296,8 +298,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py index c55349c27844..86be68c94744 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_statistics_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,6 +100,9 @@ def list_by_automation_account( ) -> Iterable["_models.Statistics"]: """Retrieve the statistics for the account. + .. seealso:: + - http://aka.ms/azureautomationsdk/statisticsoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -119,7 +117,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.StatisticsListResult] = kwargs.pop("cls", None) error_map = { @@ -163,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py index f9f05316a2c7..cc6ad65b64a3 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_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, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -60,7 +55,7 @@ def build_create_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -82,7 +77,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -96,7 +91,7 @@ def build_get_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -116,7 +111,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -130,7 +125,7 @@ def build_resume_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -150,7 +145,7 @@ def build_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -164,7 +159,7 @@ def build_stop_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -184,7 +179,7 @@ def build_suspend_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -198,7 +193,7 @@ def build_suspend_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -244,6 +239,9 @@ def create( ) -> _models.TestJob: """Create a test job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -274,6 +272,9 @@ def create( ) -> _models.TestJob: """Create a test job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -302,14 +303,17 @@ def create( ) -> _models.TestJob: """Create a test job of the runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param runbook_name: The parameters supplied to the create test job operation. Required. :type runbook_name: str - :param parameters: The parameters supplied to the create test job operation. Is either a model - type or a IO type. Required. + :param parameters: The parameters supplied to the create test job operation. Is either a + TestJobCreateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.TestJobCreateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -330,7 +334,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestJob] = kwargs.pop("cls", None) @@ -358,8 +362,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 @@ -386,6 +391,9 @@ def get( ) -> _models.TestJob: """Retrieve the test job for the specified runbook. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -408,7 +416,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.TestJob] = kwargs.pop("cls", None) request = build_get_request( @@ -424,8 +432,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 @@ -452,6 +461,9 @@ def resume( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the test job. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -474,7 +486,7 @@ def resume( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_resume_request( @@ -490,8 +502,9 @@ def resume( # 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 @@ -514,6 +527,9 @@ def stop( # pylint: disable=inconsistent-return-statements ) -> None: """Stop the test job. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -536,7 +552,7 @@ def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -552,8 +568,9 @@ def stop( # 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 @@ -576,6 +593,9 @@ def suspend( # pylint: disable=inconsistent-return-statements ) -> None: """Suspend the test job. + .. seealso:: + - http://aka.ms/azureautomationsdk/testjoboperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -598,7 +618,7 @@ def suspend( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_suspend_request( @@ -614,8 +634,9 @@ def suspend( # 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 diff --git a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py index e20b0d12c927..1ac198505646 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_test_job_streams_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -51,7 +46,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -65,7 +60,7 @@ def build_get_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), "jobStreamId": _SERIALIZER.url("job_stream_id", job_stream_id, "str"), } @@ -92,7 +87,7 @@ def build_list_by_test_job_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -106,7 +101,7 @@ def build_list_by_test_job_request( "resource_group_name", resource_group_name, "str", max_length=90, min_length=1, pattern=r"^[-\w\._]+$" ), "automationAccountName": _SERIALIZER.url("automation_account_name", automation_account_name, "str"), - "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z]*-*[a-zA-Z0-9]*$"), + "runbookName": _SERIALIZER.url("runbook_name", runbook_name, "str", pattern=r"^[a-zA-Z][a-zA-Z-_0-9]*$"), } _url: str = _format_url_section(_url, **path_format_arguments) # type: ignore @@ -152,6 +147,9 @@ def get( ) -> _models.JobStream: """Retrieve a test job stream of the test job identified by runbook name and stream id. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -176,7 +174,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStream] = kwargs.pop("cls", None) request = build_get_request( @@ -193,8 +191,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 @@ -226,6 +225,9 @@ def list_by_test_job( ) -> Iterable["_models.JobStream"]: """Retrieve a list of test job streams identified by runbook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/jobstreamoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -242,7 +244,7 @@ def list_by_test_job( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.JobStreamListResult] = kwargs.pop("cls", None) error_map = { @@ -287,8 +289,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py index 46d2b4c00a69..2c7f4697e29e 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_usages_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 from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -98,6 +93,9 @@ def list_by_automation_account( ) -> Iterable["_models.Usage"]: """Retrieve the usage for the account id. + .. seealso:: + - http://aka.ms/azureautomationsdk/usageoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -110,7 +108,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.UsageListResult] = kwargs.pop("cls", None) error_map = { @@ -153,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py index 33b9118074cf..7a8b80054494 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_variable_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -120,7 +115,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -154,7 +149,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-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -188,7 +183,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -247,6 +242,9 @@ def create_or_update( ) -> _models.Variable: """Create a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -278,6 +276,9 @@ def create_or_update( ) -> _models.Variable: """Create a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -307,6 +308,9 @@ def create_or_update( ) -> _models.Variable: """Create a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -314,7 +318,7 @@ def create_or_update( :param variable_name: The variable name. Required. :type variable_name: str :param parameters: The parameters supplied to the create or update variable operation. Is - either a model type or a IO type. Required. + either a VariableCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.VariableCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -335,7 +339,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Variable] = kwargs.pop("cls", None) @@ -363,8 +367,9 @@ def create_or_update( 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 @@ -402,6 +407,9 @@ def update( ) -> _models.Variable: """Update a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -432,6 +440,9 @@ def update( ) -> _models.Variable: """Update a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -460,14 +471,17 @@ def update( ) -> _models.Variable: """Update a variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param variable_name: The variable name. Required. :type variable_name: str - :param parameters: The parameters supplied to the update variable operation. Is either a model - type or a IO type. Required. + :param parameters: The parameters supplied to the update variable operation. Is either a + VariableUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.VariableUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -488,7 +502,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Variable] = kwargs.pop("cls", None) @@ -516,8 +530,9 @@ def update( 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 @@ -544,6 +559,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the variable. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -566,7 +584,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -582,8 +600,9 @@ def delete( # 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 @@ -606,6 +625,9 @@ def get( ) -> _models.Variable: """Retrieve the variable identified by variable name. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -628,7 +650,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.Variable] = kwargs.pop("cls", None) request = build_get_request( @@ -644,8 +666,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 @@ -672,6 +695,9 @@ def list_by_automation_account( ) -> Iterable["_models.Variable"]: """Retrieve a list of variables. + .. seealso:: + - http://aka.ms/azureautomationsdk/variableoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -684,7 +710,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-08"] = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-08")) cls: ClsType[_models.VariableListResult] = kwargs.pop("cls", None) error_map = { @@ -727,8 +753,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py index 66097fe791af..a260334298e9 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_watcher_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,9 +41,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,9 +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["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -121,9 +112,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -160,9 +149,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -196,9 +183,7 @@ def build_start_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,9 +217,7 @@ def build_stop_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -273,9 +256,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -336,6 +317,9 @@ def create_or_update( ) -> _models.Watcher: """Create the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -366,6 +350,9 @@ def create_or_update( ) -> _models.Watcher: """Create the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -394,14 +381,17 @@ def create_or_update( ) -> _models.Watcher: """Create the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param watcher_name: The watcher name. Required. :type watcher_name: str - :param parameters: The create or update parameters for watcher. Is either a model type or a IO - type. Required. + :param parameters: The create or update parameters for watcher. Is either a Watcher type or a + IO type. Required. :type parameters: ~azure.mgmt.automation.models.Watcher or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -422,9 +412,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Watcher] = kwargs.pop("cls", None) @@ -452,8 +440,9 @@ def create_or_update( 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,6 +473,9 @@ def get( ) -> _models.Watcher: """Retrieve the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -506,9 +498,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.Watcher] = kwargs.pop("cls", None) request = build_get_request( @@ -524,8 +514,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 @@ -559,6 +550,9 @@ def update( ) -> _models.Watcher: """Update the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -589,6 +583,9 @@ def update( ) -> _models.Watcher: """Update the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -617,14 +614,17 @@ def update( ) -> _models.Watcher: """Update the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param watcher_name: The watcher name. Required. :type watcher_name: str - :param parameters: The update parameters for watcher. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for watcher. Is either a WatcherUpdateParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.WatcherUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -645,9 +645,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Watcher] = kwargs.pop("cls", None) @@ -675,8 +673,9 @@ def update( 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 @@ -703,6 +702,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the watcher by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -725,9 +727,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -743,8 +743,9 @@ def delete( # 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 @@ -767,6 +768,9 @@ def start( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -789,9 +793,7 @@ def start( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_start_request( @@ -807,8 +809,9 @@ def start( # 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 @@ -831,6 +834,9 @@ def stop( # pylint: disable=inconsistent-return-statements ) -> None: """Resume the watcher identified by watcher name. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -853,9 +859,7 @@ def stop( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_stop_request( @@ -871,8 +875,9 @@ def stop( # 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 @@ -895,6 +900,9 @@ def list_by_automation_account( ) -> Iterable["_models.Watcher"]: """Retrieve a list of watchers. + .. seealso:: + - http://aka.ms/azureautomationsdk/watcheroperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -909,9 +917,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-13-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-13-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-13-preview")) cls: ClsType[_models.WatcherListResult] = kwargs.pop("cls", None) error_map = { @@ -955,8 +961,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/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py index d738fc7d1b05..2039526768b1 100644 --- a/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_operations.py +++ b/sdk/automation/azure-mgmt-automation/azure/mgmt/automation/operations/_webhook_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, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from .._serialization import Serializer from .._vendor import AutomationClientMixinABC, _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]] @@ -46,7 +41,7 @@ def build_generate_uri_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -79,7 +74,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -113,7 +108,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -147,7 +142,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -184,7 +179,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -226,7 +221,7 @@ def build_list_by_automation_account_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -278,6 +273,9 @@ def __init__(self, *args, **kwargs): def generate_uri(self, resource_group_name: str, automation_account_name: str, **kwargs: Any) -> str: """Generates a Uri for use in creating a webhook. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -298,7 +296,7 @@ def generate_uri(self, resource_group_name: str, automation_account_name: str, * _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[str] = kwargs.pop("cls", None) request = build_generate_uri_request( @@ -313,8 +311,9 @@ def generate_uri(self, resource_group_name: str, automation_account_name: str, * 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 @@ -341,6 +340,9 @@ def delete( # pylint: disable=inconsistent-return-statements ) -> None: """Delete the webhook by name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -363,7 +365,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -379,8 +381,9 @@ def delete( # 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 @@ -403,6 +406,9 @@ def get( ) -> _models.Webhook: """Retrieve the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -425,7 +431,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) request = build_get_request( @@ -441,8 +447,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 @@ -476,6 +483,9 @@ def create_or_update( ) -> _models.Webhook: """Create the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -506,6 +516,9 @@ def create_or_update( ) -> _models.Webhook: """Create the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -534,14 +547,17 @@ def create_or_update( ) -> _models.Webhook: """Create the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param webhook_name: The webhook name. Required. :type webhook_name: str - :param parameters: The create or update parameters for webhook. Is either a model type or a IO - type. Required. + :param parameters: The create or update parameters for webhook. Is either a + WebhookCreateOrUpdateParameters type or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.WebhookCreateOrUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -562,7 +578,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) @@ -590,8 +606,9 @@ def create_or_update( 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 @@ -629,6 +646,9 @@ def update( ) -> _models.Webhook: """Update the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -659,6 +679,9 @@ def update( ) -> _models.Webhook: """Update the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -687,14 +710,17 @@ def update( ) -> _models.Webhook: """Update the webhook identified by webhook name. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. :type automation_account_name: str :param webhook_name: The webhook name. Required. :type webhook_name: str - :param parameters: The update parameters for webhook. Is either a model type or a IO type. - Required. + :param parameters: The update parameters for webhook. Is either a WebhookUpdateParameters type + or a IO type. Required. :type parameters: ~azure.mgmt.automation.models.WebhookUpdateParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -715,7 +741,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.Webhook] = kwargs.pop("cls", None) @@ -743,8 +769,9 @@ def update( 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 @@ -771,6 +798,9 @@ def list_by_automation_account( ) -> Iterable["_models.Webhook"]: """Retrieve a list of webhooks. + .. seealso:: + - http://aka.ms/azureautomationsdk/webhookoperations + :param resource_group_name: Name of an Azure Resource group. Required. :type resource_group_name: str :param automation_account_name: The name of the automation account. Required. @@ -785,7 +815,7 @@ def list_by_automation_account( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-10-31"] = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-10-31")) cls: ClsType[_models.WebhookListResult] = kwargs.pop("cls", None) error_map = { @@ -829,8 +859,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/automation/azure-mgmt-automation/generated_samples/create_or_update_source_control.py b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_source_control.py index 714e153313c0..acf52caa2cd0 100644 --- a/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_source_control.py +++ b/sdk/automation/azure-mgmt-automation/generated_samples/create_or_update_source_control.py @@ -41,10 +41,7 @@ def main(): "folderPath": "/folderOne/folderTwo", "publishRunbook": True, "repoUrl": "https://sampleUser.visualstudio.com/myProject/_git/myRepository", - "securityToken": { - "accessToken": "3a326f7a0dcd343ea58fee21f2fd5fb4c1234567", - "tokenType": "PersonalAccessToken", - }, + "securityToken": {"accessToken": "******", "tokenType": "PersonalAccessToken"}, "sourceType": "VsoGit", } }, diff --git a/sdk/automation/azure-mgmt-automation/generated_samples/update_source_control_patch.py b/sdk/automation/azure-mgmt-automation/generated_samples/update_source_control_patch.py index 52f7e6b0d4e0..2fb782a5bf2e 100644 --- a/sdk/automation/azure-mgmt-automation/generated_samples/update_source_control_patch.py +++ b/sdk/automation/azure-mgmt-automation/generated_samples/update_source_control_patch.py @@ -40,10 +40,7 @@ def main(): "description": "my description", "folderPath": "/folderOne/folderTwo", "publishRunbook": True, - "securityToken": { - "accessToken": "3a326f7a0dcd343ea58fee21f2fd5fb4c1234567", - "tokenType": "PersonalAccessToken", - }, + "securityToken": {"accessToken": "******", "tokenType": "PersonalAccessToken"}, } }, )